HELPLIB.HLB  —  CRTL  hypot
    Returns the length of the hypotenuse of a right triangle.

    Format

      #include  <math.h>

      double hypot  (double x, double y);

      float hypotf  (float x, float y); (Integrity servers, Alpha)

      long double hypotl  (long double x, long double y);
                          (Integrity servers, Alpha)

1  –  Arguments

 x

    A real value.

 y

    A real value.

2  –  Description

    The hypot functions return the length of the hypotenuse of a
    right triangle, where x and y represent the perpendicular sides
    of the triangle. The length is calculated as:

    sqrt(x2 + y2)

    On overflow, the return value is undefined, and errno is set to
    ERANGE.

3  –  Return Values

    x                  The length of the hypotenuse.
    HUGE_VAL           Overflow occurred; errno is set to ERANGE.
    0                  Underflow occurred; errno is set to ERANGE.
    NaN                x or y is NaN; errno is set to EDOM.
Close Help