Still wrong.  Reverting for now.
Tests on modular inverse and modular negation pass.