Looks like the Doubles are not exactly zero. Must be some precision
points not displaying.
Ok... It's Friday and maybe my brain is dead, but I'm having a weird
problem with some basic math.
Here's a little snippet of the code I'm working with:
---
echo
They are not the same amount. They each got a different rounding error.
Double values only display a small number of decimal places
(relatively speaking). If you look at the difference you're getting,
it's 0.0142108547152 (I may be off by a zero or two), so
given you're working
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] Math weirdness with doubles...
Looks like the Doubles are not exactly zero. Must be some precision
points not displaying.
Ok... It's Friday and maybe my brain is dead, but I'm having a weird
problem with some basic math.
Here's a little snippet
[mailto:[EMAIL PROTECTED]
Sent: Friday, February 27, 2004 3:16 PM
To: jon roig
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] Math weirdness with doubles...
Looks like the Doubles are not exactly zero. Must be some precision
points not displaying.
Ok... It's Friday and maybe my brain is dead
jon roig wrote:
Ok... It's Friday and maybe my brain is dead, but I'm having a weird
problem with some basic math.
Here's a little snippet of the code I'm working with:
---
echo pCurrent:$currentAmount:.gettype($currentAmount). -
Paid:$paidAmount:.gettype($paidAmount)./p;
5 matches
Mail list logo