Sun Microsystems, Inc.
spacerspacer
spacer   www.sun.com docs.sun.com | | |  
spacer
black dot
   
A   B   C   D   E   F   G   H   I   J   K   L   M   N   O   P   Q   R   S   T   U   V   W   X   Y   Z
    
 
Standard C Library Functionsabs(3C)


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
MT-LevelMT-Safe

SEE ALSO

 

attributes(5)


SunOS 5.9Go To TopLast Changed 29 Dec 1996

 
      
      
Copyright 2002 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms.