Unit test for fast math functions