Calculate the power of a base raised to an exponent.