Implementation
This version of the
Lehmer Generator uses the constants proposed by Park and Miller in their 1988 paper, "Random Number Generators: Good Ones Are Hard to Find". These values were popularized by the work, and provide an idea of how random the earliest versions of the
Lehmer Generator were in practice.
These constants are:
This gives the generator a possible range of 0 to 2,147,483,646.
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 | 7015 | PASS |
65535 | 7000 | PASS |
8675309 | 6979 | PASS |
16777216 | 6969 | PASS |
123456789 | 6930 | PASS |
SEED | 70% or higher required to pass. |
1138 | 101% | PASS |
65535 | 101% | PASS |
8675309 | 101% | PASS |
16777216 | 101% | PASS |
123456789 | 101% | PASS |
|
An ideal result for this test. |
1924514014 | 2055825831 | 1400345034 | 1325698965 | 879667130 | 1288027962 | 1250795574 | 403791735 | 479365625 | 1486899478 | 52326607 | 1132472226 | 313139021 | 1592590797 | 437348971 | 1835115563 | 627129127 | 309498013 | 527711457 | 138995689 |
1785820734 | 1057625866 | 795783643 | 207534385 | 516965967 | 2075655254 | 1813492110 | 126490899 | 2071212610 | 160418400 | 1060071815 | 1102659193 | 1756666788 | 693526960 | 1713864451 | 721670746 | 132589766 | 1495655223 | 1181244826 | 1842957714 |
1433658517 | 732175879 | 598701043 | 1407543506 | 2051333637 | 1061968121 | 761619430 | 1535223890 | 491900525 | 1707566372 | 96555696 | 1461429187 | 1469875170 | 1687590749 | 1521192514 | 889765263 | 1356141180 | 1420866649 | 487615103 | 549439169 |
244431283 | 20356670 | 684652817 | 742514693 | 416972534 | 818238777 | 1801333298 | 1931767727 | 1562412343 | 34213285 | 1644547246 | 1791026632 | 506324025 | 1457678761 | 713491151 | 97090009 | 1851693190 | 74432006 | 1143242288 | 936944707 |
1879590745 | 797203845 | 454549282 | 1010450195 | 335746889 | 1458422754 | 332879620 | 512872905 | 2003038924 | 1121545296 | 1347820153 | 1155802915 | 1590005290 | 2079889409 | 2109974844 | 949740197 | 37542828 | 1769601625 | 1193484072 | 1389535124 |
32167943 | 1628222604 | 153191707 | 2007610443 | 645653837 | 269170168 | 1342452994 | 1144274776 | 1110101347 | 135413893 | 1716117478 | 2081073536 | 536760863 | 1908507041 | 1462086495 | 1779832491 | 1344957174 | 282355096 | 1750722249 | 1715391396 |
615231597 | 63690474 | 998940312 | 162671538 | 273856535 | 649328224 | 1895050361 | 781448670 | 1945295285 | 1286813067 | 159408132 | 1260366715 | 204684997 | 2019425732 | 1656720536 | 229081550 | 1882915426 | 840542590 | 851880164 | 276441799 |
1150187332 | 1698182277 | 1291860909 | 1246626393 | 1199327019 | 807697591 | 729279250 | 1307181321 | 1038753237 | 1431087796 | 475740972 | 696898623 | 399346023 | 922211686 | 1222326203 | 807926619 | 283585552 | 956159771 | 557140696 | 834976752 |
1796121366 | 234172483 | 1546880477 | 983146357 | 1001642081 | 474146534 | 1816466568 | 726082624 | 1268579314 | 794882982 | 102510487 | 611870115 | 1549320969 | 1198306108 | 829115590 | 2071819394 | 1768702500 | 1114275726 | 1574725042 | 815315266 |
2058007802 | 1565509632 | 550741980 | 665939290 | 1904362513 | 524481103 | 1681010833 | 454210299 | 1755613855 | 176751205 | 687618634 | 1196877131 | 434619268 | 1054153829 | 423316253 | 62941660 | 1298525296 | 1585829058 | 609434889 | 1422666880 |
679326462 | 1416779382 | 512395338 | 419021296 | 892043359 | 989395006 | 795987121 | 1479905484 | 615870034 | 56482898 | 120294712 | 1011112757 | 734008188 | 1329547348 | 1134930801 | 832219753 | 556395760 | 1199739282 | 1294150891 | 1079648221 |
1558316844 | 2068121943 | 1902669306 | 2131522112 | 169937130 | 2127577047 | 437222732 | 1860900337 | 200129051 | 609568955 | 1528430495 | 131944051 | 1380541453 | 1346878383 | 359860054 | 853977626 | 1168747281 | 102632658 | 517714465 | 1770759258 |
1322469080 | 282081110 | 1440806841 | 614973115 | 14350794 | 675626294 | 1505081569 | 696052170 | 1205395981 | 1877010516 | 380967982 | 1280121767 | 1515362323 | 1685992888 | 435746451 | 671365687 | 764020071 | 1080607884 | 507503709 | 1957274926 |
765176536 | 1189962316 | 181440501 | 43721567 | 388969295 | 466719597 | 1545987935 | 1014578492 | 1000557864 | 1579064238 | 729738440 | 434853063 | 688579100 | 159560017 | 1665614263 | 1529579596 | 117531735 | 1818398552 | 984683007 | 1058314867 |
1638405215 | 1641126671 | 135997429 | 786188795 | 8197574 | 337672810 | 1615122296 | 1167130792 | 851589446 | 1832795314 | 285409830 | 1552029059 | 1616018151 | 1191380248 | 390303508 | 1416001018 | 315333472 | 1967506755 | 932834779 | 1523507553 |
1143920090 | 1591344686 | 968797864 | 364688694 | 404551520 | 364170238 | 280796116 | 1318749153 | 38293784 | 1506017235 | 1389405103 | 2141872290 | 179203369 | 1098949689 | 1688058823 | 798177644 | 1788803546 | 1797623269 | 1854336087 | 1543928945 |
768871914 | 1021154599 | 2003522216 | 654299352 | 1692936424 | 1171639065 | 1460206112 | 241006468 | 441549434 | 1565336853 | 1941812621 | 735737688 | 332482790 | 285802036 | 1701384360 | 1422178715 | 1064671895 | 1106792461 | 357541713 | 544326085 |
208174375 | 535859662 | 1794407363 | 1491695120 | 1195786762 | 1436140308 | 1641447923 | 1240312499 | 308409264 | 1556459837 | 922176352 | 628467665 | 1331469709 | 1231797423 | 1076931281 | 991862851 | 1470868743 | 1206702984 | 221489820 | 990244489 |
40862373 | 1726619618 | 349397815 | 1108785807 | 1647453230 | 1239775839 | 2026182879 | 1407456874 | 595309613 | 242354318 | 1620027914 | 2011473932 | 1154804050 | 1981950411 | 1021709060 | 584930008 | 1885992137 | 1011216839 | 335830715 | 719802689 |
948410472 | 1311174870 | 1586338223 | 577036456 | 215566140 | 215202491 | 545804689 | 1436751686 | 1179459734 | 1905687528 | 1319171738 | 698228938 | 1283113758 | 262147532 | 1424610327 | 1130585486 | 814954546 | 290354056 | 897773208 | 654203034 |