|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #41240 numbers bugs
Submitted: 2007-04-30 11:50 UTC Modified: 2007-04-30 12:01 UTC
From: webmaster at cashoclic dot fr Assigned:
Status: Not a bug Package: *Math Functions
PHP Version: 5.2.1 OS: windowsxp
Private report: No CVE-ID: None
 [2007-04-30 11:50 UTC] webmaster at cashoclic dot fr

Here is the bug
i don't understand why

Reproduce code:
echo 100-99.99;

Expected result:

Actual result:


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2007-04-30 11:53 UTC]
Floating point values have a limited precision. Hence a value might 
not have the same string representation after any processing. That also
includes writing a floating point value in your script and directly 
printing it without any mathematical operations.

If you would like to know more about "floats" and what IEEE
754 is read this:
Thank you for your interest in PHP.

 [2007-04-30 12:01 UTC] webmaster at cashoclic dot fr
i'm french and i havent understand your message. what can i do for the problem ?
Because if i do $a=100
and $b=99.99
and $c=$a-$b
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue May 21 14:01:33 2024 UTC