IPReal: CEDAR DEFINITIONS ~ BEGIN Floor: PROC [a: REAL] RETURNS [REAL]; Ceiling: PROC [a: REAL] RETURNS [REAL]; Trunc: PROC [a: REAL] RETURNS [REAL]; Round: PROC [a: REAL] RETURNS [REAL]; Mod: PROC [a, b: REAL] RETURNS [REAL]; Rem: PROC [a, b: REAL] RETURNS [REAL]; ShortRational: TYPE ~ RECORD [numerator: INTEGER, denominator: CARDINAL]; ShortRationalFromReal: PROC [real: REAL] RETURNS [ShortRational]; Rational: TYPE ~ RECORD [numerator: INT, denominator: INT]; RationalFromReal: PROC [real: REAL] RETURNS [Rational]; END. ΰIPReal.mesa Copyright c 1984, 1985 Xerox Corporation. All rights reserved. Doug Wyatt, May 20, 1985 2:01:32 pm PDT Michael Plass, June 22, 1985 8:25:05 pm PDT picks a close rational approximation for the real number. denominator will be zero for out-of-range inputs. answer is always in lowest terms. denominator never negative. picks a close rational approximation for the real number. denominator will be zero for out-of-range inputs. answer is always in lowest terms. Κ‘˜codešœ ™ Kšœ Οmœ4™?Kšœ'™'K™+—K™KšΠblœΟkœŸ ˜KšœŸ˜K˜š ΟnœŸœŸœŸœŸœ˜%K˜—š  œŸœŸœŸœŸœ˜'K˜—š  œŸœŸœŸœŸœ˜%K˜—š  œŸœŸœŸœŸœ˜%K˜—š  œŸœŸœŸœŸœ˜&K˜—š  œŸœŸœŸœŸœ˜&K˜—J˜š œŸœŸœ ŸœŸœ˜IJ˜—š œŸœŸœŸœ˜AJ™9Jšœ1™1J™!J˜—š œ ŸœŸœ ŸœŸœ˜;Jšœ™K˜—š œŸœŸœŸœ ˜7J™9Jšœ1™1J™!J˜—KšŸœ˜—…—