man.bsd.lv manual page server

Manual Page Search Parameters

LABS(3) Library Functions Manual LABS(3)

labsreturn the absolute value of a long integer

#include <stdlib.h>

long
labs(long j);

The () function returns the absolute value of the long integer j.

abs(3), floor(3), cabs(3), math(3)

The labs() function conforms to ANSI X3.159-1989 (“ANSI C89”).

The absolute value of the most negative integer remains negative.

4.4BSD-Lite2 June 4, 1993 LABS(3)