Go to the first, previous, next, last section, table of contents.
#include <math.h> double pow(double x, double y);
This function computes x^y, x raised to the power y.
x raised to the power y. If the result overflows a
double
or underflows, errno
is set to ERANGE
. If
y is NaN
, the return value is NaN
and errno
is set to EDOM
. If x and y are both 0, the return
value is 1, but errno
is set to EDOM
. If y is a
positive or a negative Infinity, the following results are returned,
depending on the value of x:
NaN
and errno
is set to EDOM
.
+Inf
-Inf
-Inf
+Inf
+Inf
.
NaN
and errno
is set to EDOM
.
ANSI, POSIX
Go to the first, previous, next, last section, table of contents.