Implement pow(x, n), which calculates x raised to the power n (i.e., x^n).
(-2) = 1/2^2 = 1/4 = 0.25Constraints: -100.0 < x < 100.0 · -2³¹ ≤ n ≤ 2³¹ - 1 · n is an integer
Computing x^n the obvious way means multiplying x by itself n times. How bad does that get? Drag the slider and find out.
Drag the slider to large exponents to feel the gap.