Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ hypot(3M) — SunOS 5.2

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

trig(3M)

matherr(3M)

hypot(3M)

NAME

hypot − Euclidean distance

SYNOPSIS

#include <math.h>

double hypot(double x, double y);

MT-LEVEL

MT-Safe with exceptions

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(±∞,y) is +∞ 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,θ); hypot(x,y) computes r, the modulus or radius.

SEE ALSO

trig(3M), matherr(3M)

NOTES

These functions are MT-Safe when compiled with the shared library, libm.so, but are unsafe if compiled with the archived library libm.a. 

SunOS 5.2  —  Last change: 22 Jan 1993

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026