The System.Random class is a reasonably fast pseudo-random number generator, although it shouldn't be generally used for cryptography. However, is it at least a good statistically random number generator? I am interested in whether the method has these properties or not:
-
Able to generate every double in between 0 and 1 (excluding 1) from any seed (after a finite number of iterations, of course).
-
Generating each number has a probability proportional to the count of all possible numbers (1/4607182418800017408).
-
May generate subnormal numbers.
-
Probability of the generated number being in a specific interval is proportional to the length of the interval, down to the double resolution (e.g. being in [0,1) is 100%, [0,1/2) is 50%, [0,1/4) is 25 % etc. for all intervals).
Note that some of these points may be exclusive, mainly 2. and 4. (as double numbers are denser around 0, if 2. holds, the probability of being in [0,1/2) is larger than [1/2,1), like 999 in 1000).
Are there other random number generators that satisfy some of these points?
Aucun commentaire:
Enregistrer un commentaire