For what it's worth I was investigating/testing PRNGs in Forth. Lee Stewart helped me speed up a test routine
The method I was testing came from GNU Forth. The method is so simple it's hard to believe it works, but when I compared it against the slightly more complicated method from TI-Forth it seems a little better.
It repeats every 64K numbers and gives similar "randomness" The calculations must all be integers. I tried it BASIC and it overflows.
2 PRIME= 28649
3 SEED= INT(SEED*PRIME)+1
SEED @ 6FE5 * 7AB9 + 5 SRC DUP SEED ! ; \ 28 bytes + SRC
I was scratching my head how to test these things I developed 2 tests.
One test is test repeatability in the sequence. It gets a random number and then gets new random #s until the first one shows up again.
The TI Forth method duplicates after 20,000 or so. The GNU Forth method goes for 64K numbers before repeating.
To see how random the numbers are I did this: (pseudo-code)
Get a random screen position
Getchar at random position
If char is a space
then put "A" at the position
else incr. char at the position
This test took over 6000 loops to fill the screen!