Content-type: text/html Man page of abs

abs

Section: Standard C Library Functions (3C)
Updated: 24 Jul 2002
Index Return to Main 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);  

DESCRIPTION

The abs() function returns the absolute value of its int operand.

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

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

USAGE

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

ATTRIBUTES

See attributes(5) for descriptions of the following attributes:

ATTRIBUTE TYPEATTRIBUTE VALUE
Interface StabilityStandard
MT-LevelMT-Safe

 

SEE ALSO

attributes(5), standards(5)


 

Index

NAME
SYNOPSIS
DESCRIPTION
USAGE
ATTRIBUTES
SEE ALSO

This document was created by man2html, using the manual pages.
Time: 02:37:27 GMT, October 02, 2010