ABS(3C) SysV ABS(3C)
NAME
abs, labs - return integer absolute value
SYNOPSIS
#include <stdlib.h>
int abs(i)
int i;
long int labs (j)
long int j;
DESCRIPTION
abs computes the absolute value of its integer argument j. If the result
cannot be represented, the behavior is undefined. labs return the
absolute values of its long integer argument.
DIAGNOSTICS
The abs function and labs function return the absolute value of their
arguments.
SEE ALSO
floor(3M).
CAVEAT
In two's-complement representation, the absolute value of the negative
integer with largest magnitude is undefined. Domain/OS SysV ignores this
error.