3.269. __nv_powf

float @__nv_powf(float %x, float %y)

Calculate the value of first argument to the power of second argument.

Calculate the value of x to the power of y

Note

For accuracy information, see the CUDA C++ Programming Guide, Mathematical Functions Appendix, Single-Precision Floating-Point Functions section.

Returns

  • __nv_powf( \(\pm 0\) , y) returns \(\pm \infty\) for y an integer less than 0.

  • __nv_powf( \(\pm 0\) , y) returns \(\pm 0\) for y an odd integer greater than 0.

  • __nv_powf( \(\pm 0\) , y) returns +0 for y > 0 and not and odd integer.

  • __nv_powf(-1, \(\pm \infty\) ) returns 1.

  • __nv_powf(+1, y) returns 1 for any y, even a NaN.

  • __nv_powf(x, \(\pm 0\) ) returns 1 for any x, even a NaN.

  • __nv_powf(x, y) returns a NaN for finite x < 0 and finite non-integer y.

  • __nv_powf(x, \(-\infty\) ) returns \(+\infty\) for \(| x | < 1\).

  • __nv_powf(x, \(-\infty\) ) returns +0 for \(| x | > 1\).

  • __nv_powf(x, \(+\infty\) ) returns +0 for \(| x | < 1\).

  • __nv_powf(x, \(+\infty\) ) returns \(+\infty\) for \(| x | > 1\).

  • __nv_powf( \(-\infty\) , y) returns -0 for y an odd integer less than 0.

  • __nv_powf( \(-\infty\) , y) returns +0 for y < 0 and not an odd integer.

  • __nv_powf( \(-\infty\) , y) returns \(-\infty\) for y an odd integer greater than 0.

  • __nv_powf( \(-\infty\) , y) returns \(+\infty\) for y > 0 and not an odd integer.

  • __nv_powf( \(+\infty\) , y) returns +0 for y < 0.

  • __nv_powf( \(+\infty\) , y) returns \(+\infty\) for y > 0.