PROGRAM FILE 134: KOMOLGOROV-SMIRNOV UNIFORMITY TEST FOR
        RND FUNCTION.
    ANSI STANDARD 8.4

SECTION 134.1: KOMOLGOROV-SMIRNOV UNIFORMITY TEST FOR
        RND FUNCTION.

THIS PROGRAM RUNS 30 TESTS OF 1000 SAMPLES EACH TO CHECK
UNIFORMITY OF DISTRIBUTION OF RANDOM NUMBERS. KOMOLGOROV-
SMIRNOV (K-S) STATISTICS (K+ AND K-) ARE GENERATED FOR
EACH TEST. THESE TWO NUMBERS ARE A MEASURE OF THE GREATEST
DEVIATION, IN THE POSITIVE AND NEGATIVE DIRECTION, OF THE
ACCUMULATION OF THE 1000 NUMBERS FROM THE IDEAL DISTRIBUTION
OF F(X)=X, 0<=X<1.

THESE TWO SETS (K+ AND K-) OF 30 STATISTICS THEMSELVES HAVE
AN EXPECTED DISTRIBUTION OF F(X) = 1 - EXP(-2*X*X). THE
K-S TEST IS RUN AGAIN ON EACH OF THESE TWO SETS, AND IF
THE DEVIATION IS TOO GREAT (TOP OR BOTTOM 1%) FOR ANY ONE 
OF THE RESULTING STATISTICS, THEN THE TEST FAILS.

                 BEGIN TEST


TEST           K+             K-
 1              .45523         .595488 
 2              .988115        .378654 
 3              .794192        .135876 
 4              .449372        .549567 
 5              .423212        .620993 
 6              .438139        .357999 
 7              .336397        .850161 
 8              .694538        .349392 
 9              .520826        .617221 
 10             1.07113        .341656 
 11             .377583        .620679 
 12             .380771        .932965 
 13             .985349        .208854 
 14             .114939        .814205 
 15             .491076        .825009 
 16             .932995        .170729 
 17             .402152        .753239 
 18             .899287        .311487 
 19             1.16556        .142661 
 20             .605815        .315683 
 21             4.64517E-2     1.50504 
 22             .622752        .71263 
 23             .798493        .256347 
 24             .516858        .711673 
 25             .107246        .924347 
 26             .471567        .451034 
 27             .211972        .947588 
 28             .405545        .532419 
 29             .647631        .321755 
 30             .654656        .786338 

SUMMARY K-S STATISTICS FOR THE K+ VALUES
K+ =  .810345         K- =  .445969 


SUMMARY K-S STATISTICS FOR THE K- VALUES
K+ =  .825382         K- =  .198557 


ALL RESULTS SHOULD FALL BETWEEN .04354 AND 1.4801

*** TEST PASSED ***


               END TEST

END PROGRAM 134

Program interrupted at line 1420
