The Single UNIX ® Specification, Version 2
Copyright © 1997 The Open Group

NAME


abs - return an integer absolute value

SYNOPSIS


#include <stdlib.h>

int abs(int i);

DESCRIPTION

The abs() function computes the absolute value of its integer operand, i. If the result cannot be represented, the behaviour is undefined.

RETURN VALUE

The abs() function returns the absolute value of its integer operand.

ERRORS

No errors are defined.

EXAMPLES

None.

APPLICATION USAGE

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

FUTURE DIRECTIONS

None.

SEE ALSO


fabs(), labs(), <stdlib.h>.

UNIX ® is a registered Trademark of The Open Group.
Copyright © 1997 The Open Group
[ Main Index | XSH | XCU | XBD | XCURSES | XNS ]