#41363 [Opn->Bgs]: superfriday
ID: 41363
Updated by: johannes@php.net
Reported By: kongxs_9 at hotmail dot com
-Status: Open
+Status: Bogus
Bug Type: Unknown/Other Function
Operating System: linux & windows
PHP Version: 5.2.2
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:
------------------------------------------------------------------------
[2007-05-11 09:18:26] kongxs_9 at hotmail dot com
Description:
------------
wrong return value
Reproduce code:
---------------
<?
$tmp = 2.01 * 100;
echo gettype($tmp).":".$tmp.":".intval($tmp)."\n";
?>
Expected result:
----------------
double:201:200
Actual result:
--------------
double:201:201
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=41363&edit=1
Thread (2 messages)