3.281. __nv_rhypotf

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

Calculate the reciprocal square root of the sum of squares of two arguments.

Calculate the reciprocal length of the hypotenuse of a right triangle whose two sides have lengths x and y without undue overflow or underflow.

Note

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

Returns

Returns inverted length of the hypotenuse \(\frac{1}{\sqrt{x^2+y^2}}\). If the correct value would overflow, returns \(+\infty\) If the correct value would underflow, returns 0.