note 49912 deleted from function.bcpow by nlopess

From: Date: Fri, 11 Feb 2005 22:06:05 +0000
Subject: note 49912 deleted from function.bcpow by nlopess
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-84874@lists.php.net to get a copy of this message
Note Submitter: ---- Well, if bcpow has limits, then this should work: <?php function bcpow_($num, $power) { $awnser = "1"; while ($power) { $awnser = bcmul($awnser, $num, 100); $power = bcsub($power, "1"); } return rtrim($awnser, '0.'); } ?> Just that $power cannot have decimal digits in it.

« previous php.notes (#84874) next »