Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ abs(3C) — sys5 — Apollo Domain/OS SR10.4.1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

floor(3M)

ABS(3C)                              SysV                              ABS(3C)



NAME
     abs, labs - return integer absolute value

SYNOPSIS
     #include <stdlib.h>

     int abs(i)
     int i;

     long int labs (j)
     long int j;

DESCRIPTION
     abs computes the absolute value of its integer argument j. If the result
     cannot be represented, the behavior is undefined.  labs return the
     absolute values of its long integer argument.

DIAGNOSTICS
     The abs function and labs function return the absolute value of their
     arguments.

SEE ALSO
     floor(3M).

CAVEAT
     In two's-complement representation, the absolute value of the negative
     integer with largest magnitude is undefined.  Domain/OS SysV ignores this
     error.

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