llabs() — Calculate absolute value of long long integer

Format

#include <stdlib.h>

long long llabs(long long int n);
Compile Requirement: Use of this function requires the long long data type. See z/OS XL C/C++ Language Reference for information about how to make long long available.

General description

The llabs() function calculates the absolute value of its long long integer argument n. The result is undefined when the argument is equal to LONGLONG_MIN, the smallest available long long integer (-9 223 372 036 854 775 808). The value LONGLONG_MIN is defined in the limits.h header file.

Returned value

The llabs() function returns the absolute value of the long long integer argument n.

Related Information