Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ abs(3) — bsd — Apollo Domain/OS SR10.4

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

floor(3M)

ABS(3)                               BSD                                ABS(3)



NAME
     abs, labs - integer, long integer absolute value

SYNOPSIS
     #include <stdlib.h>

     int abs(i)
     int i;

     long int labs (j)
     long int j;

DESCRIPTION
     abs and labs return the absolute values of their operands.

SEE ALSO
     floor(3M) for fabs.

BUGS
     Applying the abs (or labs) function to the most negative integer (or long
     integer) generates a result that is the most negative integer (or long
     integer).  That is, abs(0x80000000) (or labs(0x80000000)) returns
     0x80000000 as a result.

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026