#44097 [Opn->Bgs]: error with match
| From: | johannes@php.net | Date: | Mon, 11 Feb 2008 12:50:59 +0000 |
| Subject: | #44097 [Opn->Bgs]: error with match | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-122174@lists.php.net to get a copy of this message | ||
ID: 44097
Updated by: johannes@php.net
Reported By: cristian at buttasi dot it
-Status: Open
+Status: Bogus
Bug Type: *Math Functions
Operating System: Windows
PHP Version: 5.2.5
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.
If you would like to know more about "floats" and what IEEE
754 is, read this:
http://docs.sun.com/source/806-3568/ncg_goldberg.html
Thank you for your interest in PHP.
.
Previous Comments:
------------------------------------------------------------------------
[2008-02-11 10:29:49] cristian at buttasi dot it
Description:
------------
i use php version 5.1.1
if i do : round(604.305,2) --->>> result 604.3
the corret value is 604.31
with same number round is correct but with this value is not correct
i hope that my note is important for us
excuse me for my bad english
bye, Cristian
Reproduce code:
---------------
echo round(604.305,2);
Expected result:
----------------
604.31
Actual result:
--------------
604.3
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=44097&edit=1