note 111746 added to function.round

From: Date: Sun, 24 Mar 2013 01:31:44 +0000
Subject: note 111746 added to function.round
Groups: php.notes 
Request: Send a blank email to php-notes+get-194187@lists.php.net to get a copy of this message
Note that the returned string does not always include as many decimal digits as required by the precision argument. It is because the least significant decimal digit(s) is (are) not reported if it is (they are) 0. So: <?php round(1.105,2); // returns 1.11 ?> but: <?php round(1.104,2); // returns 1.1 instead of 1.10 ?> More: <?php round(1.004,2); // returns 1 (even the decimal point is not reported) ?> ---- Server IP: 69.147.83.199 Probable Submitter: 92.145.183.19 ---- Manual Page -- http://php.net/manual/en/function.round.php Edit -- https://master.php.net/note/edit/111746 Del: integrated -- https://master.php.net/note/delete/111746/integrated Del: useless -- https://master.php.net/note/delete/111746/useless Del: bad code -- https://master.php.net/note/delete/111746/bad+code Del: spam -- https://master.php.net/note/delete/111746/spam Del: non-english -- https://master.php.net/note/delete/111746/non-english Del: in docs -- https://master.php.net/note/delete/111746/in+docs Del: other reasons-- https://master.php.net/note/delete/111746 Reject -- https://master.php.net/note/reject/111746 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#194187) next »