function Calculator::modPow
Raises a number into power with modulo.
Parameters
string $base The base number; must be positive or zero.:
string $exp The exponent; must be positive or zero.:
string $mod The modulus; must be strictly positive.:
3 methods override Calculator::modPow()
- BcMathCalculator::modPow in vendor/
brick/ math/ src/ Internal/ Calculator/ BcMathCalculator.php - Raises a number into power with modulo.
- GmpCalculator::modPow in vendor/
brick/ math/ src/ Internal/ Calculator/ GmpCalculator.php - Raises a number into power with modulo.
- NativeCalculator::modPow in vendor/
brick/ math/ src/ Internal/ Calculator/ NativeCalculator.php - Algorithm from: https://www.geeksforgeeks.org/modular-exponentiation-power-in-modular-a…
File
-
vendor/
brick/ math/ src/ Internal/ Calculator.php, line 261
Class
- Calculator
- Performs basic operations on arbitrary size integers.
Namespace
Brick\Math\InternalCode
public abstract function modPow(string $base, string $exp, string $mod) : string;