Given a number x and an integer n, compute x raised to the power n. This is the canonical fast exponentiation problem and the basis for many modular and number-theory optimizations.
x = base, n = exponent
x raised to n
Example 1:
Input:
x = 2 n = 10
Output:
1024.0
Explanation:
2^10 = 1024.
Example 2:
Input:
x = 2.1 n = 3
Output:
9.261000000000001
Explanation:
2.1^3 = 9.261.