added MATH_TEST macro to simplify testing against cmath