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 this is not your bug, you can add a comment by following this link.
If this is your bug, but 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

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: Sun May 05 09:01:30 2024 UTC