Your Browser is not longer supported

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

{{viewport.spaceProperty.prod}}

llabs - return absolute value of an integer (long long int)

&pagelevel(4)&pagelevel

Syntax

#include <stdlib.h>

long long int llabs(long long int j); 

Description

llabs() computes the absolute value of an integer j of type long long int.

Return val.

|j|

undefined

for an integer j.

for overflow or underflow. errno is set to ERANGE to indicate an error.

Errors

llabs() fails if:

 

ERANGE

The absolute value of the negative integer of type long long int with the largest magnitude 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