PHP » PYTHON |
login |
register |
about
|
As per example:
print pow(x, y, modulus) If you want to take a string, like bcpowmod() in PHP: print pow(int(x), int(y), int(modulus)) bcpowmod(PHP 5) bcpowmod — Raise an arbitrary precision number to another, reduced by a specified modulus Description
string bcpowmod
( string $left_operand
, string $right_operand
, string $modulus
[, int $scale
] )
Use the fast-exponentiation method to raise left_operand to the power right_operand with respect to the modulus modulus . Parameters
Return ValuesReturns the result as a string, or NULL if modulus is 0. Notes
ExamplesThe following two statements are functionally identical. The bcpowmod() version however, executes in less time and can accept larger parameters.
<?php
|
more
Recently updated
more
Most requested
more
Last requests
|