note 84552 added to function.ceil

From: Date: Fri, 18 Jul 2008 14:52:02 +0000
Subject: note 84552 added to function.ceil
Groups: php.notes 
Request: Send a blank email to php-notes+get-141660@lists.php.net to get a copy of this message
@ InsideR() If you echo 100 * 0.005 the output is, and has always been 55. Try it yourself. I'm with Zariok, there is a definite problem with ceil(). It should be noted that when using ceil for simple numbers that you know are always going to return correctly, ceil is the way to go. But when you let the user input numbers or when you know you're dealing with numbers like 0.5500 for example you use a function like the below one as an alternative. ---- Server IP: 203.88.112.190 Probable Submitter: 61.68.231.217 ---- Manual Page -- http://www.php.net/manual/en/function.ceil.php Edit -- https://master.php.net/note/edit/84552 Del: integrated -- https://master.php.net/note/delete/84552/integrated Del: useless -- https://master.php.net/note/delete/84552/useless Del: bad code -- https://master.php.net/note/delete/84552/bad+code Del: spam -- https://master.php.net/note/delete/84552/spam Del: non-english -- https://master.php.net/note/delete/84552/non-english Del: in docs -- https://master.php.net/note/delete/84552/in+docs Del: other reasons-- https://master.php.net/note/delete/84552 Reject -- https://master.php.net/note/reject/84552 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#141660) next »