#49112 [NEW]: Problem with float numbers - only in one case
| From: | marek at 3v dot ie | Date: | Thu, 30 Jul 2009 16:56:58 +0000 |
| Subject: | #49112 [NEW]: Problem with float numbers - only in one case | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-140497@lists.php.net to get a copy of this message | ||
From: marek at 3v dot ie
Operating system: Fedora 9
PHP version: 5.2.10
PHP Bug Type: Math related
Bug description: Problem with float numbers - only in one case
Description:
------------
When I try to substract specific float numbers I receive a wrong result
Reproduce code:
---------------
echo (35.19 - 31.69 - 3.50);
echo (36.19 - 31.69 - 2.50);
Expected result:
----------------
0
Actual result:
--------------
-3.5527136788005E-15
--
Edit bug report at http://bugs.php.net/?id=49112&edit=1
--
Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=49112&r=trysnapshot52
Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=49112&r=trysnapshot53
Try a snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=49112&r=trysnapshot60
Fixed in SVN: http://bugs.php.net/fix.php?id=49112&r=fixed
Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=49112&r=needdocs
Fixed in release: http://bugs.php.net/fix.php?id=49112&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=49112&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=49112&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=49112&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=49112&r=support
Expected behavior: http://bugs.php.net/fix.php?id=49112&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=49112&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=49112&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=49112&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=49112&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=49112&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=49112&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=49112&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=49112&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=49112&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=49112&r=mysqlcfg