3.310. __nv_sqrt

double @__nv_sqrt(double %x)

Calculate the square root of the input argument.

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

Note

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

Returns

Returns \(\sqrt{x}\).

  • __nv_sqrt( \(\pm 0\) ) returns \(\pm 0\).

  • __nv_sqrt( \(+\infty\) ) returns \(+\infty\).

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