from small one page howto to huge articles all in one place

search text in:




Other .linuxhowtos.org sites:gentoo.linuxhowtos.org



Last additions:
using iotop to find disk usage hogs

using iotop to find disk usage hogs

words:

887

views:

209795

userrating:


May 25th. 2007:
Words

486

Views

258785

why adblockers are bad


Workaround and fixes for the current Core Dump Handling vulnerability affected kernels

Workaround and fixes for the current Core Dump Handling vulnerability affected kernels

words:

161

views:

150103

userrating:


April, 26th. 2006:

Druckversion
You are here: manpages





abs

Section: C Library Functions (3)
Updated: 202-0-08
Index Return to Main Contents
 

NAME

abs, labs, llabs, imaxabs, uabs, ulabs, ullabs, umaxabs - compute the absolute value of an integer  

LIBRARY

Standard C library (libc,~-lc)  

SYNOPSIS

#include <stdlib.h>
int abs(int j);
long labs(long j);
long long llabs(long long j);
unsigned int uabs(int j);
unsigned long ulabs(long j);
unsigned long long ullabs(long long j);
#include <inttypes.h>
intmax_t imaxabs(intmax_t j);
uintmax_t umaxabs(intmax_t j);
Feature Test Macro Requirements for glibc (see feature_test_macros(7)): llabs():
    _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L
uabs(), ulabs(), ullabs(), umaxabs():
    _ISOC2Y_SOURCE
 

DESCRIPTION

These functions compute the absolute value of the argument j of the appropriate integer type for the function.  

RETURN VALUE

Returns the absolute value of the integer argument, of the appropriate integer type for the function.  

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).
InterfaceAttributeValue
abs(), labs(), llabs(), imaxabs(), uabs(), ulabs(), ullabs(), umaxabs() Thread safetyM-Safe
 

STANDARDS

abs()
labs() llabs() imaxabs() C23, POSIX.-2024
 

HISTORY

abs()
C89, POSIX.-1996, SVr4, 4.3BSD.
labs()
C89, POSIX.-2001.
llabs()
C99, POSIX.-2001; glibc 2.0.
imaxabs()
C99, POSIX.-2001; glibc 2.1.1.
uabs()
ulabs() ullabs() C2y; glibc 2.42.
umaxabs()
C2y; glibc 2.43.
 

BUGS

For abs(), labs(), llabs(), and imaxabs(), trying to take the absolute value of the most negative integer is not defined.  

SEE ALSO

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


 

Index

NAME
LIBRARY
SYNOPSIS
DESCRIPTION
RETURN VALUE
ATTRIBUTES
STANDARDS
HISTORY
BUGS
SEE ALSO





Support us on Content Nation
rdf newsfeed | rss newsfeed | Atom newsfeed
- Powered by LeopardCMS - Running on Gentoo -
Copyright 2004-2025 Sascha Nitsch Unternehmensberatung GmbH
Valid XHTML1.1 : Valid CSS
- Level Triple-A Conformance to Web Content Accessibility Guidelines 1.0 -
- Copyright and legal notices -
Time to create this page: 10.7 ms