Raises a number to the specified exponent and returns the result.