note 70204 added to function.round

From: Date: Fri, 06 Oct 2006 16:36:29 +0000
Subject: note 70204 added to function.round
Groups: php.notes 
Request: Send a blank email to php-notes+get-118134@lists.php.net to get a copy of this message
In reply to Mr. Pet Gerbil, I think you're wrong when you state "Your calculations are slightly incorrect." My calculations do take into account when the thousandth's digit is a 5. I ran your function and mine side-by-side and got the same results. However, I found your string-based method to be interesting and it runs faster than my code in testing. It would need some adjustment to allow the user to specify the number of decimal places. My function does not assume the user wants to round to two decimal places, though that likely is what the user will want. ---- Server IP: 64.71.164.2 Probable Submitter: 64.139.226.212 ---- Manual Page -- http://www.php.net/manual/en/function.round.php Edit -- https://master.php.net/note/edit/70204 Del: integrated -- https://master.php.net/note/delete/70204/integrated Del: useless -- https://master.php.net/note/delete/70204/useless Del: bad code -- https://master.php.net/note/delete/70204/bad+code Del: spam -- https://master.php.net/note/delete/70204/spam Del: non-english -- https://master.php.net/note/delete/70204/non-english Del: in docs -- https://master.php.net/note/delete/70204/in+docs Del: other reasons-- https://master.php.net/note/delete/70204 Reject -- https://master.php.net/note/reject/70204 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#118134) next »