Manual Page Result
0
Command: hypot | Section: 3 | Source: Digital UNIX | File: hypot.3.gz
hypot(3) Library Functions Manual hypot(3)
NAME
hypot, cabs, fabs - Calculate Euclidean distance and absolute value
LIBRARY
Math Library (libm.a)
SYNOPSIS
#include <math.h>
double hypot (double x, double y); float hypotf (float x, float y);
double cabs (double x, double y); float cabsf (float x, float y);
double fabs (double x); float fabsf (float x);
STANDARDS
Interfaces documented on this reference page conform to industry stan-
dards as follows:
hypot(): XPG4
fabs(): XPG4
Refer to the standards(5) reference page for more information about in-
dustry standards and associated tags.
DESCRIPTION
The hypot() and hypotf() functions compute the length of the hypotenuse
of a right triangle, where x and y represent the perpendicular sides of
the triangle. The hypot(x,y) and hypotf(x,y) functions are defined as
sqrt(x**2 + y**2).
The cabs() and cabsf() functions return the complex absolute value of
x. The cabs() and cabsf() functions are defined as hypot() and hy-
potf(), respectively.
The fabs() and fabsf() functions compute the absolute value of x.
The following table describes function behavior in response to excep-
tional arguments:
tab(@); lfHB lfHB lfHB l l l . _
Function@Exceptional Argument@Routine Behavior
_
hypot(), hypotf()@sqrt(x**2 + y**2)>max_float@Overflow
cabs(), cabsf()@sqrt(x**2 + y**2)>max_float@Overflow
_
The following table lists boundary values used by these functions:
tab(@); lfHB lfHB lfHB lfHB lfHB lfHB lfHB lfHB l l l l . _
Value@Data@Hexadecimal Value@Decimal Value Name@Type
_
max_float @S_FLOAT @7F7FFFFF @3.402823e38
@T_FLOAT @7FEFFFFFFFFFFFFF @1.7976931348623e308
_
delim off
hypot(3)