cpp/numeric/math/hypot

@1-3@ Computes the square root of the sum of the squares of and, without undue overflow or underflow at intermediate stages of the computation. @4@ Computes the square root of the sum of the squares of, , and , without undue overflow or underflow at intermediate stages of the computation. @A,B@ Additional overloads are provided for all other combinations of arithmetic types.

The value computed by the two-argument version of this function is the length of the hypotenuse of a right-angled triangle with sides of length and, or the distance of the point  from the origin , or the magnitude of a complex number

The value computed by the three-argument version of this function is the distance of the point from the origin.

Return value
@1-3,A@ If no errors occur, the hypotenuse of a right-angled triangle,, is returned. @4,B@ If no errors occur, the distance from origin in 3D space,, is returned.

If a range error due to overflow occurs, huge_val,, or is returned.

If a range error due to underflow occurs, the correct result (after rounding) is returned.

Error handling
Errors are reported as specified in math_errhandling

If the implementation supports IEEE floating-point arithmetic (IEC 60559),
 * ,, and are equivalent
 * if one of the arguments is ±0, is equivalent to std called with the non-zero argument
 * if one of the arguments is ±∞, returns +∞ even if the other argument is NaN
 * otherwise, if any of the arguments is NaN, NaN is returned