Improve speed of Exp (exponentiation function)