Reals.mesa
Last Edited by: Arnon, June 10, 1985 4:19:22 pm PDT
DIRECTORY
Rope,
Basics,
IO,
AlgebraClasses,
Points;
Reals: CEDAR DEFINITIONS
= BEGIN OPEN AC: AlgebraClasses, PTS: Points;
Types and Variables
Real: TYPE = REF RealRep;
RealRep:
TYPE =
RECORD [
val: REAL
];
RealPoint: TYPE = PTS.Point;
Reals: AC.Structure;
I/O and Conversion
Read:
PROC [in:
IO.
STREAM]
RETURNS [out: Real];
FromRope:
PROC [in: Rope.
ROPE]
RETURNS [out: Real];
ToRope:
PROC [in: Real]
RETURNS [out: Rope.
ROPE];
Write: PROC [stream: IO.STREAM, in: Real];
FromREAL: PROC [real: REAL] RETURNS [Real];
ToREAL: PROC [real: Real] RETURNS [REAL];
Arithmetic
Add:
PROC [firstArg, secondArg: Real]
RETURNS [result: Real];
Negate:
PROC [arg: Real]
RETURNS [result: Real];
Subtract:
PROC [firstArg, secondArg: Real]
RETURNS [result: Real];
Multiply:
PROC [firstArg, secondArg: Real]
RETURNS [result: Real];
Invert:
PROC [arg: Real]
RETURNS [result: Real];
Divide:
PROC [firstArg, secondArg: Real]
RETURNS [result: Real];
Comparison
Sign:
PROC [arg: Real]
RETURNS [Basics.Comparison];
Abs:
PROC [arg: Real]
RETURNS [result: Real];
Compare: PROC [firstArg, secondArg: Real] RETURNS [Basics.Comparison];
END.