Details
This is a Lehmer PRNG, using the constants proposed by D. H. Lehmer in 1949. This implementation of the generator uses 64-bit integers, which may explain some of the issues that are presented in the tests below.
Of particular note, this generator performed very poorly in the Plot test, showing a very limited range of possible outputs.
|
Pseudocode
// The current state value
state = 1138;
// Our constants
a = 16807
M = 2147483647
// random number generator
function RandomNumber() {
// Run the function
state = (a * state) % M;
// Return the new value
return state;
}
|
Period Length TestSeed | Period Length | Result |
---|
1138 | 64000 | Passed | 65535 | 64000 | Passed | 8675309 | 35307 | Failed | 16777216 | 19789 | Failed | 123456789 | 46488 | Failed | Minimum to Pass: 64,000
| Plot Test  |
Count the 1s TestSeed | % Bits that are 1s | Result |
---|
1138 | 50.24% | Passed | 65535 | 50.00% | Passed | 8675309 | 50.14% | Passed | 16777216 | 49.89% | Passed | 123456789 | 49.90% | Passed | Minimum to Pass: 45%
| Dartboard TestSeed | Darts Placed | Result |
---|
1138 | 6994 | Passed | 65535 | 7010 | Passed | 8675309 | 6973 | Passed | 16777216 | 6302 | Passed | 123456789 | 7019 | Passed | Minimum to Pass: 2,600
|
Crush TestSeed | Compression Rate | Result |
---|
1138 | 101.14% | Passed | 65535 | 101.14% | Passed | 8675309 | 101.14% | Passed | 16777216 | 101.14% | Passed | 123456789 | 101.14% | Passed | Minimum to Pass: 95%
| Unique Bytes TestSeed | Unique High Bytes | Unique Low Bytes | Result |
---|
1138 | 158 | 167 | Failed | 65535 | 161 | 166 | Passed | 8675309 | 165 | 169 | Passed | 16777216 | 157 | 152 | Failed | 123456789 | 151 | 148 | Failed | Minimum to Pass: 160
|
High/Low Byte TestSeed | High After High | High After Low | Low After High | Low After Low | Spread | Result |
---|
1138 | 2575 | 2464 | 2464 | 2496 | 151 | Passed | 65535 | 2567 | 2489 | 2490 | 2453 | 135 | Passed | 8675309 | 2412 | 2438 | 2439 | 2710 | 421 | Passed | 16777216 | 2482 | 2508 | 2507 | 2502 | 35 | Passed | 123456789 | 2420 | 2496 | 2496 | 2587 | 175 | Passed | Maximum to Pass: 500
|
Distribution TestSeed | 1138 | 65535 | 8675309 | 16777216 | 123456789 |
---|
0.0 to 0.1 | 1007 | 1027 | 956 | 1031 | 982 |
---|
0.1 to 0.2 | 1013 | 992 | 1001 | 1020 | 948 |
---|
0.2 to 0.3 | 972 | 980 | 922 | 993 | 1031 |
---|
0.3 to 0.4 | 1009 | 1017 | 964 | 976 | 1000 |
---|
0.4 to 0.5 | 1040 | 1041 | 1008 | 970 | 957 |
---|
0.5 to 0.6 | 1015 | 1019 | 998 | 970 | 983 |
---|
0.6 to 0.7 | 985 | 969 | 1026 | 1019 | 1044 |
---|
0.7 to 0.8 | 983 | 988 | 1090 | 1017 | 1057 |
---|
0.8 to 0.9 | 985 | 1003 | 984 | 980 | 1033 |
---|
0.9 to 1.0 | 992 | 965 | 1052 | 1025 | 966 |
---|
Spread | 167 | 213 | 353 | 223 | 329 |
---|
Result | Passed | Passed | Passed | Passed | Passed |
---|
Maximum to Pass: 500 |
Sample Output1924513948 | 2054701509 | 1831201923 | 1422560374 | 1036752635 | 19216573 | 850395211 | 1088633838 | 108234306 | 175331087 | 442014153 | 785931040 | 2118554080 | 1259538720 | 1320948705 | 498931911 | 1772466385 | 2096851288 | 1572933736 | 773594072 | 929563112 | 223684185 | 1363713295 | 1983857609 | 863715615 | 1626364474 | 1135842774 | 1127355547 | 216452126 | 73581970 | 1889072191 | 1238062105 | 1140733264 | 1717442353 | 725914104 | 583741641 | 1240456223 | 576485177 | 1687633712 | 95774800 | 1221811249 | 743019767 | 315810850 | 1400861743 | 1420081578 | 177817574 | 1430211851 | 786107694 | 792610562 | 564646991 | 291737226 | 522388999 | 878753169 | 959464088 | 258214185 | 1888838335 | 1602611609 | 1353399247 | 434344713 | 734671840 | 1746122529 | 1717294984 | 396566968 | 1459271433 | 1711714271 | 1090804089 | 76420848 | 209970832 | 664139761 | 1724444472 | 298927496 | 1110172601 | 1332971183 | 697256745 | 2123329727 | 2066942874 | 1413393270 | 1584058363 | 914122686 | 561965810 | 326284766 | 1342308819 | 868598694 | 2091894603 | 2017791214 | 2102648131 | 216226229 | 571898387 | 1906865510 | 1790147467 | 762569389 | 321309659 | 1477547741 | 1791461164 | 1367038388 | 2034120812 | 1676294773 | 648271700 | 1317915597 | 1061093307 |
|