Synopsis
double pow(double x,
           double y);
Description

pow computes x raised to the power y.

If x < 0 and y ≤ 0, errno is set to EDOM and pow returns −HUGE_VAL. If x ≤ 0 and y is not an integer value, errno is set to EDOM and pow returns −HUGE_VAL.

If y = 0, pow returns 1.
If y = 1, pow returns x.
If y = NaN, pow returns NaN.
If x = NaN and y is anything other than 0, pow returns NaN.
If x < −1 or 1 < x, and y = +∞, pow returns +∞.
If x < −1 or 1 < x, and y = −∞, pow returns 0.
If −1 < x < 1 and y = +∞, pow returns +0.
If −1 < x < 1 and y = −∞, pow returns +∞.
If x = +1 or x = −1 and y = +∞ or y = −∞, pow returns NaN.
If x = +0 and y > 0 and y ≠ NaN, pow returns +0.
If x = −0 and y > 0 and y ≠ NaN or y not an odd integer, pow returns +0.
If x = +0 and y and y ≠ NaN, pow returns +∞.
If x = −0 and y > 0 and y ≠ NaN or y not an odd integer, pow returns +∞.
If x = −0 and y is an odd integer, pow returns −0.
If x = +∞ and y > 0 and y ≠ NaN, pow returns +∞.
If x = +∞ and y < 0 and y ≠ NaN, pow returns +0.
If x = −∞, pow returns pow(−0, y)
If x < 0 and x ≠ ∞ and y is a non-integer, pow returns NaN.