abs, labs - return integer absolute value
int abs (int i);
long int labs (long int i);
abs and labs return the absolute value of their int or long int operand.
In two's-complement representation, the absolute value of the negative
integer with largest magnitude is undefined. In this case, abs (or labs)
will generate a SIGFPE.
PPPPaaaaggggeeee 1111 [ Back ]