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

⟦0da10717a⟧ TextFile

    Length: 933 (0x3a5)
    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;
use Text_Io;
procedure Pi is

    package Real_Io is new Float_Io (Float);
    use Real_Io;

    package Int_Io is new Integer_Io (Integer);
    use Int_Io;

    Epsilon : constant := Float'Epsilon;

    function Sqrt is new Sqrt (Float) is

    procedure Pi_Comp is

        Pi : Float := 1.0;
        N : Integer := 1;
        Temp : Float;
        Sum : Float := 1.0;

    begin
        loop

            N := N + 2;
            Temp := 1.0 / Float (N) ** 4;

            Put ("Term number ");
            Put ((N + 1) / 2);
            Put (" is: ");
            Put (Temp);
            New_Line;

            exit when Temp <= Epsilon;

            Sum := Sum + Temp;

        end loop;

        Put ("The sum is: ");
        Put (Sum);
        New_Line;
        Pi := Sqrt (Sqrt (96.0 * Sum));

        Put ("The value of PI is ");
        Put (Pi);
        New_Line;

    end Pi_Comp;

begin
    Pi_Comp;
end Pi;