Bug #16551 Updated: ceil results -0
| From: | derick@php.net | Date: | Wed, 24 Apr 2002 12:27:17 +0000 |
| Subject: | Bug #16551 Updated: ceil results -0 | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-5812@lists.php.net to get a copy of this message | ||
ID: 16551
Updated by: derick@php.net
Reported By: alberty@neptunelabs.de
-Status: Open
+Status: Bogus
Bug Type: Variables related
Operating System: i686-pc-linux-gnu
PHP Version: 4.0CVS-2002-04-11
New Comment:
This is expected behavior. ceil() and floor() return a float because of
the large range of supported numbers.
Derick
Previous Comments:
------------------------------------------------------------------------
[2002-04-24 08:24:51] alberty@neptunelabs.de
The problem is also affected on round().
<?php
$a=-0.1
echo round($a);
// results: -0
?>
Regards,
Steve
------------------------------------------------------------------------
[2002-04-11 09:38:05] alberty@neptunelabs.de
Hi,
the follow code results -0,
<?php
$a=ceil((1/16)-1);
echo $a;
?>
maybe, this is a convertion problem with float types.
also, why the ceil() command results a floating point number and not an
integer?
It makes sense when the ceil command accept a precision like
round()...
Regards,
Steve
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=16551&edit=1