On 10/13/2010 11:56 PM, gaojian wrote:
在 2010-10-13三的 22:48 -0700，Mattias Thorslund写道：
I'm having a problem with the behavior of the floor() function:
echo floor(327.03 * 100)."\n"; //prints "32702" and not "32703"!!
var_dump(327.03 * 100); //prints "float(32703)" as expected
Any ideas why this happens, and how to work around it?
i think u should read the manual about int and float:
Thanks, I guess I needed to read that again. What confused me here was
that var_dump(327.03 * 100) returns the expected value and not something
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php