libc.info: abs

Go forward to assert
Go backward to abort
Go up to Stdlib
Go to the top op libc

`abs'--integer absolute value (magnitude)

*Synopsis*
     #include <stdlib.h>
     int abs(int I);
   *Description*
`abs' returns the absolute value of I (also called the magnitude of I).
That is, if I is negative, the result is the opposite of I, but if I
is nonnegative the result is I.
   The similar function `labs' uses and returns `long' rather than
`int' values.
*Returns*
The result is a nonnegative integer.
*Portability*
`abs' is ANSI.
   No supporting OS subroutines are required.