6.34.10 Computing an mod p: powmod powermod
For integers a,n and p, the powmod
finds an modp.
powermod is a synonym for powmod.
-
powmod takes three arguments:
a,n and p, integers.
- powmod(a,n,p)
returns an mod p in [0,p−1].
Examples.
-
Input:
powmod(5,2,13)
Output:
- Input:
powmod(5,2,12)
Output: