Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ (2) — Plan9 4th Edition

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

floor(2)

ABS(2)

NAME

abs, labs − integer absolute values

SYNOPSIS

­#include <u.h>
­#include <libc.h>

intabs(int a)

longlabs(long a)

DESCRIPTION

­Abs returns the absolute value of integer a, and ­labs does the same for a long. 

SOURCE

­/sys/src/libc/port/abs.c

SEE ALSO

floor(2) for ­fabs

DIAGNOSTICS

­Abs and ­labs return the most negative integer or long when the true result is unrepresentable. 

Plan 9  —  December 11, 1999

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