ID:               24891
 Updated by:       [EMAIL PROTECTED]
 Reported By:      jeff at tmtrading dot com
-Status:           Open
+Status:           Bogus
 Bug Type:         Scripting Engine problem
 Operating System: Win2000 & RH Linux 8.0
 PHP Version:      4CVS-2003-07-31 (stable)
 New Comment:

RTFM:

http://fi2.php.net/manual/en/language.types.float.php


Previous Comments:
------------------------------------------------------------------------

[2003-07-31 13:32:22] jeff at tmtrading dot com

Description:
------------
When I try to test equality using these numbers php incorrectly returns
false.  This is a serious problem as we are developing a e-cart in php.

Reproduce code:
---------------
$all = 0.92;
$asum = 0.71;
$bsum = 0.21;

if($all == ($asum + $bsum)) {
   print "TRUE\n";
} else {
   print "FALSE\n";
}


Expected result:
----------------
TRUE

Actual result:
--------------
FALSE


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=24891&edit=1

Reply via email to