Calculate the inverse modulo m

Josef Lechner shared this question 3 years ago
Answered

Is there a command to calculate the inverse of r modulo m?

Example: Such a command ( let's call it invmod() ) should work in the following way invmod(12,53) -> 31.


Best regards,

Josef Lechner.

Comments (3)

photo
1

you can use the definition try Element(KeepIf(Mod(a, 53) ≟ 1, a, 12Sequence(53)) / 12, 1)

photo
1

you can do a custom tool also

photo
1

Thanks for your quick answer. That's nice, but it's a like a work-around, I' m looking rather for a straigt-forward command which would be very useful if implemented.

Comments have been locked on this page!

© 2021 International GeoGebra Institute