ABS(3) Library Functions Manual ABS(3)
NAME
abs — return an
integer absolute value
SYNOPSIS
#include <stdlib.h> int abs(int i);
DESCRIPTION
The abs() function computes the absolute value of its integer operand, i. If the result cannot be represented, the behaviour is undefined.
RETURN VALUE
The abs() function returns the absolute value of its integer operand.
ERRORS
No errors are defined.
EXAMPLES
None.
APPLICATION USAGE
In two's-complement representation, the absolute value of the negative integer with largest magnitude {INT_MIN} might not be representable.
FUTURE DIRECTIONS
None.
SEE ALSO
fabs(3) , labs(3) , <stdlib.h> .
DERIVATION
Derived from Issue 1 of the SVID.
February 1997 posix.fail