Implemented modular inverse
Merge pull request #295 from gsingh93/modinv

Implemented modular inverse