Previous Up Next

5.36.11  Inverse in ℤ/pℤ: inv inverse or /

To compute the inverse of an integer n in ℤ/pℤ, input 1/n%p or inv(n%p) or inverse(n%p).
Input:

inv(3%13)

Output:

-4%13

Indeed 3×−4=−12=1 (mod 13).


Previous Up Next