abs(S)
abs --
return integer absolute value
Syntax
cc ... -lc
#include <stdlib.h>
int abs (i)
int i;
Description
The abs function returns
the absolute value of its integer operand.
See also
fabs(S),
floor(S)
Note
In two's-complement representation,
the absolute value of the negative integer with largest magnitude
is undefined.
Standards conformance
abs is conformant with:
X/Open Portability Guide, Issue 3, 1989
;
ANSI X3.159-1989 Programming Language -- C
;
Intel386 Binary Compatibility Specification, Edition 2 (iBCSe2)
;
IEEE POSIX Std 1003.1-1990 System Application Program Interface (API) [C Language] (ISO/IEC 9945-1)
;
and
NIST FIPS 151-1
.
© 2003 System Services (S)
SCO OpenServer Release 5.0.7 -- 11 February 2003