DIRECTORY FloatingPointCommon; RealSupport: CEDAR DEFINITIONS = BEGIN Classify: PROC [d: REAL] RETURNS [FloatingPointCommon.NumberType]; Example: PROC [c: FloatingPointCommon.NumberType, min: BOOL ¬ FALSE] RETURNS [REAL]; IntToReal: PROC [i: INT] RETURNS [REAL]; CardToReal: PROC [c: CARD] RETURNS [REAL]; Fix: PROC [REAL] RETURNS [INT]; Round: PROC [REAL] RETURNS [INT]; FScale: PROC [a: REAL, scale: INTEGER] RETURNS [REAL]; -- a*(2­scale) Neg: PROC [d: REAL] RETURNS [REAL]; Abs: PROC [d: REAL] RETURNS [REAL]; Add: PROC [x, y: REAL] RETURNS [REAL]; Sub: PROC [x, y: REAL] RETURNS [REAL]; Mul: PROC [x, y: REAL] RETURNS [REAL]; Div: PROC [x, y: REAL] RETURNS [REAL]; Gt: PROC [x, y: REAL] RETURNS [BOOL]; Ge: PROC [x, y: REAL] RETURNS [BOOL]; Lt: PROC [x, y: REAL] RETURNS [BOOL]; Le: PROC [x, y: REAL] RETURNS [BOOL]; Eq: PROC [x, y: REAL] RETURNS [BOOL]; Ne: PROC [x, y: REAL] RETURNS [BOOL]; Min: PROC [x, y: REAL] RETURNS [REAL]; Max: PROC [x, y: REAL] RETURNS [REAL]; Pwr: PROC [x, y: REAL] RETURNS [REAL]; Ceiling: PROC [x: REAL] RETURNS [REAL]; Floor: PROC [x: REAL] RETURNS [REAL]; END. X RealSupport.mesa Copyright Σ 1989, 1991 by Xerox Corporation. All rights reserved. Russ Atkinson (RRA) June 22, 1989 9:44:10 pm PDT The following procedures are the primitive low-level support for the Cedar/Mesa REAL type. Classifies the given REAL. Returns an example of the given classification. For all values of c except other, the classification of the result will be c. If c = other, the result value is undefined, since there may be no REAL values that classify as other (this is machine-dependent). The value of min is ignored. If c = zero, +0.0 will be returned. The value of min is ignored. If c = subnormal OR c = normal, the example returned will be the minimum value in that classification if min = TRUE, or the maximum value in that classification if min = FALSE. IF c is in {infinity, quiet, signaling}, a "typical" value will be returned, which may be the only value in that class (the details are machine-dependent). The value of min is ignored. ... rounds toward zero (error if outside the INT range) ... rounds toward nearest (error if outside the INT range) ΚΝ–(cedarcode) style•NewlineDelimiter ™headšœ™Icodešœ Οeœ7™BLšœΟkœ™0L˜Lšž œ˜—šΟn œžœž œž˜&IblockšœPΠbkœ™ZM™šŸœžœžœžœ"˜BLšœžœ™L™—š Ÿœžœ*žœžœžœžœ˜TLšœ/™/L™MLšœCžœY™ LšœA™ALšœžœ\žœ7žœ™°Lšžœ·™ΉL™—š Ÿ œžœžœžœžœ˜(L™—š Ÿ œžœžœžœžœ˜*L™—š Ÿœžœžœžœžœ˜Lšœ-žœ™7L™—š Ÿœžœžœžœžœ˜!Lšœ0žœ™:L™—š Ÿœžœžœ žœžœžœΟc˜FL™—š Ÿœžœžœžœžœ˜#L™—š Ÿœžœžœžœžœ˜#L™—š Ÿœžœžœžœžœ˜&L™—š Ÿœžœžœžœžœ˜&L™—š Ÿœžœžœžœžœ˜&L™—š Ÿœžœžœžœžœ˜&L™—š Ÿœžœžœžœžœ˜%L™—š Ÿœžœžœžœžœ˜%L™—š Ÿœžœžœžœžœ˜%L™—š Ÿœžœžœžœžœ˜%L™—š Ÿœžœžœžœžœ˜%L™—š Ÿœžœžœžœžœ˜%L™—š Ÿœžœžœžœžœ˜&L™—š Ÿœžœžœžœžœ˜&L™—š Ÿœžœžœžœžœ˜&L™—š Ÿœžœžœžœžœ˜'L˜—š Ÿœžœžœžœžœ˜%L˜—L˜—Kšžœ˜L˜—…—P u