DEFINITION MODULE arithmetic;

(*
    Title: 	arithmetic routines
    LastEdit:	"Sat Jan 15 14:39:21 1983"
    Author: 	pr
		Cambridge University Computer Laboratory
*)


EXPORT QUALIFIED
    CMax, CMin,
    ISign, IMax, IMin,
    SmallReal, RZero, ROne,
    FIX, RSign, RMax, RMin,
    SquareRoot, ROUND;


VAR
    SmallReal,
    RZero,
    ROne:           REAL;


PROCEDURE CMax (x, y: CARDINAL): CARDINAL;
PROCEDURE CMin (x, y: CARDINAL): CARDINAL;

PROCEDURE ISign (x: INTEGER): INTEGER;
PROCEDURE IMax (x, y: INTEGER): INTEGER;
PROCEDURE IMin (x, y: INTEGER): INTEGER;

PROCEDURE FIX (x: REAL): INTEGER;
PROCEDURE RSign (x: REAL): REAL;
PROCEDURE RMax (x, y: REAL): REAL;
PROCEDURE RMin (x, y: REAL): REAL;

PROCEDURE SquareRoot (x: REAL): REAL;

PROCEDURE ROUND (x: REAL): INTEGER;


END arithmetic.
