Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ abs(3) — NEWS-os 4.2.1R

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

floor(3M)

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

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