Math functions unittests