Returns the first argument raised to the power of the second argument.
#include <math.h> double pow (double base, double exp);
| x | The result of the first argument raised to the power of the second. |
| 1.0 | Indicates that the base is zero and the exponent is zero. |
| HUGE_VAL | Indicates that the result overflowed; errno is set to ERANGE. |
| -HUGE_VAL | Indicates that the base is zero and the exponent is negative; errno is set to EDOM. |
#include <stdio.h>
#include <math.h>
main()
{
double x;
errno=0;
x = pow(-3.0, 2.0);
printf("%d, %f\n", errno, x);
}