Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ hypot(3M) — HP-UX 7.01

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

isinf(3M)

isnan(3M)

matherr(3M)

HYPOT(3M)

NAME

hypot − Euclidean distance function

SYNOPSIS

#include <math.h>

double hypot (x, y)
double x, y;

DESCRIPTION

Hypot returns sqrt(x ∗ x + y ∗ y), taking precautions against unwarranted overflows. 

DEPENDENCIES

Series 800 (/lib/libm.a and ANSI C /lib/libM.a)
Hypot returns +INFINITY when x or y is ±INFINITY . 

ERRORS

Series 300
When the correct value would overflow, hypot returns HUGE_VAL and sets errno to ERANGE. 

Series 800 (/lib/libm.a and ANSI C /lib/libM.a)
When the correct value would overflow, hypot returns HUGE_VAL and sets errno to ERANGE. 

Hypot returns NaN and sets errno to EDOM when x or y is NaN. 

These error-handling procedures may be changed with the function matherr(3M).

SEE ALSO

isinf(3M), isnan(3M), matherr(3M). 

STANDARDS CONFORMANCE

hypot: SVID2, XPG2, XPG3

Hewlett-Packard Company  —  HP-UX Release 7.0: Sept 1989

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