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
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
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

Add a Patch

Pull Requests

Add a Pull Request

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-2024 The PHP Group
All rights reserved.
Last updated: Tue Jun 18 03:01:31 2024 UTC