Added very basic math functions and tests.