note 68629 added to function.ceil

From: Date: Fri, 04 Aug 2006 00:31:58 +0000
Subject: note 68629 added to function.ceil
Groups: php.notes 
Request: Send a blank email to php-notes+get-115531@lists.php.net to get a copy of this message
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"; ?> ---- Server IP: 216.194.113.175 Probable Submitter: 64.81.161.160 ---- X-Spam-Status: No, hits=3.1 required=5.0 tests=DATE_MISSING,FROM_NO_LOWER autolearn=no version=2.64 ---- Manual Page -- http://www.php.net/manual/en/function.ceil.php Edit -- https://master.php.net/note/edit/68629 Del: integrated -- https://master.php.net/note/delete/68629/integrated Del: useless -- https://master.php.net/note/delete/68629/useless Del: bad code -- https://master.php.net/note/delete/68629/bad+code Del: spam -- https://master.php.net/note/delete/68629/spam Del: non-english -- https://master.php.net/note/delete/68629/non-english Del: in docs -- https://master.php.net/note/delete/68629/in+docs Del: other reasons-- https://master.php.net/note/delete/68629 Reject -- https://master.php.net/note/reject/68629 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#115531) next »