note 89875 added to function.bcscale

From: Date: Thu, 26 Mar 2009 19:48:29 +0000
Subject: note 89875 added to function.bcscale
Groups: php.notes 
Request: Send a blank email to php-notes+get-152489@lists.php.net to get a copy of this message
The below-mentioned zero-removing-funtion is quite superfluous, as rtrim($num, "0.") does the exact same thing: <?php bcscale(10); $res= bcdiv(10,8); printf("result = %s, %s\n", $res, rtrim($res,"0.")); // result = 1.2500000000, 1.25 $res= bcdiv(10,5); printf("result = %s, %s\n", $res, rtrim($res,"0.")); // result = 2.0000000000, 2 ?> No need to reinvent the corkscrew :) Barklund ---- Server IP: 87.54.44.10 Probable Submitter: 80.167.88.218 ---- Manual Page -- http://www.php.net/manual/en/function.bcscale.php Edit -- https://master.php.net/note/edit/89875 Del: integrated -- https://master.php.net/note/delete/89875/integrated Del: useless -- https://master.php.net/note/delete/89875/useless Del: bad code -- https://master.php.net/note/delete/89875/bad+code Del: spam -- https://master.php.net/note/delete/89875/spam Del: non-english -- https://master.php.net/note/delete/89875/non-english Del: in docs -- https://master.php.net/note/delete/89875/in+docs Del: other reasons-- https://master.php.net/note/delete/89875 Reject -- https://master.php.net/note/reject/89875 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#152489) next »