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: ┃ B T

⟦688b56112⟧ TextFile

    Length: 1378 (0x562)
    Types: TextFile
    Names: »B«

Derivation

└─⟦a7d1ea751⟧ Bits:30000550 8mm tape, Rational 1000, !users!projects 94_04_11
    └─ ⟦129cab021⟧ »DATA« 
        └─⟦this⟧ 
└─⟦2f6cfab89⟧ Bits:30000547 8mm tape, Rational 1000, !projects 94-01-04
    └─ ⟦d65440be7⟧ »DATA« 
        └─⟦this⟧ 

TextFile

with Text_Io;
package body Complexe is
    procedure Make (X : out Nombre;
                    Partie_Reelle : in Float;
                    Partie_Imaginaire : in Float) is

    begin
        X.Reelle := Partie_Reelle;
        X.Imaginaire := Partie_Imaginaire;
    end Make;

    function "+" (X, Y : in Nombre) return Nombre is
    begin
        return (X.Reelle + Y.Reelle, X.Imaginaire + Y.Imaginaire);
    end "+";

    function "-" (X, Y : in Nombre) return Nombre is
    begin
        return (X.Reelle - Y.Reelle, X.Imaginaire - Y.Imaginaire);
    end "-";

    function "*" (X, Y : in Nombre) return Nombre is
    begin
        return (X.Reelle * Y.Reelle - X.Imaginaire * Y.Imaginaire,
                X.Reelle * Y.Imaginaire + Y.Reelle * X.Imaginaire);
    end "*";

    function Partie_Reelle (X : in Nombre) return Float is

    begin
        return X.Reelle;
    end Partie_Reelle;

    function Partie_Imaginaire (X : in Nombre) return Float is

    begin
        return X.Imaginaire;
    end Partie_Imaginaire;

    procedure Image (X : in Nombre) is
        package Io is new Text_Io.Float_Io (Float);
    begin
        -- Text_Io.Put (X);
        Io.Put (Complexe.Partie_Reelle (X), Aft => 2, Exp => 0);
        Text_Io.Put ("+i");
        Io.Put (Complexe.Partie_Imaginaire (X), Aft => 2, Exp => 0);
        Text_Io.Put_Line ("");
    end Image;
end Complexe;