note 97233 added to function.bcdiv

From: Date: Fri, 09 Apr 2010 11:05:54 +0000
Subject: note 97233 added to function.bcdiv
Groups: php.notes 
Request: Send a blank email to php-notes+get-168067@lists.php.net to get a copy of this message
Add to the code of the first post: if you don't use the scale argument, the Round() function is to be replaced by Floor(), or else bcdiv(3,2,0) will return 2 -------------- if( !function_exists( "bcdiv" ) ) { function bcdiv( $first, $second ) { $res = $first / $second; return floor( $res ); } } --------------------- ---- Server IP: 89.31.146.176 Probable Submitter: 82.238.139.180 ---- Manual Page -- http://www.php.net/manual/en/function.bcdiv.php Edit -- https://master.php.net/note/edit/97233 Del: integrated -- https://master.php.net/note/delete/97233/integrated Del: useless -- https://master.php.net/note/delete/97233/useless Del: bad code -- https://master.php.net/note/delete/97233/bad+code Del: spam -- https://master.php.net/note/delete/97233/spam Del: non-english -- https://master.php.net/note/delete/97233/non-english Del: in docs -- https://master.php.net/note/delete/97233/in+docs Del: other reasons-- https://master.php.net/note/delete/97233 Reject -- https://master.php.net/note/reject/97233 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#168067) next »