Bug #53337 [Opn->Bgs]: a count error
| From: | rasmus@php.net | Date: | Thu, 18 Nov 2010 05:30:45 +0000 |
| Subject: | Bug #53337 [Opn->Bgs]: a count error | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-156130@lists.php.net to get a copy of this message | ||
Edit report at http://bugs.php.net/bug.php?id=53337&edit=1
ID: 53337
Updated by: rasmus@php.net
Reported by: richcem at 163 dot com
Summary: a count error
-Status: Open
+Status: Bogus
Type: Bug
Package: Unknown/Other Function
Operating System: xp sp3
PHP Version: 5.2.14
Block user comment: N
Private report: N
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:
------------------------------------------------------------------------
[2010-11-18 06:22:33] richcem at 163 dot com
Description:
------------
echo 100-99.9; //0.099999999999994
Test script:
---------------
echo 100-99.9; //0.099999999999994
Expected result:
----------------
//exp : 0.1
echo 100-99.9; //0.099999999999994
Actual result:
--------------
0.099999999999994
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/bug.php?id=53337&edit=1