From: sunofman at sympatico dot ca
Operating system: Windows XP
PHP version: 4.3.1
PHP Bug Type: Variables related
Bug description: Imcrementing by decimals leads to partial failure
$x = 0.0;
$y = 0.7;
do {
if ($x == $y) {
PRINT "found<br>";
} else {
PRINT "not found<br>";
}
$x += 0.1;
} while($x <= 1.0);
When $y is 0.0 to 0.7 everything works fine and it will find the
match...if you make $y = 0.8 or higher it will fail to find the match.
I'm using the basic install of 4.3.1 (it happens in older versions as
well)
--
Edit bug report at http://bugs.php.net/?id=22738&edit=1
--
Try a CVS snapshot: http://bugs.php.net/fix.php?id=22738&r=trysnapshot
Fixed in CVS: http://bugs.php.net/fix.php?id=22738&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=22738&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=22738&r=needtrace
Try newer version: http://bugs.php.net/fix.php?id=22738&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=22738&r=support
Expected behavior: http://bugs.php.net/fix.php?id=22738&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=22738&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=22738&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=22738&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=22738&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=22738&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=22738&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=22738&r=gnused