Contents|Index|Previous|Next

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. (That is, xy.)

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.

COMPLIANCE

pow is ANSI C. powf is an extension.