From: hart0550 at umn dot edu
Operating system: Linux
PHP version: 4.3.4
PHP Bug Type: Math related
Bug description: Invalid Calculation: 90.99-90.00 = 0.98999999999999 ... when it
should be 0.99
Description:
------------
When calculating 90.99 minus 90.00 it returns 0.98999999999999 which is a
bit big for a simple subtraction of two floats that only have 2 decimal
numbers.
Reproduce code:
---------------
<?php
$calc = 90.99 - 90.00;
print $calc;
?>
Expected result:
----------------
.99
Actual result:
--------------
0.98999999999999
--
Edit bug report at http://bugs.php.net/?id=28536&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=28536&r=trysnapshot4
Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=28536&r=trysnapshot5
Fixed in CVS: http://bugs.php.net/fix.php?id=28536&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=28536&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=28536&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=28536&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=28536&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=28536&r=support
Expected behavior: http://bugs.php.net/fix.php?id=28536&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=28536&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=28536&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=28536&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=28536&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=28536&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=28536&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=28536&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=28536&r=float