Syntax | #include <math.h> double pow(double x, double y); | |
These functions compute the value xy. x is the base of the exponential function (a floating-point number). y is the exponent (also a floating-point number). If x is 0, y must be positive; | ||
Return val. | Value of xy | if x, y and the result lie in the permitted floating-point interval. |
|
| depending on the function type and the sign of x, if an overflow occurs. |
| 1.0 | if x and y are both 0. |
|
| depending on the function type, if x is 0 and y is less than 0. |
| undefined | if x is less than 0 and y is not an integer. |
Errors |
| |
| The value of x is negative, and y is not an integer. The value of x is 0, and y is negative. | |
| The value of x would cause an overflow. | |
See also |
|