From: uwe dot voelker at vline dot de Operating system: Win XP PHP version: 5.0.5 PHP Bug Type: Math related Bug description: Addition of some negative floats fails
Description: ------------ Addition of some negative floats fails ! Reproduce code: --------------- <?php // PHP 5.05 // First example shows the bug if ( (-56.33) != ((-14.13) + (-42.20)) ) { print "<HR> First Example: Why is -56.33 not -56.33 ??? <HR>"; } else { print "<HR> First Example: OK <HR>"; } // Second example with modified values but same result is ok if ( (-56.33) != ((-14.12) + (-42.21)) ) { print "<HR> Second Example: Why is -56.33 not -56.33 ??? <HR>"; } else { print "<HR> Second Example: OK <HR>"; } ?> Expected result: ---------------- First example: true, but must be false. Second example: false, it is OK. -- Edit bug report at http://bugs.php.net/?id=35275&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=35275&r=trysnapshot4 Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=35275&r=trysnapshot50 Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=35275&r=trysnapshot51 Fixed in CVS: http://bugs.php.net/fix.php?id=35275&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=35275&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=35275&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=35275&r=needscript Try newer version: http://bugs.php.net/fix.php?id=35275&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=35275&r=support Expected behavior: http://bugs.php.net/fix.php?id=35275&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=35275&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=35275&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=35275&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=35275&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=35275&r=dst IIS Stability: http://bugs.php.net/fix.php?id=35275&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=35275&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=35275&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=35275&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=35275&r=mysqlcfg