Skip to content

PowerMod

Fast modular exponentiation — PowerMod[b, e, m] == Mod[b^e, m].

$ wo 'PowerMod[2, 10, 100]'
24

A unit-fraction exponent 1/n requests a modular n-th root.

$ wo 'PowerMod[5, 1/3, 11]'
3