starting from the ANSI C manual page
[unix-history] / usr / src / lib / libc / stdlib / abs.3
.\" @(#)abs.3 6.1 (Berkeley) %G%
.\"
.TH ABS 3 ""
.AT 3
.SH NAME
abs \- integer absolute value
.SH SYNOPSIS
.nf
.B abs(i)
.B int i;
.fi
.SH DESCRIPTION
.I Abs
returns the absolute value of its integer operand.
.SH SEE ALSO
floor(3M) for
.I fabs
.SH BUGS
Applying the \fIabs\fP function to the most negative integer generates a
result which is the most negative integer. That is,
.IP "abs(0x80000000)"
.LP
returns 0x80000000 as a result.