Implementation
RANDU is a variant of the
Lehmer Generator. It uses 65539 as the value for
a and 2
31 for
M.
RANDU is often considered to be the black eye on the face of early pseudo random number generators; it's even been labeled "the most ill-conceived RNG ever designed". Although this generator faired well in this study, RANDU will fail a proper spectral test spectacularly.
Test Results
SEED | Number indicates how many results could be obtained before the generator fell into a loop. |
1138 | - | PASS |
65535 | - | PASS |
8675309 | - | PASS |
16777216 | - | PASS |
123456789 | - | PASS |
|
This generator produced an ideal distribution of outcomes. |
SEED | Minimum of 6,000 darts placed needed to pass. |
1138 | 7000 | PASS |
65535 | 6981 | PASS |
8675309 | 7028 | PASS |
16777216 | 6984 | PASS |
123456789 | 6976 | PASS |
SEED | 70% or higher required to pass. |
1138 | 101% | PASS |
65535 | 101% | PASS |
8675309 | 101% | PASS |
16777216 | 101% | PASS |
123456789 | 101% | PASS |
|
Despite its flaws, RANDU managed to create the ideal result for this test. |
1635393743 | 1161700707 | 1964898982 | 1510005296 | 1748189843 | 2066585633 | 162184897 | 1539395480 | 1658627660 | 1323481247 | 625461156 | 930849148 | 1206866796 | 725256740 | 198440162 | 408811086 | 1063785382 | 1373551043 | 794808584 | 1596445144 |
1867527129 | 30046766 | 2139976222 | 1892111735 | 667804150 | 1499460990 | 27169596 | 404208881 | 87582467 | 1990999929 | 595504070 | 373443152 | 219614069 | 851065997 | 1421613852 | 424737486 | 1187062540 | 2001729191 | 1553453719 | 1751068918 |
1779721122 | 568327953 | 1689338099 | 1862765629 | 1498710728 | 247872259 | 1733676693 | 77019757 | 1211283573 | 286112198 | 1827622765 | 373016616 | 182158576 | 629318791 | 353319067 | 2009650159 | 994732897 | 490780857 | 276522157 | 371150590 |
291248441 | 1296920163 | 1447814597 | 1755930088 | 400878349 | 851177713 | 153434188 | 1404812078 | 912382211 | 2083059661 | 1816715195 | 613840837 | 1703456892 | 1628888199 | 2144098244 | 1462372071 | 207995659 | 1748787692 | 446821951 | 1176836097 |
1785779278 | 329339342 | 212999341 | 1120104299 | 934663113 | 2062215879 | 1535686189 | 1221056922 | 871505503 | 976601858 | 1906556274 | 308157344 | 1387952028 | 1875643466 | 1538196600 | 394642632 | 190414180 | 527470303 | 1831922558 | 856792286 |
907230398 | 1593320033 | 1061823765 | 1660153300 | 380669798 | 1400363923 | 1442527658 | 1000102134 | 197886492 | 629054955 | 241640639 | 1341426443 | 2062106891 | 835172598 | 1313705586 | 2036025330 | 872729231 | 1721616311 | 2073109602 | 387343435 |
697195278 | 1471767623 | 1802755145 | 514157509 | 1203077274 | 1471877434 | 409723686 | 745134666 | 1602742194 | 105543208 | 151482125 | 170090294 | 2107650536 | 717852923 | 290982021 | 1015888959 | 1910975960 | 59665753 | 2013548327 | 926211456 |
52365035 | 273160959 | 1272410509 | 1427369047 | 1804824366 | 837362867 | 980341228 | 20507299 | 1850589786 | 222569388 | 1266189708 | 1744185238 | 1601783472 | 1696371460 | 1113228103 | 1247219339 | 1838202960 | 151198740 | 924673602 | 194683138 |
1137834555 | 1169258070 | 1198190182 | 1151818249 | 671061867 | 258610753 | 1149198743 | 789949893 | 990275451 | 412003455 | 1982543514 | 421302311 | 1534911150 | 1965383429 | 1047922524 | 1119785729 | 1530740353 | 1345942015 | 1655436913 | 511027373 |
68040435 | 1126018293 | 1984859419 | 1879544816 | 1678220257 | 1207475124 | 1939759886 | 1038749801 | 1244114192 | 193436545 | 1041754514 | 601503975 | 611709546 | 1607213098 | 1066344472 | 1590026087 | 2075745218 | 1324288699 | 2005450256 | 615196996 |
390448419 | 183795189 | 517115848 | 1816128765 | 834510713 | 884097511 | 1610493722 | 1326796108 | 982287888 | 901121866 | 678199627 | 2056311994 | 1148023634 | 1083892434 | 614672813 | 395757134 | 219316760 | 693084269 | 475804647 | 150721646 |
1868664641 | 1567001736 | 616325223 | 1318873774 | 1451482436 | 1624261845 | 1732677665 | 1173716722 | 1356007618 | 2067512301 | 765536833 | 858053126 | 1937044572 | 1320928256 | 808708473 | 2048203987 | 185813670 | 1809839640 | 968407562 | 1731502480 |
1462678299 | 950519728 | 1906821216 | 492321906 | 343601159 | 762837259 | 24331794 | 1248580892 | 878711853 | 827172168 | 959533684 | 2114480575 | 1675180368 | 1692169124 | 574235815 | 190165610 | 1416310249 | 724251283 | 873786896 | 172962395 |
1363717039 | 529114528 | 71118836 | 1017878614 | 1314472538 | 761684930 | 1811252755 | 1240754726 | 1208210012 | 711460637 | 106261032 | 2099792674 | 1117510585 | 596449380 | 51089479 | 426358508 | 53041048 | 1628704026 | 811002232 | 2055019798 |
210652223 | 1911160281 | 1402461537 | 1479098196 | 1204842064 | 1170332306 | 735583035 | 516139362 | 95238574 | 1253423204 | 411418265 | 136998103 | 89544410 | 1725763386 | 1137834858 | 1189116387 | 1317337963 | 1727696716 | 1144814555 | 1217461259 |
1438549316 | 109067083 | 1321975521 | 725932604 | 1544217918 | 2036295633 | 1408248372 | 637871742 | 411942789 | 154038187 | 188113246 | 50412167 | 1133163927 | 3647452 | 679671811 | 1905015055 | 229936712 | 929416769 | 1819459983 | 115875221 |
843933327 | 2104989768 | 279954378 | 1977183421 | 1313485292 | 483078746 | 146526373 | 1792574310 | 1139826661 | 733390737 | 716525089 | 1312899022 | 714234862 | 1537566959 | 2078274073 | 1706675725 | 2134586780 | 860790605 | 960054405 | 1882275842 |
278306923 | 1378812526 | 2029759401 | 379385077 | 952896537 | 914200036 | 962408104 | 1522532019 | 250851739 | 1584804536 | 1310414102 | 1063820154 | 1504989504 | 1583195946 | 1111732795 | 2030476089 | 105759675 | 1453610956 | 1538897070 | 1205589375 |
756224054 | 393185993 | 1360514874 | 1115819999 | 1466283170 | 986959027 | 2100222913 | 1397656995 | 126832520 | 1714814390 | 811124112 | 1452978530 | 892518749 | 1626713725 | 1365167460 | 1098975979 | 1332650948 | 303073835 | 1079820962 | 62441633 |
1405837652 | 1555483540 | 1639521323 | 1096226805 | 1543162510 | 1585387425 | 857670627 | 490762728 | 1235849273 | 1832272895 | 195208812 | 1230244489 | 1720037956 | 1708516313 | 358315833 | 927699042 | 910499774 | 1116588997 | 326035564 | 582541346 |