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

⟦848c9d48f⟧ TextFile

    Length: 1207 (0x4b7)
    Types: TextFile
    Names: »B«

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 Instrument;
use Instrument;

procedure Sieva2 is

    -- PRAGMA SUPPRESS (ACCESS_CHECK);
    -- PRAGMA SUPPRESS (DISCRIMINANT_CHECK);
    -- PRAGMA SUPPRESS (INDEX_CHECK);
    -- PRAGMA SUPPRESS (LENGTH_CHECK);
    -- PRAGMA SUPPRESS (RANGE_CHECK);
    -- PRAGMA SUPPRESS (DIVISION_CHECK);
    -- PRAGMA SUPPRESS (OVERFLOW_CHECK);
    -- PRAGMA SUPPRESS (STORAGE_CHECK);

    Size : constant Integer := 8_190;
    Flags : array (0 .. Size) of Boolean;
    Count : Integer := 0;
    Times : constant Integer := 1000;

    procedure Primes is
        Prime, K : Integer;
    begin
        for I in 0 .. Size loop
            Flags (I) := True;
        end loop;
        Count := 2;

        for I in 0 .. Size loop
            if Flags (I) = True then
                Prime := I + I + 3;
                K := I + Prime;
                while K <= Size loop
                    Flags (K) := False;
                    K := K + Prime;
                end loop;
                Count := Count + 1;
            end if;
        end loop;
        null;
    end Primes;

begin
    Start ("SIEVA2", "Sieve of Eratosthenes (test)");
    for I in 1 .. Times loop
        Primes;
    end loop;
    Stop;
end Sieva2;