Next: vrd2_sin, Previous: vrs4_powxf, Up: Vector
This routine accepts an array of single precision input x values and one single precision input y value, computes x^y for each x input value, and stores the result in the array pointed to by the z pointer input. It is the responsibility of the calling program to allocate/deallocate enough storage for the output array.
This is a relaxed version of powf, suitable for use with fastmath compiler flags or applications not requiring full error handling. Denormal inputs may produce unpredictable results. Special case inputs produce C99 return values. The routine is accurate to better than 0.5 ulp over the valid input range.
Input x | Input y | Output
|
+/- 0 | y<0, odd integer | +/- infinity
|
+/- 0 | y<0, not odd integer | +infinity
|
+/- 0 | y>0, odd integer | +/- 0
|
+/- 0 | y>0, not odd integer | +0
|
-1 | +infinity | 1
|
+1 | y (incl. NaN) | 1
|
x (incl. Nan) | +/- 0 | 1
|
x<0 | y, not integer | QNaN
|
|x|<1 | -infinity | +infinity
|
|x|>1 | -infinity | +0
|
|x|<1 | +infinity | +0
|
|x|>1 | +infinity | +infinity
|
-infinity | y<0, odd integer | -0
|
-infinity | y<0, not odd integer | +0
|
-infinity | y>0, odd integer | -infinity
|
-infinity | y>0, not odd integer | +infinity
|
+infinity | y<0, | +0
|
+infinity | y>0, | +infinity
|
NaN | y nonzero, | NaN
|
x<>1 | NaN, | NaN
|