C Language and Libraries Help (clang.hlp) (Table of Contents; Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
_cabs, _cabsl
 Summary Example                         Up Contents Index Back
─────Run-Time Library───────────────────────────────────────────────────────
 
     The _cabs function calculates the absolute value of a complex
     number, which must be a structure of type _complex (or _complexl).
     The structure <z> is composed of a real component <x> and an
     imaginary component <y>. A call to one of the _cabs routines is
     equivalent to the following:
 
          sqrt( z.x * z.x + z.y * z.y )
 
     The _cabsl function uses an 80-bit long double form of arguments
     and return values. In all other respects, it is identical to the
     _cabs function.
 
     Return Value
 
     On overflow, these functions call _matherr (or _matherrl), return
     HUGE_VAL (or _LHUGE_VAL for _cabsl), and set errno to ERANGE.
                                    -♦-