Write a function that computes x raised to the power n, which means x multiplied by itself n times (written x^n). A negative n means 1 divided by x^(-n).
Round your answer to 5 decimal places. For example, 2.1^3 can come out as 9.261000000000001 on a computer, and you should give 9.26100. Decimal numbers are stored with tiny errors, and two correct programs may show different last digits. Rounding makes the check fair.
Examples
Example 1:
Input: x = 3.00000, n = 4
Output: 81.00000
Explanation: 3 x 3 x 3 x 3 = 81.
Example 2:
Input: x = 1.50000, n = 2
Output: 2.25000
Explanation: 1.5 x 1.5 = 2.25.
Example 3:
Input: x = 4.00000, n = -2
Output: 0.06250
Explanation: 4^-2 = 1 / 4^2 = 1 / 16 = 0.0625.