3.311. __nv_sqrtf

float @__nv_sqrtf(float %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_sqrtf( \(\pm 0\) ) returns \(\pm 0\).

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

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