HELP ABS                                          Steven Hardy, Jan 1978

    abs(NUM) -> REAL

The procedure ABS takes a number and returns its magnitude which will,
of course, always be non-negative. For example, to find the magnitude of
the difference between the two numbers P and Q, use ABS(P - Q).

For real numbers, ABS could be defined as:

    define abs(x);
      if  x > 0 then x else -x endif
    enddefine;

For a complex number NUM, the result will be a floating-point real,
computed as

    sqrt(realpart(NUM)**2 + imagpart(NUM)**2)

See REF * NUMBERS for more details.


--- C.all/help/abs
--- Copyright University of Sussex 1992. All rights reserved. ----------
