note 85084 added to ref.bc

From: Date: Thu, 14 Aug 2008 05:04:55 +0000
Subject: note 85084 added to ref.bc
Groups: php.notes 
Request: Send a blank email to php-notes+get-143481@lists.php.net to get a copy of this message
Function to round bc string: function bcround($strval, $precision = 0) { if (false !== ($pos = strpos($strval, '.')) && (strlen($strval) - $pos - 1) > $precision) { $zeros = str_repeat("0", $precision); return bcadd($strval, "0.{$zeros}5", $precision); } else { return $strval; } } ---- Server IP: 69.147.83.197 Probable Submitter: 152.118.24.10 (proxied: 152.118.37.78) ---- Manual Page -- http://www.php.net/manual/en/ref.bc.php Edit -- https://master.php.net/note/edit/85084 Del: integrated -- https://master.php.net/note/delete/85084/integrated Del: useless -- https://master.php.net/note/delete/85084/useless Del: bad code -- https://master.php.net/note/delete/85084/bad+code Del: spam -- https://master.php.net/note/delete/85084/spam Del: non-english -- https://master.php.net/note/delete/85084/non-english Del: in docs -- https://master.php.net/note/delete/85084/in+docs Del: other reasons-- https://master.php.net/note/delete/85084 Reject -- https://master.php.net/note/reject/85084 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#143481) next »