Improved test coverage of MathLib.

This PR improves the test coverage of testing the MathLib to line coverage (99.3 %) and function coverage (100%).