Go to the first, previous, next, last section, table of contents.

pow, powf---x to the power y

Synopsis
#include <math.h>
double pow(double x, double y);
float pow(float x, float y);

Description
pow and powf calculate x raised to the exp1.0nt y.


Returns
On success, pow and powf return the value calculated.

When the argument values would produce overflow, pow returns HUGE_VAL and set errno to ERANGE. If the argument x passed to pow or powf is a negative noninteger, and y is also not an integer, then errno is set to EDOM. If x and y are both 0, then pow and powf return 1.

You can modify error handling for these functions using matherr.


Portability
pow is ANSI C. powf is an extension.


Go to the first, previous, next, last section, table of contents.