From:             skaltura at czmb dot net
Operating system: Linux 2.4.20, Trusted Debian 1.0
PHP version:      Irrelevant
PHP Bug Type:     Unknown/Other Function
Bug description:  PHP miscalculates!

Description:
------------
PHP does an miscalculation,
ie. (584.04 / 2) / 3.14 is not same as 93 (that calculation returns 93)

Reproduce code:
---------------
<?
$a = 93;
$b = 93;
$c = 584.04;
$d = ($c / 2) / 3.14;
if ($a == $b) { echo "a and b matches!\n"; }
if ($d == $a) { echo "d and a matches!\n"; }
echo "a's value is $a AND d's value is $d";
?>


Expected result:
----------------
a and b matches!
d and a matches!
a's value is 93 AND d's value is 93

Actual result:
--------------
a and b matches!
a's value is 93 AND d's value is 93

-- 
Edit bug report at http://bugs.php.net/?id=25157&edit=1
-- 
Try a CVS snapshot (php4):  http://bugs.php.net/fix.php?id=25157&r=trysnapshot4
Try a CVS snapshot (php5):  http://bugs.php.net/fix.php?id=25157&r=trysnapshot5
Fixed in CVS:               http://bugs.php.net/fix.php?id=25157&r=fixedcvs
Fixed in release:           http://bugs.php.net/fix.php?id=25157&r=alreadyfixed
Need backtrace:             http://bugs.php.net/fix.php?id=25157&r=needtrace
Try newer version:          http://bugs.php.net/fix.php?id=25157&r=oldversion
Not developer issue:        http://bugs.php.net/fix.php?id=25157&r=support
Expected behavior:          http://bugs.php.net/fix.php?id=25157&r=notwrong
Not enough info:            http://bugs.php.net/fix.php?id=25157&r=notenoughinfo
Submitted twice:            http://bugs.php.net/fix.php?id=25157&r=submittedtwice
register_globals:           http://bugs.php.net/fix.php?id=25157&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=25157&r=php3
Daylight Savings:           http://bugs.php.net/fix.php?id=25157&r=dst
IIS Stability:              http://bugs.php.net/fix.php?id=25157&r=isapi
Install GNU Sed:            http://bugs.php.net/fix.php?id=25157&r=gnused

Reply via email to