Hulu playback services may need to compute scaling factors such as a^b efficiently. Implement power(a, b) without using Python's built-in exponentiation functions, such as pow() or **.
Use binary exponentiation to reduce the number of multiplications. The exponent may be positive, zero, or negative.
a, a nonzero integer or floating-point base, and b, an integer exponent.a^b. Return 1 when b is 0. For a negative exponent, return the reciprocal of the corresponding positive power.def power(a, b):