#28210 [Opn->Bgs]: Erro in subtration
| From: | derick@php.net | Date: | Wed, 28 Apr 2004 19:48:08 +0000 |
| Subject: | #28210 [Opn->Bgs]: Erro in subtration | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-58968@lists.php.net to get a copy of this message | ||
ID: 28210
Updated by: derick@php.net
Reported By: giucareca at brfree dot com dot br
-Status: Open
+Status: Bogus
Bug Type: Unknown/Other Function
Operating System: redhat
PHP Version: 4.3.4
New Comment:
Floating point values have a limited precision. Hence a value might
not have the same string representation after any processing. That also
includes writing a floating point value in your script and directly
printing it without any mathematical operations.
Thank you for your interest in PHP.
.
Previous Comments:
------------------------------------------------------------------------
[2004-04-28 21:11:48] giucareca at brfree dot com dot br
Description:
------------
Error of expression
Reproduce code:
---------------
<?php
$j = (19.8 + 0.6) - 20.4; //try this expression
echo($j); //it's don't return 0.00;
?>
Expected result:
----------------
0
Actual result:
--------------
3.4556
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=28210&edit=1