INTEGER(3R)

NAME
integer: Iceil, Ifloor, min, max - integer functions

SYNOPSIS

short Iceil (a, b)

short Ifloor (a, b)

int min (b, c)

int max (b, c)

long a;
int b, c;

DESCRIPTION

The Iceil function returns the smallest short integer which, when multiplied by b, is not less than a.

The Ifloor function returns the largest short integer which, when multiplied by b, is not greater than a.

For both Iceil and Ifloor if b is equal to 0 or 1, the long integer a is truncated to a short and returned. Otherwise, if the result is greater than a short, it is truncated before being returned.

The min function returns the minimum of the two integers.

The max function returns the maximum of the two integers.

EXAMPLE

    Iceil (7, 2)  and  Iceil (10, 3) both equal 4.

    Ifloor (9, 2)  and  Ifloor (13, 3) both equal 4.

    min (32, 16) equals 16.

    max (32, 14) equals 32.