aboutsummaryrefslogtreecommitdiffstats
path: root/man3/abs.3
diff options
context:
space:
mode:
Diffstat (limited to 'man3/abs.3')
-rw-r--r--man3/abs.349
1 files changed, 39 insertions, 10 deletions
diff --git a/man3/abs.3 b/man3/abs.3
index 94d1e82645..f20411d008 100644
--- a/man3/abs.3
+++ b/man3/abs.3
@@ -47,9 +47,15 @@ abs, labs, llabs, imaxabs \- compute the absolute value of an integer
.BI "intmax_t imaxabs(intmax_t " j );
.fi
.SH DESCRIPTION
-The \fBabs\fP() function computes the absolute value of the integer
+The
+.BR abs ()
+function computes the absolute value of the integer
argument \fIj\fP.
-The \fBlabs\fP(), \fBllabs\fP() and \fBimaxabs\fP()
+The
+.BR labs (),
+.BR llabs ()
+and
+.BR imaxabs ()
functions compute the absolute value of the argument \fIj\fP of the
appropriate integer type for the function.
.SH "RETURN VALUE"
@@ -57,25 +63,48 @@ Returns the absolute value of the integer argument, of the appropriate
integer type for the function.
.SH "CONFORMING TO"
SVr4, POSIX.1-2001, 4.3BSD, C99.
-.\" POSIX.1 (1996 edition) only requires the \fBabs\fP() function.
+.\" POSIX.1 (1996 edition) only requires the
+.BR abs ()
+function.
C89 only
-includes the \fBabs\fP() and \fBlabs\fP() functions; the functions
-\fBllabs\fP() and \fBimaxabs\fP() were added in C99.
+includes the
+.BR abs ()
+and
+.BR labs ()
+functions; the functions
+.BR llabs ()
+and
+.BR imaxabs ()
+were added in C99.
.SH NOTES
Trying to take the absolute value of the most negative integer
is not defined.
.PP
-The \fBllabs\fP() function is included in glibc since version 2.0, but
+The
+.BR llabs ()
+function is included in glibc since version 2.0, but
is not in libc5 or libc4.
-The \fBimaxabs\fP() function is included in
+The
+.BR imaxabs ()
+function is included in
glibc since version 2.1.1.
.PP
-For \fBllabs\fP() to be declared, it may be necessary to define
+For
+.BR llabs ()
+to be declared, it may be necessary to define
\fB_ISOC99_SOURCE\fP or \fB_ISOC9X_SOURCE\fP (depending on the
version of glibc) before including any standard headers.
.PP
-GCC handles \fBabs\fP() and \fBlabs\fP() as builtin functions.
-GCC 3.0 also handles \fBllabs\fP() and \fBimaxabs\fP() as builtins.
+GCC handles
+.BR abs ()
+and
+.BR labs ()
+as builtin functions.
+GCC 3.0 also handles
+.BR llabs ()
+and
+.BR imaxabs ()
+as builtins.
.SH "SEE ALSO"
.BR cabs (3),
.BR ceil (3),