3.289. __nv_rnormf

float @__nv_rnormf(i32 %dim, float const* %a)

Calculate the reciprocal of square root of the sum of squares of any number of coordinates.

Calculates one over the length of vector p, dimension of which is passed as an agument, in euclidean space 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 one over the length of the vector \(\frac{1}{\sqrt{\sum_{i=1}^{dim} p_i^2}}\). If the square root would overflow, returns 0. If the square root would underflow, returns \(+\infty\).