Add tests for integer modulus.
Use integer modulus/division operators
Add software versions of these functions.