I was doing the final tests when I bumped into a major deficiency for STDMIN-1990. So I checked OEIS and found out the values were WAY off. The original version, however, was right on the spot (A096550). So I concluded something more than just the multiplication factor must have been changed.
Still, the original version came out fine with the tests. Good distribution.
The improvements for the 32-bit version (with WYhash16) were significant:
BSD PRNG
Random generator test... Wait!
0 1 2 3 4 5 6 7 8 9
------ ------ ------ ------ ------ ------ ------ ------ ------ ------
100030 99634 100228 100523 99941 99930 100567 99915 99752 99480
------ ------ ------ ------ ------ ------ ------ ------ ------ ------
30 -366 228 523 -59 -70 567 -85 -248 -520
WYhash16 PRNG
Random generator test... Wait!
0 1 2 3 4 5 6 7 8 9
------ ------ ------ ------ ------ ------ ------ ------ ------ ------
99992 99973 100092 99965 99977 99997 100092 99899 100023 99990
------ ------ ------ ------ ------ ------ ------ ------ ------ ------
-8 -27 92 -35 -23 -3 92 -101 23 -10
A much more even distribution. That even translates to 64-bit:
STDMIN-1987
Random generator test... Wait!
0 1 2 3 4 5 6 7 8 9
------ ------ ------ ------ ------ ------ ------ ------ ------ ------
99829 99293 99799 100021 100489 99633 100521 99710 100568 100137
------ ------ ------ ------ ------ ------ ------ ------ ------ ------
-171 -707 -201 21 489 -367 521 -290 568 137
WYhash16 PRNG
Random generator test... Wait!
0 1 2 3 4 5 6 7 8 9
------ ------ ------ ------ ------ ------ ------ ------ ------ ------
99976 99973 100072 99972 100007 99986 100084 99901 100019 100010
------ ------ ------ ------ ------ ------ ------ ------ ------ ------
-24 -27 72 -28 7 -14 84 -99 19 10
But the extended range of MINSTD seems more fitting in a 64-bit environment. If you don't agree with me, simply include wyhash16.4th before including choose.4th. That's all. However, it proves it's a nifty little routine!
That's all. Soon everything will be in SVN.
Hans Bezemer