3.259. __nv_norm4d

double @__nv_norm4d(double %a, double %b, double %c, double %d)

Calculate the square root of the sum of squares of four coordinates of argument.

Calculate the length of four dimensional vector p in euclidean space undue overflow or underflow.

Note

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

Returns

Returns the length of the 4D vector \(\sqrt{p.x^2+p.y^2+p.z^2+p.t^2}\). If the correct value would overflow, returns \(+\infty\). If the correct value would underflow, returns 0.