# Problem Definition

## Description

Implement [pow(x, n)](http://www.cplusplus.com/reference/valarray/pow/), which calculates *x* raised to the power *n* (x<sup>n</sup>).

**Example 1:**

Input: 2.00000, 10
Output: 1024.00000

**Example 2:**

Input: 2.10000, 3
Output: 9.26100

**Example 3:**

Input: 2.00000, -2
Output: 0.25000
Explanation: 2<sup>-2</sup> = 1/2<sup>2</sup> = 1/4 = 0.25

**Note:**

* -100.0 < x < 100.0
* *n* is a 32-bit signed integer, within the range [−2<sup>31</sup>, 2<sup>31</sup> − 1]

## Notes

1. [Geeks for geeks](http://www.geeksforgeeks.org/write-a-c-program-to-calculate-powxn/)
1. [SO post](https://stackoverflow.com/questions/101439/the-most-efficient-way-to-implement-an-integer-based-power-function-powint-int)
1. [SO](https://stackoverflow.com/questions/2177781/how-to-calculate-modulus-of-large-numbers)
1. [Career Cup](https://www.careercup.com/question?id=22767685)
1. [LeetCode discussion - Short and easy to understand solution](https://leetcode.com/problems/powx-n/discuss/19546/Short-and-easy-to-understand-solution)