Add snippet to compute modular inverse