Bug #16551: ceil results -0

From: Date: Thu, 11 Apr 2002 13:38:06 +0000
Subject: Bug #16551: ceil results -0
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-4656@lists.php.net to get a copy of this message
From:             alberty@neptunelabs.de
Operating system: i686-pc-linux-gnu
PHP version:      4.0CVS-2002-04-11
PHP Bug Type:     Variables related
Bug description:  ceil results -0

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 bug report at http://bugs.php.net/?id=16551&edit=1
-- 
Fixed in CVS:        http://bugs.php.net/fix.php?id=16551&r=fixedcvs
Fixed in release:    http://bugs.php.net/fix.php?id=16551&r=alreadyfixed
Need backtrace:      http://bugs.php.net/fix.php?id=16551&r=needtrace
Try newer version:   http://bugs.php.net/fix.php?id=16551&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=16551&r=support
Expected behavior:   http://bugs.php.net/fix.php?id=16551&r=notwrong
Not enough info:     http://bugs.php.net/fix.php?id=16551&r=notenoughinfo
Submitted twice:     http://bugs.php.net/fix.php?id=16551&r=submittedtwice



Thread (6 messages)

« previous php.bugs (#4656) next »