Package de.tilman_neumann.jml.modular
Class ModularPower
java.lang.Object
de.tilman_neumann.jml.modular.ModularPower
public class ModularPower
extends java.lang.Object
Modular power.
-
Constructor Summary
Constructors Constructor Description ModularPower()
-
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
ModularPower
public ModularPower()
-
-
Method Details
-
modPow
public int modPow(java.math.BigInteger a, int b, int c)Computes a^b (mod c) fora
BigInteger,b, c
int. Very fast.- Parameters:
a
-b
-c
-- Returns:
- a^b (mod c)
-
modPow
public int modPow(int a, int b, int c)Computes a^b (mod c) for all-int arguments. Very fast.- Parameters:
a
-b
-c
-- Returns:
- a^b (mod c)
-