ultrix man page for hypot

Query: hypot

OS: ultrix

Section: 3m

Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar

hypot(3m)																 hypot(3m)

Name
       hypot, cabs - Euclidean distance, complex absolute value

Syntax
       #include <math.h>

       double hypot(x,y)
       double x,y;

       float fhypot(float x, float y)

       double cabs(z)
       struct {double x,y;} z;

       float fcabs(z)
       struct {float x,y;} z;

Description
       The and functions return the following:
       sqrt(x*x+y*y)
       This computation prevents underflows and overflows only if the final result dictates it.

       The functions and are equivalent to the and function with the exception of float data type.

   Error
       When  rounding  off,  for  example, below 0.97 ulps.  Consequently (5.0,12.0) = 13.0 exactly; in general, and return an integer whenever an
       integer might be expected.

       The same cannot be said for the shorter and faster version of and that is provided in the comments in cabs.c;  its  error  can  exceed  1.2
       ulps.

Return Values
       If the correct value overflows, and return HUGE_VAL.   If x or y is NaN, then NaN is returned.

See Also
       math(3m), sqrt(3m)

								       RISC								 hypot(3m)
Related Man Pages
cabs(3) - freebsd
hypot(3) - netbsd
cabs(3) - osf1
cabsf(3) - freebsd
cabsl(3) - freebsd
Similar Topics in the Unix Linux Community
awk substr
Grep float/integers but skip some integers
Is C worth the effort?
Avoiding external utilities
Issue with events occuring in DST window