#19398 [NEW]: mathmatical errors, especially after string conversions
| From: | jeffb at umci dot com | Date: | Sat, 14 Sep 2002 01:03:14 +0000 |
| Subject: | #19398 [NEW]: mathmatical errors, especially after string conversions | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-19328@lists.php.net to get a copy of this message | ||
From: jeffb@umci.com
Operating system: Redhat 7.3
PHP version: 4.2.2
PHP Bug Type: Scripting Engine problem
Bug description: mathmatical errors, especially after string conversions
The script below produces a lot of output on two of
our systems. One a 6 cpu ppro, the other a single
cpu duron 950. Both boxes run redhat 7.3. One runs the
php that came with redhat 7.3, the 6 cpu box runs php
4.2.2 that we compiled ourselves to add more options.
For sample output of this script, with a phpinfo() call
appended to it, go to:
http://www.umci.com/testcode.phtml
<?
$start=0.01;
while ($start <= 10) {
// Removing the quotes from test's assignment will eliminate the
// errors unless you uncomment the ++/-- down a fiew lines.
$test="$start";
$test2=$start;
/////////////////////////////////////////////////////////////////
// Uncommenting these two lines accentuates the problem a bit...
/////////////////////////////////////////////////////////////////
//$test++;
//$test--;
if ($test!=$test2)
echo "Comparison Result: \"$test\" != \"$test2\" ----- Shouldn't this
be
true?<br>";
$start = $start + 0.01;
}
?>
--
Edit bug report at http://bugs.php.net/?id=19398&edit=1
--
Try a CVS snapshot: http://bugs.php.net/fix.php?id=19398&r=trysnapshot
Fixed in CVS: http://bugs.php.net/fix.php?id=19398&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=19398&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=19398&r=needtrace
Try newer version: http://bugs.php.net/fix.php?id=19398&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=19398&r=support
Expected behavior: http://bugs.php.net/fix.php?id=19398&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=19398&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=19398&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=19398&r=globals