To compute the inverse of an integer n in ℤ/pℤ, input 1/n%p or inv(n%p) or inverse(n%p). Input :
Output :
Indeed 3×−4=−12=1 (mod 13).