calculate the raising of the base and the exponent