home *** CD-ROM | disk | FTP | other *** search
Modula Definition | 1989-10-07 | 1.1 KB | 46 lines |
-
- (* MAS Rational Number Definition Module. *)
-
- DEFINITION MODULE MASRN;
-
-
- FROM MASSTOR IMPORT LIST;
-
-
- PROCEDURE RNDRD(): LIST;
- (*Rational number decimal read. The rational number R is read
- from the input stream. Any preceding blanks are skipped.*)
-
-
- PROCEDURE RNDWR(R,NL: LIST);
- (*Rational number decimal write. R is a rational number. n is a
- non-negative integer. R is approximated by a decimal fraction D with
- n decimal digits following the decimal point and D is written in the
- output stream. The inaccuracy of the approximation is at most
- (1/2)*10**-n. *)
-
-
- PROCEDURE RNDWRS(A,S: LIST);
- (*Rational number decimal write special.
- Call RNDWR. *)
-
-
- PROCEDURE RNEXP(A,NL: LIST): LIST;
- (*Rational number exponentiation. A is a rational number,
- n is a non-negative beta-integer. B=A**n.*)
-
-
- PROCEDURE RNMAX(AL,BL: LIST): LIST;
- (*Rational number maximum. a and b are rational numbers.
- c is the maximum of a and b.*)
-
-
- PROCEDURE RNONE(R: LIST): LIST;
- (*Rational number one. R is a rational number. s=1 if R=1,
- s=0 else. *)
-
-
- END MASRN.
-
-
-