abs, labs, llabs, imaxabs
From cppreference.com
Template:c/numeric/math/sidebar
| Defined in header <stdlib.h>
|
||
| int abs( int n ); |
||
| long labs( long n ); |
||
| long long llabs( long long n ); |
(since C99) | |
| Defined in header <inttypes.h>
|
||
| (since C99) | ||
Computes the absolute value of an integer number.
Parameters
| n | - | integer value |
Return value
The absolute value of n (i.e. |n|)
See also
| absolute value of a floating point value (|x|) (function) | |
| C++ documentation for abs
| |