Re: [PHP] Unexpected result in floor function

2003-11-17 Thread Marek Kilimajer
ruben wrote: Hi: Why is the "floor" function returning 27564 instead of 27565 in this script? PHP version is 4.2.2. Thanks! Ruben. #!/usr/bin/php -q $b = 275.65 * 100; $b = (int)$b; /* $b was a floating point number with value something like 27564.989, when displayed it shows correctly

Re: [PHP] Unexpected result in floor function

2003-11-17 Thread Randal Neirynck
- Original Message - From: "ruben" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, November 17, 2003 1:52 PM Subject: [PHP] Unexpected result in floor function > Hi: > > Why is the "floor" function returning 27564 instead of 27565 in this &

[PHP] Unexpected result in floor function

2003-11-17 Thread ruben
Hi: Why is the "floor" function returning 27564 instead of 27565 in this script? PHP version is 4.2.2. Thanks! Ruben. #!/usr/bin/php -q $b = 275.65 * 100; echo "\n\nb= ".$b; echo "\nfloor(b)= ".floor($b);// Incorrect. why 27564? $b = 27565; echo "\n\nb= ".$b; echo "\nfloor(b)= ".floor($