Details
RANDU was a popular Lehmer generator. Once the flaws in its output became widely known, it was abandoned in favor of more reliable generators.
The biggest flaw with this generator is that the output tends to cluster in groups, as clearly evidenced by the lower resolution Plot test result. A 3D spetrum plot, which is not part of our tests, would make the output groupings extremely noticable.
|
Pseudocode
// This code is adapted from RANDU's implementation
// in the GNU Scientific Library.
//
// https://www.gnu.org/software/gsl/
// The current state value
state = 1138;
// Our constants
a = 65539;
M = 2147483647;
// random number generator
function RandomNumber() {
// Run the math
state := (a * state) % M;
// And return it
return state;
}
|
Period Length TestSeed | Period Length | Result |
---|
1138 | 64000 | Passed | 65535 | 64000 | Passed | 8675309 | 64000 | Passed | 16777216 | 64000 | Passed | 123456789 | 64000 | Passed | Minimum to Pass: 64,000
| Plot Test  |
Count the 1s TestSeed | % Bits that are 1s | Result |
---|
1138 | 49.93% | Passed | 65535 | 50.07% | Passed | 8675309 | 49.96% | Passed | 16777216 | 49.97% | Passed | 123456789 | 50.01% | Passed | Minimum to Pass: 45%
| Dartboard TestSeed | Darts Placed | Result |
---|
1138 | 6961 | Passed | 65535 | 6947 | Passed | 8675309 | 6971 | Passed | 16777216 | 7034 | Passed | 123456789 | 6992 | 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 | 162 | 162 | Passed | 65535 | 160 | 165 | Passed | 8675309 | 167 | 147 | Failed | 16777216 | 163 | 177 | Passed | 123456789 | 164 | 154 | Failed | Minimum to Pass: 160
|
High/Low Byte TestSeed | High After High | High After Low | Low After High | Low After Low | Spread | Result |
---|
1138 | 2460 | 2483 | 2482 | 2574 | 149 | Passed | 65535 | 2546 | 2487 | 2487 | 2479 | 93 | Passed | 8675309 | 2455 | 2484 | 2485 | 2575 | 151 | Passed | 16777216 | 2615 | 2453 | 2453 | 2478 | 231 | Passed | 123456789 | 2586 | 2459 | 2459 | 2495 | 173 | Passed | Maximum to Pass: 500
|
Distribution TestSeed | 1138 | 65535 | 8675309 | 16777216 | 123456789 |
---|
0.0 to 0.1 | 966 | 976 | 963 | 1048 | 1014 |
---|
0.1 to 0.2 | 1037 | 1015 | 1014 | 1052 | 1024 |
---|
0.2 to 0.3 | 1029 | 1011 | 1004 | 1014 | 998 |
---|
0.3 to 0.4 | 963 | 999 | 1010 | 1015 | 991 |
---|
0.4 to 0.5 | 949 | 1033 | 949 | 941 | 1019 |
---|
0.5 to 0.6 | 995 | 1007 | 1001 | 1008 | 974 |
---|
0.6 to 0.7 | 1014 | 1061 | 1009 | 969 | 993 |
---|
0.7 to 0.8 | 1027 | 978 | 1002 | 995 | 1035 |
---|
0.8 to 0.9 | 994 | 963 | 1038 | 953 | 966 |
---|
0.9 to 1.0 | 1027 | 958 | 1011 | 1006 | 987 |
---|
Spread | 267 | 253 | 177 | 285 | 183 |
---|
Result | Passed | Passed | Passed | Passed | Passed |
---|
Maximum to Pass: 500 |
Sample Output1635393479 | 1144348501 | 737484287 | 568220158 | 1066995195 | 1288055282 | 272924118 | 782465411 | 91057289 | 2094089627 | 1007603922 | 83784311 | 24270694 | 1539114546 | 426316438 | 1590769602 | 1412802374 | 602338771 | 1636295033 | 101753963 | 916254018 | 286836679 | 2064734038 | 1217005059 | 1604391434 | 820852254 | 1223008859 | 2097932049 | 1580512563 | 1339105178 | 252534478 | 200678507 | 1078809921 | 371785667 | 1111359305 | 1174601180 | 1340406165 | 1766059200 | 680248896 | 1071862464 | 308934720 | 796780736 | 2000271936 | 535637696 | 243764289 | 936879300 | 1279979084 | 1395444453 | 1147887792 | 770843152 | 736519729 | 1776562836 | 1883281340 | 1753073461 | 11425183 | 1470759133 | 131793559 | 438831045 | 1446844239 | 436618733 | 335532488 | 231175512 | 514744329 | 1007951900 | 1415077973 | 1566449919 | 957965053 | 239675639 | 1406302949 | 1985769647 | 1405374990 | 1297806890 | 1580917375 | 2100275070 | 520943226 | 1403052910 | 1582344779 | 1161625314 | 1318648999 | 1752298998 | 793502178 | 1875223974 | 1962340595 | 1339544281 | 1113618572 | 1068329380 | 682376428 | 921745093 | 1536631887 | 924085485 | 304760519 | 2101728341 | 1277590783 | 1634891517 | 458515704 | 922037993 | 1405652156 | 135636533 | 1047917216 | 771872737 |
|