How to calculate the Modular multiplicative inverse in pari?

903 Views Asked by At

The modular multiplicative inverse is an integer ‘x’ such that.

a x ≡ 1 (mod m).

So, is there any way to calculate the Modular multiplicative inverse in pari\gp calculator ?

I am really sorry if this question is trivial or duplicated.

1

There are 1 best solutions below

1
On BEST ANSWER

Just Mod(1/a, m), where a and m are your relatively prime numbers. See example for a = 3 and m = 1133 below.

lift(Mod(1/3, 1133))
> 378