Synopsis
#include <math.h>
float powf(float x, float y);
Description

powf computes x raised to the power y.

Fast math library behavior

If x < 0 and y <= 0, errno is set to EDOM and powf returns -HUGE_VALF.
If x <= 0 and y is not an integer value, errno is set to EDOM and pow returns -HUGE_VALF.

IEC 60559 math library behavior

If y = 0, powf returns 1.
If y =1, powf returns x.
If y = NaN, powf returns NaN.
If x = NaN and y is anything other than 0, powf returns NaN.
If x < -1 or 1 < x, and y = +?, powf returns +?.
If x < -1 or 1 < x, and y =-?, powf returns 0.
If -1 < x < 1 and y = +?, powf returns +0.
If -1 < x < 1 and y = -?, powf returns +?.
If x = +1 or x = -1 and y = +? or y = -?, powf returns NaN.
If x = +0 and y > 0 and y <> NaN, powf returns +0.
If x = -0 and y > 0 and y <> NaN or y not an odd integer, powf returns +0.
If x = +0 and y <0 and y <> NaN, powf returns +?.
If x = -0 and y > 0 and y <> NaN or y not an odd integer, powf returns +?.
If x = -0 and y is an odd integer, powf returns -0.
If x = +? and y > 0 and y <> NaN, powf returns +?.
If x = +? and y < 0 and y <> NaN, powf returns +0.
If x = -?, powf returns powf(-0, y)
If x < 0 and x <> ? and y is a non-integer, powf returns NaN.

Portability

powf conforms to ISO/IEC 9899:1990 (C90) and ISO/IEC 9899:1999 (C99).