#24365 [NEW]: Result problem with soustractions
| From: | jump at worldakt dot com | Date: | Fri, 27 Jun 2003 18:22:54 +0000 |
| Subject: | #24365 [NEW]: Result problem with soustractions | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-42646@lists.php.net to get a copy of this message | ||
From: jump at worldakt dot com
Operating system: Linux
PHP version: 4.3.2
PHP Bug Type: Zend Engine 2 problem
Bug description: Result problem with soustractions
Description:
------------
It seems that when I soustract something (float) it returns a wrong
result.
Reproduce code:
---------------
<?php
echo 290.34 - (142.00 + 148.34);
?>
-5.68434188608E-14
<?php
echo 142.00 + 148.34;
?>
290.34
<?php
echo 290.34 - 290.34;
?>
0
Expected result:
----------------
<?php
echo 290.34 - (142.00 + 148.34);
?>
0
Actual result:
--------------
<?php
echo 290.34 - (142.00 + 148.34);
?>
-5.68434188608E-14
--
Edit bug report at http://bugs.php.net/?id=24365&edit=1
--
Try a CVS snapshot: http://bugs.php.net/fix.php?id=24365&r=trysnapshot
Fixed in CVS: http://bugs.php.net/fix.php?id=24365&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=24365&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=24365&r=needtrace
Try newer version: http://bugs.php.net/fix.php?id=24365&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=24365&r=support
Expected behavior: http://bugs.php.net/fix.php?id=24365&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=24365&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=24365&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=24365&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=24365&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=24365&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=24365&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=24365&r=gnused