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 - metrics - download
Index: T V

⟦1d6baa14b⟧ TextFile

    Length: 1707 (0x6ab)
    Types: TextFile
    Names: »V«

Derivation

└─⟦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⟧ 

TextFile

with Floating_Characteristics;
use Floating_Characteristics;

package Numeric_Primitives is

    --  This may seem a little much but is put in this form to allow the
    --  same form to be used for a generic package
    --  If that is not needed, simple litterals could be substituted
    Zero : Float := Convert_To_Float (Integer (0));
    One : Float := Convert_To_Float (Integer (1));
    Two : Float := One + One;
    Three : Float := One + One + One;
    Half : Float := One / Two;

    --  The following "constants" are effectively deferred to
    --  the initialization part of the package body
    --  This is in order to make it possible to generalize the floating type
    --  If that capability is not desired, constants may be included here
    Pi : Float;
    One_Over_Pi : Float;
    Two_Over_Pi : Float;
    Pi_Over_Two : Float;
    Pi_Over_Three : Float;
    Pi_Over_Four : Float;
    Pi_Over_Six : Float;

    function Sign (X, Y : Float) return Float;
    --  Returns the value of X with the sign of Y

    function Max (X, Y : Float) return Float;
    --  Returns the algebraicly larger of X and Y

    function Min (X, Y : Float) return Float;
    --  Returns the algebraicly smaller of X and Y

    function Truncate (X : Float) return Float;
    --  Returns the floating value of the integer no larger than X
    --  AINT(X)

    function Round (X : Float) return Float;
    --  Returns the floating value nearest X
    --  AINTRND(X)

    function Ran return Float;
    --  This uses a portable algorithm and is included at this point
    --  Algorithms that presume unique machine hardware information
    --  should be initiated in FLOATING_CHARACTERISTICS
end Numeric_Primitives;