From:             [EMAIL PROTECTED]
Operating system: Linux
PHP version:      4.0.4pl1
PHP Bug Type:     Scripting Engine problem
Bug description:  Decrement Operator

I believe there is a problem with the decrement operator.

http://www.artemisgroup.com/test.php

$percentchange = .30;
while ($percentchange > -1){
  $percentchange -= .01;
  echo $percentchange;
}

zero is returned as -1.422473250301E-16 and 0.01 is returned as 0.0099999999999999. 
This seems incorrect to me.

Thanks


-- 
Edit Bug report at: http://bugs.php.net/?id=9843&edit=1



-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to