|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #15948 Basic Subtraction Error
Submitted: 2002-03-08 02:06 UTC Modified: 2002-03-08 02:36 UTC
From: abuckner at cicadadesign dot com Assigned:
Status: Not a bug Package: *Math Functions
PHP Version: 4.0.6 OS: Red Hat Linux 7.1
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: abuckner at cicadadesign dot com
New email:
PHP Version: OS:


 [2002-03-08 02:06 UTC] abuckner at cicadadesign dot com
This was submitted by one of our head developers.  We're using PHP/MySQL to build our customer relationship software, and this scares me.


The numbers should add to 0. When I echo the result I get the below:



echo 241.20 + 169.23 - 410.43;



Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2002-03-08 02:36 UTC]
This is actually not a bug, but a normal thing with floatingpoint numbers. If you want to do precise calculating, use cents, or decrease the precision in php.ini from 14 to something like 10.

PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Jul 22 15:01:29 2024 UTC