ID: 46272 Updated by: [EMAIL PROTECTED] Reported By: chris at corecoding dot com -Status: Open +Status: Feedback Bug Type: Math related Operating System: Multiple: Debian and Mac OS X PHP Version: 5.2.6 New Comment:
Please try using this CVS snapshot: http://snaps.php.net/php5.2-latest.tar.gz For Windows: http://windows.php.net/snapshots/ Previous Comments: ------------------------------------------------------------------------ [2008-10-10 18:39:23] chris at corecoding dot com Description: ------------ Both results should be 0. They are not! Reproduce code: --------------- $total = 2291.45; $paid = 2453.425; $tax = 161.975; echo (($total - $paid) + $tax) . "\n"; # -3.69482222595E-13 echo (($total + $tax) - $paid) . "\n"; -4.54747350886E-13 Expected result: ---------------- 0! Actual result: -------------- -3.69482222595E-13 and -4.54747350886E-13 ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=46272&edit=1