Compute a^b mod m efficiently using the binary exponentiation (square-and-multiply) algorithm. Handles very large exponents.
Compute a^b mod m efficiently using the binary exponentiation (square-and-multiply) algorithm. Handles very large exponents.
The base of the exponentiation
The exponent (can be very large)
The modulus (must be positive)
Uses repeated squaring: compute the result bit by bit from the binary representation of the exponent b.
How this calculator works
Uses repeated squaring: compute the result bit by bit from the binary representation of the exponent b.
Common questions about this calculator