Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ hypot(3) — OSF/1 3.0 αXP

Media Vault

Software Library

Restoration Projects

Artifacts Sought

hypot(3)  —  Subroutines

NAME

hypot, cabs, fabs − Euclidean distance calculation and complex 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);

DESCRIPTION

hypot() and hypotf() compute the length of the hypotenuse of a right triangle; where x and y represent the perpendicular sides of a right triangle.  hypot(x,y) and hypotf(x,y) are equivalent to sqrt(x∗∗2 + y∗∗2). 

cabs() and cabsf() return the complex absolute value of x and are equivalent to hypot() and hypotf(). 

fabs() and fabsf()  compute the absolute value of x. 

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

Value Data Hexadecimal Value Decimal Value
Name Type

max_float F_FLOAT FFFF7FFF 1.701411e38
G_FLOAT FFFFFFFFFFFF7FFF 8.9884656743115e307
S_FLOAT 7F7FFFFF 3.402823e38
T_FLOAT 7FEFFFFFFFFFFFFF 1.7976931348623e308

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