Re: [PHP] Math weirdness with doubles...

2004-02-27 Thread Daniel Clark
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

Re: [PHP] Math weirdness with doubles...

2004-02-27 Thread D. Wokan
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

RE: [PHP] Math weirdness with doubles...

2004-02-27 Thread 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, but I'm having a weird problem with some basic math. Here's a little snippet

RE: [PHP] Math weirdness with doubles...

2004-02-27 Thread Daniel Clark
[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

Re: [PHP] Math weirdness with doubles...

2004-02-27 Thread Marek Kilimajer
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;