|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #14796 error in calculating with minus
Submitted: 2002-01-02 07:20 UTC Modified: 2002-01-02 10:13 UTC
From: olimac at sixworx dot de Assigned:
Status: Not a bug Package: Math related
PHP Version: 4.1.0 OS: suse linux 7.1
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
Solve the problem:
10 + 16 = ?
Subscribe to this entry?

 [2002-01-02 07:20 UTC] olimac at sixworx dot de
php allways returns after echo 166.3 - 166.6;


but the right result is -0.3

is there a fix for this problem?




Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2002-01-02 07:30 UTC]
Its tested with 4.1.1

I tested with 
128.1 - 128.0

I think this error just occours if the result >1.0 and the numbers >=128.0.

 [2002-01-02 07:38 UTC]
floating point numbers are not exact. see
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Feb 26 08:01:27 2024 UTC