#21266 [Opn->Bgs]: ceil() misbehaviour
| From: | derick@php.net | Date: | Sun, 29 Dec 2002 15:36:46 +0000 |
| Subject: | #21266 [Opn->Bgs]: ceil() misbehaviour | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-28670@lists.php.net to get a copy of this message | ||
ID: 21266
Updated by: derick@php.net
Reported By: flying@dom.natm.ru
-Status: Open
+Status: Bogus
Bug Type: Scripting Engine problem
Operating System: All
PHP Version: 4.2.3
New Comment:
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to
report
a bug at http://bugs.php.net/how-to-report.php
Read up on the floating point type in the manual.
Derick
Previous Comments:
------------------------------------------------------------------------
[2002-12-29 09:35:36] flying@dom.natm.ru
Please take a look at following example:
<?php
echo ceil(83.47 * 100 * 31);
echo ceil(83.47 * 31 * 100);
?>
For both for PHP 4.2.3 and 4.3.0 RC2, it gives me this result:
258757
258758
which is definitly breaks mathematical rules. Correct result should be
258757.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=21266&edit=1