Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ hypot(3M) — HP-UX 10.20

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

sqrt(3M)

isinf(3M)

isnan(3M)

values(5)

hypot(3M)

NAME

hypot(), cabs() − Euclidean distance function, complex absolute value

SYNOPSIS

#include <math.h>

double hypot(double x, double y);

double cabs(struct {double x, y;} z);

DESCRIPTION

hypot() and cabs() return sqrt(x*x +y*y) , taking precautions against unwarranted overflows. 

To use these functions, link in the math library by specifying −lm on the compiler or linker command line. 

RETURN VALUE

If x or y is NaN, hypot() and cabs() return NaN. 

If the correct value would overflow, hypot() and cabs() return HUGE_VAL. 

If the correct value after rounding would be smaller in magnitude than MINDOUBLE, hypot() and cabs() return zero. 

ERRORS

No errors are defined. 

SEE ALSO

sqrt(3M), isinf(3M), isnan(3M), values(5). 

STANDARDS CONFORMANCE

hypot(): SVID3, XPG4.2

Hewlett-Packard Company  —  HP-UX Release 10.20:  July 1996

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