Ask Your Question

Revision history [back]

There is a dedicated inverse_mod function.

Use it as follows:

sage: inverse_mod(55, 89)
34
sage: inverse_mod(19, 141)
52