Show Ads
 Refresh   About   Tools 

PHP mt_rand() Randomosity Tester

TIMEOUT
+669,185 data
+1 +10 +100 +1K +10K +MAX
range: 1-10,000, data points: 669,186, groups: 60
High / Low / Range / Average
Frequency: 99 / 36 / 63 / 66.92
Rows: 501 / 1 / 500 / 166.67
Frequency
Rows
99
2
97
1
96
3
95
3
94
3
93
3
92
12
91
10
90
10
89
12
88
22
87
19
86
25
85
49
84
60
83
83
82
83
81
102
80
116
79
168
78
202
77
192
76
274
75
288
74
345
73
376
72
378
71
400
70
473
69
464
68
476
67
501
66
476
65
461
64
478
63
448
62
430
61
388
60
341
59
326
58
243
57
252
56
203
55
177
54
160
53
116
52
95
51
57
50
54
49
37
48
39
47
27
46
10
45
14
44
3
43
5
42
2
40
1
37
1
36
1

Test runs: 669,186Avg run : 0.000002 seconds Test time: 1.410869 seconds Data Save: 0.796672 seconds Test Tools: Restart test: Random range 1 to: 1 2 3 4 5 10 50 100 500 1K 5K 10K 50K 100K Random Generator Method: SQLite ORDER BY RANDOM() PHP rand() PHP mt_rand() PHP random_int() Back to top


About the Randomosity Tester

This page tests the frequency distribution and timing of random number generation via these methods:

Random number results are stored in a test table. The test table is defined as:

CREATE TABLE 'test' ( 'id' INTEGER PRIMARY KEY, 'frequency' INTEGER DEFAULT '0' );

The table is initialized by creating all rows with frequency = 0. The number of rows in the table is defined by the range setting. The current test is set to use range: 1 to 10,000.

For each random number chosen, the table is updated via:

UPDATE test SET frequency = frequency + 1 WHERE id = :random_number

For SQLite tests, results are individually generated via the SQL call:

SELECT id FROM test ORDER BY RANDOM() LIMIT 1;

Generate more random numbers by clicking a  +  number button to start a test run.

Each test run is limted to ~1.42 seconds.

A Frequency of Frequencies chart displays:

This site was created with Open Source software. Find out more on Github: randomosity-tester v0.2.2

Back to top

Show Ads