Go to main content

man pages section 3: Basic Library Functions

Exit Print View

Updated: July 2017
 
 

imaxabs(3C)

Name

imaxabs - return absolute value

Synopsis

#include <inttypes.h>

intmax_t imaxabs(intmax_t j);

Description

The imaxabs() function computes the absolute value of an integer j. If the result cannot be represented, the behavior is undefined.

Return Values

The imaxabs() function returns the absolute value.

Errors

No errors are defined.

Usage

The absolute value of the most negative number cannot be represented in two's complement.

Attributes

See attributes(5) for descriptions of the following attributes:

ATTRIBUTE TYPE
ATTRIBUTE VALUE
Interface Stability
Committed
MT-Level
MT-Safe
Standard

See Also

imaxdiv(3C), attributes(5), standards(5)