Mathematical functions in PHP

 
Post new topic   Reply to topic    Web Design Forum :: PHP Development
View previous topic :: View next topic  
Author Message
chetan1



Joined: 07 Apr 2008
Posts: 8

PostPosted: Thu May 01, 2008 5:52 am    Post subject: Mathematical functions in PHP Reply with quote
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.

?>
_________________
website design
Back to top
View user's profile Send private message
Post new topic   Reply to topic    Web Design Forum :: PHP Development All times are GMT
Page 1 of 1
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

Powered by phpbb