Implement a function that returns the exponential value of a number, computed as x to the power n.
Handle cases where n is zero, positive, or negative.
Precision of floating-point arithmetic should be maintained up to at least 5 decimal places.
Input: x = 10.00000, n = 2
Output: 100.00000
Input: x = 0.50000, n = 4
Output: 0.06250
Explanation:
0.5⁴ = 0.5 × 0.5 × 0.5 × 0.5 = 0.0625
Input: x = 3.00000, n = -2
Output: 0.11111
Explanation:
3⁻² = 1/9 ≈ 0.11111
Accepted:
Submission: