PHP 4.0 Bug #4760 Updated: ceil() returns the same value as floor()
| From: | Bug Database | Date: | Thu, 01 Jun 2000 17:34:25 +0000 |
| Subject: | PHP 4.0 Bug #4760 Updated: ceil() returns the same value as floor() | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-19997@lists.php.net to get a copy of this message | ||
ID: 4760
User Update by: jakub.soucek@spika.cz
Status: Feedback
Bug Type: Misbehaving function
Description: ceil() returns the same value as floor()
You were right -
ceil("9,2") gives me correct result (10), ceil("9.2") gives me 9. So when I use
string parameter and choose correct decimal separator it works just fine. But it seems to me I
cannot use float constant assignment.
Let's have this:
$f = $j * $i;
and assign $i and $j to
$i = 2.4 2,4 "2.4" "2,4"
$j = 5.3 5,3 "5.3" "5,3"
ceil($f) 10 ERR 10 13
floor($f) 10 ERR 10 12
It probably is problem with the locale, but I must admit I am a bit confused. Or am I missing
something obvious?
Full Bug description available at: http://bugs.php.net/version4/?id=4760