Details
The GNU C Library, known as glibc, is a free and open source version of the C standard library. If you've used open source software, then you've probably used a program built using this library.
Among the many other tools provided by this library is a Linear Congruential Generator. This generator uses bit masking to return only the last 31 bits of the Seed.
|
Pseudocode
// This code is adapted from the source code
// of GLIBC found here:
//
// https://sourceware.org/git/glibc.git
// The current state value
state = 1138;
// Our constants
a = 1103515245;
c = 12345;
// random number generator
function RandomNumber() {
// Run the function
state = ((a * state) + c) AND $7FFFFFFF;
// Return the new value
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.06% | Passed | 8675309 | 49.74% | Passed | 16777216 | 50.12% | Passed | 123456789 | 49.85% | Passed | Minimum to Pass: 45%
| Dartboard TestSeed | Darts Placed | Result |
---|
1138 | 6944 | Passed | 65535 | 7022 | Passed | 8675309 | 6994 | Passed | 16777216 | 6997 | Passed | 123456789 | 6997 | 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 | 256 | Passed | 65535 | 170 | 256 | Passed | 8675309 | 167 | 256 | Passed | 16777216 | 160 | 256 | Passed | 123456789 | 154 | 256 | Failed | Minimum to Pass: 160
|
High/Low Byte TestSeed | High After High | High After Low | Low After High | Low After Low | Spread | Result |
---|
1138 | 2448 | 2548 | 2548 | 2455 | 193 | Passed | 65535 | 2420 | 2526 | 2525 | 2528 | 159 | Passed | 8675309 | 2679 | 2481 | 2481 | 2358 | 359 | Passed | 16777216 | 2545 | 2487 | 2487 | 2480 | 91 | Passed | 123456789 | 2517 | 2530 | 2529 | 2423 | 153 | Passed | Maximum to Pass: 500
|
Distribution TestSeed | 1138 | 65535 | 8675309 | 16777216 | 123456789 |
---|
0.0 to 0.1 | 1005 | 965 | 1048 | 1025 | 961 |
---|
0.1 to 0.2 | 989 | 970 | 1068 | 1034 | 1055 |
---|
0.2 to 0.3 | 1032 | 1018 | 988 | 1023 | 990 |
---|
0.3 to 0.4 | 930 | 1004 | 1051 | 1045 | 1030 |
---|
0.4 to 0.5 | 1040 | 990 | 1006 | 905 | 1012 |
---|
0.5 to 0.6 | 978 | 1013 | 965 | 1042 | 965 |
---|
0.6 to 0.7 | 989 | 995 | 999 | 997 | 1018 |
---|
0.7 to 0.8 | 996 | 1021 | 945 | 916 | 1042 |
---|
0.8 to 0.9 | 1041 | 1017 | 964 | 1039 | 976 |
---|
0.9 to 1.0 | 1001 | 1008 | 967 | 975 | 952 |
---|
Spread | 237 | 161 | 345 | 415 | 313 |
---|
Result | Passed | Passed | Passed | Passed | Passed |
---|
Maximum to Pass: 500 |
Sample Output1810185762 | 2044068019 | 298255984 | 542379497 | 1262295662 | 103150863 | 124656028 | 542547877 | 136605562 | 1138152235 | 353448840 | 423006497 | 2096761158 | 1466791687 | 1783234612 | 701111901 | 2034070482 | 1054899363 | 1956703136 | 235881305 | 1390082846 | 1458847743 | 800661964 | 703052821 | 1077390122 | 1515642139 | 1279037112 | 60097681 | 1191006198 | 914108407 | 1502076516 | 1777621197 | 1269200258 | 1379521683 | 1578532048 | 1115337929 | 231368654 | 572729071 | 179213820 | 988861573 | 489239258 | 648364811 | 1951208936 | 1525625857 | 326607526 | 803407079 | 13740180 | 823791421 | 518734642 | 55642243 | 1919597056 | 404578873 | 696672382 | 1058122207 | 1036088876 | 1332275445 | 690226826 | 386991355 | 384157976 | 1672224625 | 1682178390 | 1205925335 | 1627020996 | 588399021 | 932633826 | 1532303475 | 1822466864 | 423513001 | 675931438 | 450808015 | 824492636 | 1325857125 | 1326655034 | 1269375723 | 1818863688 | 1240647393 | 1744661510 | 276103879 | 1435828468 | 125038621 | 317997714 | 221578339 | 1316698208 | 1877242137 | 286258654 | 678003647 | 1070299788 | 2101478869 | 178360810 | 104635611 | 201044856 | 296364625 | 704570038 | 425601975 | 1156878116 | 966138509 | 386823234 | 1704971347 | 276658576 | 1440141961 |
|