From:             gnz at amorfo dot com
Operating system: Windows/Linux
PHP version:      4.3.4
PHP Bug Type:     Math related
Bug description:  wrong sum result

Description:
------------
Hi, Im getting the wrong result performing a simple sum operation.
Ive been able to reproduce this on 
Windows with PHP 4.3.4
Windows with PHP 4.3.5 RC1
Linux with PHP 4.3.2


Reproduce code:
---------------
<?php 

$a = 10.95;
$b = 11;
$c = $b-$a;

echo $c;

?>


Expected result:
----------------
0.05

Actual result:
--------------
0.050000000000001

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

Reply via email to