Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ abs(3) — Sprite KS.390

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

floor(3M)

ABS  —  C Library Procedures

NAME

abs, labs − integer absolute value

SYNOPSIS

#include <stdlib.h>
 int abs(i)
int i;
 long int labs(i)
long int i;

DESCRIPTION

Abs returns the absolute value of its integer operand.  Labs is similar to abs except that its argument and its resul are both of type long int. 

SEE ALSO

floor(3M) for fabs

BUGS

Applying the abs function to the most negative integer generates a result which is the most negative integer.  That is,

abs(0x80000000)

returns 0x80000000 as a result. 

Sprite version 1.0  —  May 15, 1985

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