Geez, kinda harsh, that article, no? I have a test program here, the first one shown, which draws dots on a flat surface. Much as the article showed. But, see for yourself. The results aren't bad at all. The second PRNG test program, instead, shows the distribution of values, and min, max, and mean. Also not half bad. (In both programs, press <esc> to quit.)
REM Program creates dots using random x and y coordinates
REM -------
DO
CALL Initialize
CALL DrawDots
LOOP
END
SUB Initialize
_TITLE "Random Number Distribution"
SCREEN _NEWIMAGE(840, 480, 12)
CLS
END SUB
SUB DrawDots
RANDOMIZE TIMER
COLOR 9
PRINT "First random number this cycle"; RND
DO
x = RND * 840
y = RND * 480
CIRCLE (x, y), 1, 14
_DELAY .005
IF INKEY$ = CHR$(27) THEN EXIT DO
LOOP
CLS
LOCATE 15, 35
INPUT "Start with new seed (y/n)"; cont$
IF cont$ = "n" THEN END
END SUB
This one draws a probability distribution chart.
REM RANDOM NUMBER GENERATOR TEST
REM
REM Generates a series of random numbers. Provides instantaneous value,
REM running mean, and distribution in 0 to 0.1, 0.1 to 0.2, ... , 0.9 to
REM 1.0 groups. The minimum and maximum random numbers generated are
REM listed.
REM
REM ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
DIM x(4000), xRunMean(4000), norm(4000, 10), total(10)
DO
REM -------
REM Zero out all bars and variables for new random number test.
REM -------
CALL zeroset(x(), xRunMean(), norm(), xMax, xMin, xTot, total())
CALL labels
REM -------
REM Now set new random number seed and start random number test, through
REM 4000 tries. Then loop back to start.
REM -------
CALL RandomTest(x(), xRunMean(), norm(), xMax, xMin, xTot, total())
LOOP
END
SUB zeroset (x(), xRunMean(), norm(), xMax, xMin, xTot, total())
_TITLE "Random Number Generator Test"
SCREEN _NEWIMAGE(840, 480, 12)
LINE (95, 400)-(100, 0), 0, BF
LINE (120, 400)-(125, 0), 0, BF
FOR j = 1 TO 10
LINE (220 + 55 * (j - 1), 400)-(225 + 55 * (j - 1), 0), 0, BF
NEXT j
FOR i = 1 TO 4000
x(i) = 0
xRunMean(i) = 0
FOR j = 1 TO 10
norm(i, j) = 0
total(j) = 0
NEXT j
NEXT i
xMax = 0
xMin = 1
xTot = 0
END SUB
SUB labels
CLS
SCREEN _NEWIMAGE(840, 480, 12)
COLOR 9
LOCATE 1, 1
PRINT "1.0"
LOCATE 14, 1
PRINT "0.5"
LOCATE 20, 1
PRINT "0.25"
LOCATE 24, 1
PRINT "0.1"
LOCATE 26, 1
PRINT "0.0"
LOCATE 21, 7
PRINT "Inst."
LOCATE 22, 7
PRINT "Value"
LOCATE 21, 17
PRINT "Running"
LOCATE 22, 17
PRINT "Mean"
LOCATE 22, 30
PRINT "<.1"
LOCATE 22, 37
PRINT "<.2"
LOCATE 22, 44
PRINT "<.3"
LOCATE 22, 50
PRINT "<.4"
LOCATE 22, 57
PRINT "<.5"
LOCATE 22, 64
PRINT "<.6"
LOCATE 22, 71
PRINT "<.7"
LOCATE 22, 77
PRINT "<.8"
LOCATE 22, 85
PRINT "<.9"
LOCATE 22, 91
PRINT "<1.0"
LOCATE 27, 5
PRINT "Sample# Running Mean"
LOCATE 27, 40
COLOR 9
PRINT "Min Value Max Value"
END SUB
SUB RandomTest (x(), xRunMean(), norm(), xMax, xMin, xTot, total())
pi = 3.1415926535897936
myseed = 1E10 * (1 / (pi - 3))
REM myseed = TIMER
RANDOMIZE myseed
FOR i = 1 TO 4000
x(i) = RND
NEXT i
FOR i = 1 TO 4000
LOCATE 2, 36
COLOR 9
PRINT "DISTRIBUTION OF RANDOM NUMBERS"
IF x(i) > xMax THEN xMax = x(i)
IF x(i) < xMin THEN xMin = x(i)
xTot = xTot + x(i)
xRunMean(i) = xTot / i
IF x(i) < .1 THEN total(1) = total(1) + 1
IF x(i) >= .1 AND x(i) < .2 THEN total(2) = total(2) + 1
IF x(i) >= .2 AND x(i) < .3 THEN total(3) = total(3) + 1
IF x(i) >= .3 AND x(i) < .4 THEN total(4) = total(4) + 1
IF x(i) >= .4 AND x(i) < .5 THEN total(5) = total(5) + 1
IF x(i) >= .5 AND x(i) < .6 THEN total(6) = total(6) + 1
IF x(i) >= .6 AND x(i) < .7 THEN total(7) = total(7) + 1
IF x(i) >= .7 AND x(i) < .8 THEN total(8) = total(8) + 1
IF x(i) >= .8 AND x(i) < .9 THEN total(9) = total(9) + 1
IF x(i) >= .9 THEN total(10) = total(10) + 1
FOR j = 1 TO 10
norm(i, j) = total(j) / i
NEXT j
LINE (95, 400)-(100, 400 - x(i - 1) * 400), 0, BF
LINE (95, 400)-(100, 400 - x(i) * 400), 12, BF
LINE (120, 400)-(125, 400 - xRunMean(i - 1) * 400), 0, BF
LINE (120, 400)-(125, 400 - xRunMean(i) * 400), 11, BF
FOR j = 1 TO 10
LINE (220 + 55 * (j - 1), 400)-(225 + 55 * (j - 1), 400 - norm(i - 1, j) * 400), 0, BF
LINE (220 + 55 * (j - 1), 400)-(225 + 55 * (j - 1), 400 - norm(i, j) * 400), 13, BF
NEXT j
LINE (1, 1)-(840, 1), 7
LINE (1, 200)-(840, 200), 7
LINE (1, 300)-(840, 300), 7
LINE (1, 360)-(840, 360), 7
LINE (1, 400)-(840, 400), 7
LOCATE 4, 67
PRINT "RNG seed ="; myseed
LOCATE 28, 5
COLOR 14
PRINT USING "#####"; i
LOCATE 28, 10
PRINT USING "######.#####"; xRunMean(i)
LOCATE 28, 40
PRINT USING "###.#####"; xMin; xMax
_DELAY .05
IF INKEY$ = CHR$(27) THEN END
NEXT i
END SUB