Would someone care to explain the challenges in this question? Particularly the corner cases. Power of 0 gives a 1 is straight forward.
It is straight forward as well (or I think so anyway) to divide the power and keep multiplying till we reach the answer multiplying with x, whilst keeping the extra odd number in mind.
I am more interested in the overflows and the case where n < 0 or where we divide 1.0 / x .