abs(3C)


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.

References

floor(3M)

Notices

In 2's-complement representation, the absolute value of the largest magnitude negative integral value is undefined.
30 January 1998
© 1998 The Santa Cruz Operation, Inc. All rights reserved.