pow


Power function

[Classification]

Mathematical library

[Syntax]

#include <math.h>

double pow(double x, double y);

[Return value]

Returns the yth power of x.

powf returns a negative solution only if x < 0 and y is an odd integer. If x < 0 and y is a non-integer or if x = y = 0, powf returns a Not a NaN and sets the macro EDOM for the global variable errno. If x = 0 and y < 0 or if an overflow occurs, powf returns +HUGE_VAL and sets the macro ERANGE for errno. If the solution vanished approaching zero, powf returns 0 and sets the macro ERANGE for errno. If the solution is a denormal number, powf sets the macro ERANGE for errno.

[Description]

This function calculates the yth power of x.