From: s6urik at gmail dot com Operating system: Linux (Amazon EC2) PHP version: 5.2.6 PHP Bug Type: Scripting Engine problem Bug description: var_dump(0.09 + 0.01); // float(0.0:)
Description: ------------ Result of expression "0.01 + 0.09" is "float(0.0:)", yes, zero dot zero colon. Though "0.1 * 0.1 + 0.9" returns "float(0.1)" as it should, so internally float looks to be stored correctly. This bug appears only in Amazon EC2 virtual hosting environment: Instance Type: Small Instance Kernel: Linux 2.6.21.7-2.fc8xen #1 SMP Fri Feb 15 12:39:36 EST 2008 i686 GNU/Linux Tested PHP versions: 5.2.4, 5.2.6 PHP 5.3.0alpha3-dev is not affected. Reproduce code: --------------- var_dump(0.01 + 0.09) Expected result: ---------------- float(0.1) Actual result: -------------- float(0.0:) -- Edit bug report at http://bugs.php.net/?id=46376&edit=1 -- Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=46376&r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=46376&r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=46376&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=46376&r=fixedcvs Fixed in CVS and need be documented: http://bugs.php.net/fix.php?id=46376&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=46376&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=46376&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=46376&r=needscript Try newer version: http://bugs.php.net/fix.php?id=46376&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=46376&r=support Expected behavior: http://bugs.php.net/fix.php?id=46376&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=46376&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=46376&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=46376&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=46376&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=46376&r=dst IIS Stability: http://bugs.php.net/fix.php?id=46376&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=46376&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=46376&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=46376&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=46376&r=mysqlcfg
