3.292. __nv_rsqrt

double @__nv_rsqrt(double %x)

Calculate the reciprocal of the square root of the input argument.

Calculate the reciprocal of the nonnegative square root of x, \(1/\sqrt{x}\).

Note

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

Returns

Returns \(1/\sqrt{x}\).

  • __nv_rsqrt( \(+\infty\) ) returns +0.

  • __nv_rsqrt( \(\pm 0\) ) returns \(\pm \infty\).

  • __nv_rsqrt(x) returns NaN if x is less than 0.