DOKK / manpages / debian 11 / manpages-pt-dev / labs.3.pt
LABS(3) Linux Programmer's Manual LABS(3)

labs - computes the absolute value of a long integer.

#include <stdlib.h>

long int labs(long int j);

The labs() function computes the absolute value of the long integer argument j.

Returns the absolute value of the long integer argument.

SVID 3, BSD 4.3, ISO 9899

Trying to take the absolute value of the most negative integer is not defined.

abs(3), ceil(3), floor(3), fabs(3), rint(3)

June 6, 1993 GNU