note 62294 deleted from function.mt-rand by bjori
| From: | bjori@php.net | Date: | Sun, 16 Apr 2006 12:43:07 +0000 |
| Subject: | note 62294 deleted from function.mt-rand by bjori | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-108271@lists.php.net to get a copy of this message | ||
Note Submitter: barnettjw at gmail dot com
----
I modified Garry's generator to allow for easier testing for larger amount of numbers (I'm
using 1-25) and I found that even with over 50,000 iterations the first few numbers had a
disprotionate amount of selections. The solution is simple, use different number (ie 25-50).
1-25 over 50,000 iterations
1 =26031 6 =3916 11 =2030 16 =1943 21 =1963
2 =17852 7 =4103 12 =1995 17 =2050 22 =1970
3 =5942 8 =4065 13 =2002 18 =2050 23 =1916
4 =6014 9 =3990 14 =2012 19 =2000 24 =2031
5 =5993 10 =1969 15 =1939 20 =2062 25 =2005
25-50 over 50,000 iterations
25 =1934 31 =2020 37 =1970 43 =1927 49 =1866
26 =1878 32 =1984 38 =1902 44 =1916 50 =1914
27 =1938 33 =1849 39 =1932 45 =1961
28 =1965 34 =1924 40 =1887 46 =1928
29 =1964 35 =1910 41 =1915 47 =1838
30 =1986 36 =1915 42 =1872 48 =1905
feel free to email any questions, comments, suggestions as I'm not likely to check these notes