llabs() — Calculate absolute value of long long integer

Standards

Standards / Extensions C or C++ Dependencies

z/OS® UNIX
C99
Single UNIX Specification, Version 3
C++ TR1 C99

both

OS/390 V2R10

Format

#include <stdio.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 on how to make long long available.

General description

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

Returns the absolute value of the long long integer argument n.

Related information