|
|
DataMuseum.dkPresents historical artifacts from the history of: Rational R1000/400 Tapes |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about Rational R1000/400 Tapes Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - downloadIndex: T V
Length: 3423 (0xd5f)
Types: TextFile
Names: »V«
└─⟦180fe333a⟧ Bits:30000405 8mm tape, Rational 1000, SW CATALOG, 10_20_0
└─⟦180fe333a⟧ Bits:30000537 8mm tape, Rational 1000, SW Catalog 10_20_0
└─⟦5cb1d1d7f⟧ »DATA«
└─⟦3b1ee7bd8⟧
└─⟦this⟧
with System;
package Universal_Integer_Arithmetic is
-- This package implements the Ada type Universal_integer.
-- The operations defined on universal integers are those specified in
-- chapter 4 of the RM. Since the equality and inequality operators can
-- not be overloaded, an equality operation is defined. In addition,
-- conversions between INTEGER, STRING and Universal_integer are defined.
type Universal_Integer is private;
function "+" (X, Y : Universal_Integer) return Universal_Integer;
function "-" (X, Y : Universal_Integer) return Universal_Integer;
function "*" (X, Y : Universal_Integer) return Universal_Integer;
function "/" (X, Y : Universal_Integer) return Universal_Integer;
function "mod" (X, Y : Universal_Integer) return Universal_Integer;
function "rem" (X, Y : Universal_Integer) return Universal_Integer;
function "**" (X : Universal_Integer; Y : Integer) return Universal_Integer;
function "-" (X : Universal_Integer) return Universal_Integer;
function "abs" (X : Universal_Integer) return Universal_Integer;
function ">=" (X, Y : Universal_Integer) return Boolean;
function ">" (X, Y : Universal_Integer) return Boolean;
function "<=" (X, Y : Universal_Integer) return Boolean;
function "<" (X, Y : Universal_Integer) return Boolean;
function Eql (X, Y : Universal_Integer) return Boolean;
function Int (X : Universal_Integer) return Integer;
function Int (X : Universal_Integer) return Long_Integer;
-- Converts a universal integer to a integer. The exception
-- NUMERIC_ERROR is raised if the universal integer x has a value
-- outside the integer range.
function Ui (I : Integer) return Universal_Integer;
function Ui (I : Long_Integer) return Universal_Integer;
-- Constructs a universal integer from an integer;
function Image (X : Universal_Integer) return String;
-- Converts the universal integer x into its string image, that is, a
-- sequence of characters representing the value in display form. The
-- image of a universal integer value is the corresponding decimal
-- literal; without underlines, leading zeros, exponent or trailing spaces;
-- but with a single leading minus sign or space. The lower bound of the
-- image string is one.
function Value (S : String) return Universal_Integer;
-- Converts the string s int a universal integer value. The string must
-- have the syntax of an optionally signed decimal integer literal;
-- otherwise, the exception CONSTRAINT_ERROR is raised. The exponent of
-- the decimal literal, if present, must not exceed INTEGER'LAST.
function I_Zero return Universal_Integer;
function I_One return Universal_Integer;
function I_Two return Universal_Integer;
function I_Ten return Universal_Integer;
-- Conversion to/from pure-value form of Universal_Integer
function Image (I : Universal_Integer) return System.Byte_String;
function Value (S : System.Byte_String) return Universal_Integer;
function Scaled_Value
(X : Universal_Integer; Y : Universal_Integer) return Float;
-- returns an approximation to X/Y expressed as a standard
-- float value. As much accuracy as possible is preserved.
private
type Vector;
type Universal_Integer is access Vector;
end Universal_Integer_Arithmetic;