HYPOT(3) Library Functions Manual HYPOT(3)

hypoteuclidean distance function

#include <math.h>

double
hypot(double x, double y);

long double
hypotl(long double x, long double y);

float
hypotf(float x, float y);

The () function computes the sqrt(x*x+y*y) without undue overflow or underflow.

hypot(x, y) , hypot(y, x) , and hypot(x, -y) are equivalent.

(x, +-0) is equivalent to (x).

(+-infinity, y) returns +infinity even if y is a NaN.

cabs(3), math(3), sqrt(3)

The hypot() function conforms to ISO/IEC 9899:2011.

December 11, 2006 BSD 4