Re: Math Weirdness

From: Date: Mon, 14 Jul 2008 20:00:42 +0000
Subject: Re: Math Weirdness
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-276785@lists.php.net to get a copy of this message
I don't quite understand your problem, but I use integers for any monetary workings as you can guarantee it is accurate (obviously, you work in pence or cents rather than GBP or USD). Alex
Hello Alex, I was reading through this thread, and I was curious about what methods you use to handle fractions of a dollar and/or fractions of a penny if you are always using integers. Do you only use a decimal for printing? do you adjust all interest rates, etc...then as well? How about when interest calculations result in fractions of pennies, how do you handle it then? Basically, I can't see how it could be done with just integers alone? thanks dank

« previous php.general (#276785) next »