man.bsd.lv manual page server

Manual Page Search Parameters

ABS(3) Library Functions Manual ABS(3)

abs, labs, llabs, imaxabsfunctions for integer absolute value

library “libc”

#include <stdlib.h>

int
abs(int x);

long int
labs(long int x);

long long int
llabs(long long int x);

#include <inttypes.h>

intmax_t
imaxabs(intmax_t x);

These functions return the absolute value of the integer x. The listed functions differ only with respect to the type of the return value and x.

cabs(3), fabs(3), floor(3), math(3)

The described functions conform to ISO/IEC 9899:1999 (“ISO C99”).

The absolute value of the most negative integer remains negative.

April 13, 2011 NetBSD-9.2