New Numeric Types

Introduction: Kinds of Numeric Types

Kinds of New Numeric Types

Integer and Floating Point Types

New Integer Types

  • Example: types ( not subtypes) for temperature and pressure
  •         type Temperature is Range 32 .. 212;
            type Pressure is Range 0 .. 500;
            t: Temperature;
            p: Pressure;
            t := 100;   -- valid
            p := t;     -- compile error
  • Reduce errors:

  • Operations:
  • Mixing Operations:

  • Both types share same underlying representation

  • Floating Point Types

    Alternate Notation for Integer and Floating Point Types

    Fixed Point Types

    What Does Floating Point Mean?

    Decimal Fixed Point Types

    Fixed Point and Decimal Fixed Point Types

    Modular Types

    Modular Types