|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #28536 Invalid Calculation: 90.99-90.00 = 0.98999999999999 ... when it should be 0.99
Submitted: 2004-05-26 22:04 UTC Modified: 2004-05-26 22:06 UTC
From: hart0550 at umn dot edu Assigned:
Status: Not a bug Package: Math related
PHP Version: 4.3.4 OS: Linux
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.
Block user comment
Status: Assign to:
Bug Type:
From: hart0550 at umn dot edu
New email:
PHP Version: OS:


 [2004-05-26 22:04 UTC] hart0550 at umn dot edu
When calculating 90.99 minus 90.00 it returns 0.98999999999999 which is a bit big for a simple subtraction of two floats that only have 2 decimal numbers.

Reproduce code:

	$calc = 90.99 - 90.00;
	print $calc;


Expected result:

Actual result:


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2004-05-26 22:06 UTC]
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at and the instructions on how to report
a bug at

Welcome to the world of floating point numbers.  This is 
how it works.
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Jul 20 23:01:28 2024 UTC