Manual pages › C library (3C)
abs(3C)
return integer absolute value
From the original Amiga UNIX 2.1 manual. Some things it mentions may not be in this release.
NAME
abs, labs - return integer absolute value
SYNOPSIS
#include <stdlib.h>
int abs (int val);
long labs (long lval);
DESCRIPTION
abs returns the absolute value of its int operand. labs returns the absolute value of its long operand.
SEE ALSO
floor(3M).
NOTES
In 2's-complement representation, the absolute value of the largest magnitude negative integral value is undefined.