update math.cpp with exponents