Home
Main website
Display Sidebar
Hide Ads
Recent Changes
View Source:
labs(3)
Edit
PageHistory
Diff
Info
LikePages
ABS !!!ABS NAME SYNOPSIS DESCRIPTION RETURN VALUE CONFORMING TO NOTES SEE ALSO ---- !!NAME abs, labs, llabs, imaxabs - compute the absolute value of an integer. !!SYNOPSIS __#include __ ''j''__); long int labs(long int__ ''j''__); long long int llabs(long long int__ ''j''__); #include __ ''j''__); __ !!DESCRIPTION The __abs()__ function computes the absolute value of the integer argument ''j''. The __labs()__, __llabs()__ and __imaxabs()__ 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. !!CONFORMING TO SVID 3, POSIX.1, BSD 4.3, ISO/IEC 9899. POSIX.1 (1996 edition) only requires the __abs()__ function. ISO/IEC 9899:1990 (C89) only includes the __abs()__ and __labs()__ functions; the functions __llabs()__ and __imaxabs()__ were added in C99. !!NOTES Trying to take the absolute value of the most negative integer is not defined. The __llabs()__ function is included in glibc since version 2.0, but is not in libc5 or libc4. The __imaxabs()__ function is included in glibc since version 2.1.1. For __llabs()__ to be declared, it may be necessary to define ___ISOC99_SOURCE__ or ___ISOC9X_SOURCE__ (depending on the version of glibc) before including any standard headers. GCC handles __abs()__ and __labs()__ as builtin functions. GCC 3.0 also handles __llabs()__ and __imaxabs()__ as builtins. !!SEE ALSO ceil(3), floor(3), fabs(3), rint(3) ----
4 pages link to
labs(3)
:
Man3l
fabs(3)
fabsf(3)
fabsl(3)
This page is a man page (or other imported legacy content). We are unable to automatically determine the license status of this page.