maths.modular_exponential

Modular Exponential. Modular exponentiation is a type of exponentiation performed over a modulus. For more explanation, please check https://en.wikipedia.org/wiki/Modular_exponentiation

Functions

main()

Call Modular Exponential Function.

modular_exponential(base, power, mod)

Module Contents

maths.modular_exponential.main()

Call Modular Exponential Function.

maths.modular_exponential.modular_exponential(base: int, power: int, mod: int)
>>> modular_exponential(5, 0, 10)
1
>>> modular_exponential(2, 8, 7)
4
>>> modular_exponential(3, -2, 9)
-1