[Go to CFHT Home Page] Man Pages
Back to Software Index  BORDER=0Manpage Top Level
    hypot(3M) manual page Table of Contents

Name

hypot - Euclidean distance

Synopsis

cc [ flag ... ] file ... -lm [ library ... ]

#include <math.h>

double hypot(double x, double y);

MT-Level

MT-Safe

Description

hypot(x,y) returns
sqrt(x*x
+y*y),

taking precautions against unwarranted IEEE exceptions. On IEEE overflow, hypot(x,y) may also set errno and call matherr(3M) . hypot(±if,y) is +if for any y, even a NaN, and is exceptional only for a signaling NaN.

hypot(x,y) and atan2(y,x) (see trig(3M) ) convert rectangular coordinates (x,y) to polar (r,*h); hypot(x,y) computes r, the modulus or radius.

See Also

matherr(3M) , trig(3M)


Table of Contents