ABS(3) — NEWS-OS Programmer’s Manual
NAME
abs, labs − integer absolute value
SYNOPSIS
int abs(i)
int i;
long labs(l)
long l;
DESCRIPTION
abs returns the absolute value of its int operand.
labs returns the absolute value of its long operand.
SEE ALSO
floor(3M) for fabs.
BUGS
Applying the abs or labs function to the most negative integer generates a result which is the most negative integer. That is,
abs(0x80000000)
returns 0x80000000 as a result.
NEWS-OSRelease 4.2.1R