note 68629 deleted from function.ceil by betz
| From: | betz@php.net | Date: | Tue, 08 Aug 2006 11:03:49 +0000 |
| Subject: | note 68629 deleted from function.ceil by betz | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-115632@lists.php.net to get a copy of this message | ||
Note Submitter: xris(a)forevermore*net
----
I just got bitten by a php floating point precision bug and ceil(). See the example below:
<?php
$x = 1.1 * 100;
echo "$x\\n", ceil($x), "\\n";
$x = 1.2 * 100;
echo "$x\\n", ceil($x), "\\n";
?>