Bug #12615 Updated: Integer?
| From: | phildriscoll@php.net | Date: | Tue, 07 Aug 2001 13:22:30 +0000 |
| Subject: | Bug #12615 Updated: Integer? | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-62411@lists.php.net to get a copy of this message | ||
ID: 12615
Updated by: phildriscoll
Reported By: stjepan@novi-arcus.hr
Old Status: Open
Status: Bogus
Bug Type: *General Issues
Operating System: Win2000
PHP Version: 4.0.5
New Comment:
Welcome to the world of floating point arithmetic on
computers. Internal binary representations cannot exactly
match the decimal values you require.
Previous Comments:
------------------------------------------------------------------------
[2001-08-07 06:48:13] stjepan@novi-arcus.hr
<?php
for ($i=1; $i<=10; $i+=0.01)
{
print "<br>$i";
}
?>
and the output look like ...
1
1.01
1.02
1.03
.
.
.
.
4.3
4.31
4.32
4.33
4.34
4.35
4.36
4.37
4.38
4.3899999999999
4.3999999999999
4.4099999999999
4.4199999999999
4.4299999999999
4.4399999999999
.
.
.
.
.
------------------------------------------------------------------------
Edit this bug report at http://bugs.php.net/?id=12615&edit=1