LABS(3) Library Functions Manual LABS(3)

labsreturn a long integer absolute value

#include <stdlib.h>

long int labs(long int i);

The labs() function computes the absolute value of its long integer operand, i. If the result cannot be represented, the behaviour is undefined.

The labs() function returns the absolute value of its long integer operand.

No errors are defined.

None.

None.

None.

abs(3) , <stdlib.h> .

Derived from the ISO C standard.

February 1997 posix.fail