1ABS(P)                     POSIX Programmer's Manual                    ABS(P)
2
3
4

NAME

6       abs - return an integer absolute value
7

SYNOPSIS

9       #include <stdlib.h>
10
11       int abs(int i);
12
13

DESCRIPTION

15       The  abs() function shall compute the absolute value of its integer op‐
16       erand, i. If the result cannot be represented, the  behavior  is  unde‐
17       fined.
18

RETURN VALUE

20       The abs() function shall return the absolute value of its integer oper‐
21       and.
22

ERRORS

24       No errors are defined.
25
26       The following sections are informative.
27

EXAMPLES

29       None.
30

APPLICATION USAGE

32       In two's-complement representation, the absolute value of the  negative
33       integer with largest magnitude {INT_MIN} might not be representable.
34

RATIONALE

36       None.
37

FUTURE DIRECTIONS

39       None.
40

SEE ALSO

42       fabs()  , labs() , the Base Definitions volume of IEEE Std 1003.1-2001,
43       <stdlib.h>
44
46       Portions of this text are reprinted and reproduced in  electronic  form
47       from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
48       -- Portable Operating System Interface (POSIX),  The  Open  Group  Base
49       Specifications  Issue  6,  Copyright  (C) 2001-2003 by the Institute of
50       Electrical and Electronics Engineers, Inc and The Open  Group.  In  the
51       event of any discrepancy between this version and the original IEEE and
52       The Open Group Standard, the original IEEE and The Open Group  Standard
53       is  the  referee document. The original Standard can be obtained online
54       at http://www.opengroup.org/unix/online.html .
55
56
57
58IEEE/The Open Group                  2003                               ABS(P)
Impressum