From: choikh at oms dot cc Operating system: window, linux PHP version: 4.3.4 PHP Bug Type: *General Issues Bug description: 0.1 - 01 = -2.77555756156E-017
Description:
------------
bug sample
<?
$tot = 0.3;
for($i=0;$i < 3; $i++)
{
echo("==> $tot, ");
$tot -= 0.1;
echo("==> $tot<br>");
}
?>
result
==> 0.3, ==> 0.2
==> 0.2, ==> 0.1
==> 0.1, ==> -2.77555756156E-017
why ?
--
Edit bug report at http://bugs.php.net/?id=26954&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=26954&r=trysnapshot4
Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=26954&r=trysnapshot5
Fixed in CVS: http://bugs.php.net/fix.php?id=26954&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=26954&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=26954&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=26954&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=26954&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=26954&r=support
Expected behavior: http://bugs.php.net/fix.php?id=26954&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=26954&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=26954&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=26954&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=26954&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=26954&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=26954&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=26954&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=26954&r=float
