HP C/iX Library Reference Manual (30026-90004)
Chapter 5 213
HP C/iX Library Function Descriptions
hypot
hypot
Computes the length of the hypotenuse of a right triangle.
Syntax
#include <math.h>
double hypot (double
x
, double
y
);
Parameters
x
A real number indicating the length of one of the sides of the triangle
adjacent to the right angle.
y
A real number indicating the length of the other side of the triangle
adjacent to the right angle.
Return Values
n The length of the hypotenuse of a right triangle.
HUGE An overflow condition has occurred; errno is set to ERANGE.
Description
The hypot function returns sqrt (
x
*
x
+
y
*
y
), taking precautions to avoid overflow.
Error handling can be changed by a user-written matherr function.
See Also
matherr()