Modular inverse

From Wikipedia: In modular arithmetic, the modular multiplicative inverse of an integer a modulo m is an integer x such that...

Rosetta Code