HP 3000 Manuals

hypot [ HP C/iX Library Reference Manual ] MPE/iX 5.0 Documentation


HP C/iX Library Reference Manual

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()



MPE/iX 5.0 Documentation