Improved test coverage of MathLib.