php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #4974 error in handling garbage value..
Submitted: 2000-06-12 11:17 UTC Modified: 2000-06-12 11:21 UTC
From: refract at dreamwiz dot com Assigned:
Status: Closed Package: Other
PHP Version: 4.0.0 Release OS: Windows2000
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: refract at dreamwiz dot com
New email:
PHP Version: OS:

 

 [2000-06-12 11:17 UTC] refract at dreamwiz dot com
echo "echo (0.04-0.03-0.01); ===>";
echo (0.04-0.03-0.01);
echo "<BR>\n";
echo "echo (0.03-0.01-0.01-0.01); ===>";
echo (0.03-0.01-0.01-0.01);
echo "<BR>\n";
-------------------------------------------
output

echo (0.04-0.03-0.01); ===>1.7347234759768E-018
echo (0.03-0.01-0.01-0.01); ===>-3.4694469519536E-018
-------------------------------------------
This bug was reported in PHP 3.0 ...
but, still exist in PHP 4.0


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-06-12 11:21 UTC] stas at cvs dot php dot net
this is not a bug, this is how computers handle floating point numbers.
There's no "equals" in computer floating point numbers. Everything is "more or less close to".
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Wed Jul 02 02:01:38 2025 UTC