[top] [prev] [next]

The Real, LongReal and Extended interfaces

For definitions of the terms used in these interfaces, see the ANSI/IEEE Standard 754-1985 for floating-point arithmetic.

These interfaces define constant attributes of the three built-in floating-point types:

INTERFACE Real; TYPE T = REAL;
  CONST
    Base: INTEGER = ...;
    Precision: INTEGER = ...;
    MaxFinite: T = ...;
    MinPos: T = ...;
    MinPosNormal: T = ...;
  END Real.

INTERFACE LongReal; TYPE T = LONGREAL;
  CONST
    Base: INTEGER = ...;
    Precision: INTEGER = ...;
    MaxFinite: T = ...;
    MinPos: T = ...;
    MinPosNormal: T = ...;
  END LongReal.

INTERFACE Extended; TYPE T = EXTENDED;
  CONST
    Base: INTEGER = ...;
    Precision: INTEGER = ...;
    MaxFinite: T = ...;
    MinPos: T = ...;
    MinPosNormal: T = ...;
  END Extended.

The specification is the same for all three interfaces:

Base is the radix of the floating-point representation for T.

Precision is the number of base-Base digits of precision for T.

MaxFinite is the maximum finite value in T. For non-IEEE implementations, this is the same as LAST(T).

MinPos is the minimum positive value in T.

MinPosNormal is the minimum positive normal value in T; it differs from MinPos only for implementations (like IEEE) with denormalized numbers.

The CM Modula-3 versions are Real, LongReal, and Extended.

[top] [prev] [next]