[Go to CFHT Home Page] Man Pages
Back to Software Index  BORDER=0Manpage Top Level
    abs(3C) manual page Table of Contents

Name

abs, labs, llabs - return absolute value of integer

Synopsis

#include <stdlib.h>

int abs(int val);

long labs(long lval);

long long llabs(long long llval);

MT-Level

MT-Safe

Description

abs() returns the absolute value of its int operand. labs() returns the absolute value of its long operand. llabs() returns the absolute value of its long long operand.

Notes

In 2’s-complement representation, the absolute value of the largest magnitude negative integral value is undefined.


Table of Contents