DataMuseum.dk

Presents historical artifacts from the history of:

Rational R1000/400 Tapes

This is an automatic "excavation" of a thematic subset of
artifacts from Datamuseum.dk's BitArchive.

See our Wiki for more about Rational R1000/400 Tapes

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - download
Index: ┃ T V

⟦f5776b193⟧ TextFile

    Length: 8630 (0x21b6)
    Types: TextFile
    Names: »V«

Derivation

└─⟦d10a02448⟧ Bits:30000409 8mm tape, Rational 1000, ENVIRONMENT, D_12_7_3
    └─ ⟦fc9b38f02⟧ »DATA« 
        └─⟦9b46a407a⟧ 
            └─⟦12c68c704⟧ 
                └─⟦this⟧ 
└─⟦5f3412b64⟧ Bits:30000745 8mm tape, Rational 1000, ENVIRONMENT 12_6_5 TOOLS 
    └─ ⟦91c658230⟧ »DATA« 
        └─⟦458657fb6⟧ 
            └─⟦220843204⟧ 
                └─⟦this⟧ 

TextFile

with System;

package Universal is

    pragma Subsystem (Ada_Management, Closed);
    pragma Module_Name (4, 1115);

    type Integer is private;
    type Float   is private;

    -- UNIVERSAL.INTEGER operators

    --  function "=" (LEFT, RIGHT: INTEGER) return BOOLEAN;
    function "<"  (Left, Right : Integer) return Boolean;
    function "<=" (Left, Right : Integer) return Boolean;
    function ">"  (Left, Right : Integer) return Boolean;
    function ">=" (Left, Right : Integer) return Boolean;

    function "+"   (Left : Integer) return Integer;
    function "-"   (Left : Integer) return Integer;
    function "abs" (Left : Integer) return Integer;

    function "+"   (Left, Right : Integer)                    return Integer;
    function "-"   (Left, Right : Integer)                    return Integer;
    function "*"   (Left, Right : Integer)                    return Integer;
    function "/"   (Left, Right : Integer)                    return Integer;
    function "rem" (Left, Right : Integer)                    return Integer;
    function "mod" (Left, Right : Integer)                    return Integer;
    function "**"  (Left : Integer; Right : Standard.Integer) return Integer;

    -- UNIVERSAL.FLOAT operators

    --  function "=" (LEFT, RIGHT: FLOAT) return BOOLEAN;
    function "<"  (Left, Right : Float) return Boolean;
    function "<=" (Left, Right : Float) return Boolean;
    function ">"  (Left, Right : Float) return Boolean;
    function ">=" (Left, Right : Float) return Boolean;

    function "+"   (Left : Float) return Float;
    function "-"   (Left : Float) return Float;
    function "abs" (Left : Float) return Float;

    function "+"  (Left, Right : Float)                    return Float;
    function "-"  (Left, Right : Float)                    return Float;
    function "*"  (Left, Right : Float)                    return Float;
    function "/"  (Left, Right : Float)                    return Float;
    function "**" (Left : Float; Right : Standard.Integer) return Float;

    -- additional UNIVERSAL operators

    function "*" (Left : Integer; Right : Float) return Float;
    function "*" (Left : Float; Right : Integer) return Float;
    function "/" (Left : Float; Right : Integer) return Float;

    -- constants
    function Zero return Integer;
    function Zero return Float;
    function One  return Integer;
    function One  return Float;

    -- conversion operators
    function Value (Left : Integer)          return Float;
    function Value (Left : Float)            return Integer;
    function Value (Left : Standard.Float)   return Float;
    function Value (Left : Standard.Integer) return Integer;

    function Convert (Left : Integer) return Standard.Integer;
    function Convert (Left : Float)   return Standard.Float;

    -- image functions
    function Image (Left : Integer) return String;
    function Image (Left : Float)   return String;

    -- type characteristics
    function Integer_Tick_Last  return Integer;
    function Integer_Tick_First return Integer;

    function Float_Tick_First return Float;
    function Float_Tick_Last  return Float;

    function Integer_Tick_Size           return Standard.Integer;
    function Float_Tick_Size             return Standard.Integer;
    function Float_Tick_Machine_Mantissa return Standard.Integer;

    -- representation munging utilities
    type Bit_String is array (Positive range <>) of Boolean;

    function Bits (I : Integer) return Bit_String;
    -- returns a bit_string of length UNIVERSAL.INTEGER_TICK_SIZE
    -- containing
    -- the value of I expressed as a binary integer, right justified in
    -- the bit string.

    function Mantissa (F : Float) return Bit_String;
    -- returns a bit_string of length UNIVERSAL.FLOAT_TICK_MACHINE_MANTISSA
    -- containing the value of the mantissa of F expressed as a binary
    -- fraction with the binary point assumed at the left end of the
    -- string. (See note.)

    function Exponent (F : Float) return Standard.Integer;
    -- returns the exponent of F (See note.)

    function Value (Int : Bit_String) return Integer;
    -- The bit string is interpreted as a binary integer. The function
    -- returns the value of that integer in the UNIVERSAL.INTEGER
    -- format.

    function Value (Mantissa : Bit_String) return Float;
    -- The bit string is interpreted as a binary mantissa (with binary
    -- point assumed at the left end of the string). The function
    -- returns the value of that mantissa in the UNIVERSAL.FLOAT format.

    -- Note: The following identities hold:
    -- VALUE (BITS (I)) = I and VALUE (MANTISSA (F)) * 2.0 ** EXPONENT (F) = F

    function Value   (Left : Standard.Long_Integer) return Integer;
    function Convert (Left : Integer) return Standard.Long_Integer;

    function In_Range (Left, Right1, Right2 : Integer) return Boolean;
    function In_Range (Left, Right1, Right2 : Float)   return Boolean;


    type Real is private;
    -- arbitrary precision real representation

    function Equal    (Left, Right : Real)          return Boolean;
    function "<"      (Left, Right : Real)          return Boolean;
    function "<="     (Left, Right : Real)          return Boolean;
    function ">"      (Left, Right : Real)          return Boolean;
    function ">="     (Left, Right : Real)          return Boolean;
    function In_Range (Left, Right1, Right2 : Real) return Boolean;

    function "+"   (Left : Real) return Real;
    function "-"   (Left : Real) return Real;
    function "abs" (Left : Real) return Real;

    function "+"  (Left, Right : Real)                    return Real;
    function "-"  (Left, Right : Real)                    return Real;
    function "*"  (Left, Right : Real)                    return Real;
    function "/"  (Left, Right : Real)                    return Real;
    function "**" (Left : Real; Right : Standard.Integer) return Real;

    function "*" (Left : Integer; Right : Real) return Real;
    function "*" (Left : Real; Right : Integer) return Real;
    function "/" (Left : Real; Right : Integer) return Real;

    function Zero return Real;
    function One  return Real;

    function Value (Left : Integer)        return Real;
    function Value (Left : Standard.Float) return Real;
    function Value (Left : Float)          return Real;
    function Value (N, D : Integer)        return Real;
    function Value (N, D : String)         return Real;

    function Value (Left : Real) return Integer;

    function Convert (Left : Real) return Standard.Float;
    function Convert (Left : Real) return Float;

    function Image (Left : Real) return String;

    function Mantissa (F : Real)              return Bit_String;
    function Exponent (F : Real)              return Standard.Integer;
    function Value    (Mantissa : Bit_String) return Real;

    function Numerator   (F : Real) return String;
    function Denominator (F : Real) return String;



    type Int is private;
    -- arbitrary precision integer type

    function Equal    (Left, Right : Int)          return Boolean;
    function "<"      (Left, Right : Int)          return Boolean;
    function "<="     (Left, Right : Int)          return Boolean;
    function ">"      (Left, Right : Int)          return Boolean;
    function ">="     (Left, Right : Int)          return Boolean;
    function In_Range (Left, Right1, Right2 : Int) return Boolean;

    function "+"   (Left : Int) return Int;
    function "-"   (Left : Int) return Int;
    function "abs" (Left : Int) return Int;

    function "+"  (Left, Right : Int)                    return Int;
    function "-"  (Left, Right : Int)                    return Int;
    function "*"  (Left, Right : Int)                    return Int;
    function "/"  (Left, Right : Int)                    return Int;
    function "**" (Left : Int; Right : Standard.Integer) return Int;

    function "*" (Left : Integer; Right : Int) return Int;
    function "*" (Left : Int; Right : Integer) return Int;
    function "/" (Left : Int; Right : Integer) return Int;

    function Zero return Int;
    function One  return Int;

    function Value (Left : Integer) return Int;
    function Value (Left : Int)     return Integer;

    function Image (Left : Int) return String;
    function Value (S : String) return Int;

    function Image (Left : Int)             return System.Byte_String;
    function Value (S : System.Byte_String) return Int;

    function Image (Left : Real)            return System.Byte_String;
    function Value (S : System.Byte_String) return Real;

end Universal;