View Single Post
  #41 (permalink)  
Old 04-23-2008, 11:49 PM
Jeyaseelansarc Jeyaseelansarc is offline
D-Web Genius
 
Join Date: Mar 2007
Location: Chennai
Posts: 1,162
Jeyaseelansarc is on a distinguished road
Send a message via AIM to Jeyaseelansarc
Default Re: Mathematical functions in PHP

The following two statements are functionally identical. The bcpowmod() version however, executes in less time and can accept larger parameters.

PHP Code:
<?php
$a 
bcpowmod($x$y$mod);

$b bcmod(bcpow($x$y), $mod);

// $a and $b are equal to each other. 

?>
__________________
With,
J. Jeyaseelan

Everything Possible
Reply With Quote
Sponsored Links