DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 

abs(S-osr5)


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-osr5), floor(S-osr5)

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 .


© 2005 System Services (S-osr5)
SCO OpenServer Release 6.0.0 -- 02 June 2005