File:  [Research Unix] / researchv10dc / 630 / man / src / p_man / man3 / integer.3r
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Tue Apr 24 17:21:34 2018 UTC (8 years, 1 month ago) by root
Branches: belllabs, MAIN
CVS tags: researchv10, HEAD
researchv10 Dan Cross

.ds ZZ DEVELOPMENT PACKAGE
.TH INTEGER 3R "630 MTG"
.XE "Iceil()"
.XE "Ifloor()"
.XE "min()"
.XE "max()"
.SH NAME
integer: Iceil, Ifloor, min, max \- integer functions
.XE "abs,"
.XE "abs,"
.SH SYNOPSIS
.PP
.B short Iceil (a, b)
.PP
.B short Ifloor (a, b)
.PP
.B int min (b, c)
.PP
.B int max (b, c)
.PP
.B long a;
.br
.B int b, c;
.SH DESCRIPTION
.PP
The
.I Iceil
function
returns the smallest short integer which, when multiplied by
.IR b,
is not less than
.I a. 
.PP
The
.I Ifloor
function
returns the largest short integer which, when multiplied by
.I b,
is not greater than
.I a. 
.PP
For both
.I Iceil
and
.I Ifloor
if
.I b
is equal to 0 or 1,
the long integer
.I a
is truncated to a short and returned.
Otherwise, if the result is greater than a short, it is truncated
before being returned.
.PP
The
.I min
function
returns the minimum of the two integers.
.PP
The
.I max
function
returns the maximum of the two integers.
.SH EXAMPLE
.PP
.RS 3
.nf
.ft CM
Iceil (7, 2)  and  Iceil (10, 3) both equal 4.
.sp
Ifloor (9, 2)  and  Ifloor (13, 3) both equal 4.
.sp
min (32, 16) equals 16.
.sp
max (32, 14) equals 32.
.fi
.ft R
.RE

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.