Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

imaxabs - return integer absolute value (intmax_t)

&pagelevel(4)&pagelevel

Syntax

#include <inttypes.h>

intmax_t imaxabs(intmax_t j);

Description

imaxabs() computes the absolute value of an integer j of type intmax_t.

intmax_t is a type predefined in the headerstdint.h:

typedef long long intmax_t;

Return val.

|j|

for an integer j, if successful.


undefined

in case of overflow. errno is set to indicate the error.

Errors

imaxabs() fails if:


ERANGE

The absolute value of the highest presentable negative number of type intmax_t is not representable.

If a negative number with the highest magnitude is specified as the argument j, the program will terminate with an error.

See also

abs()labs()llabs()stdint.h.