Mar 3rd, 2006, 04:16 AM
"True Random" Number Generator (Mark II)
Originally this was a complex class to make random numbers better than the Random class.. then it as found there exists a class already in .NET which creates random bytes just as well if not better in the security namespace, one downside is that it only makes bytes. So the new version of this class uses the security RNG to make effective random numbers in the same way you would use the normal Random class
Last edited by Phill64; Mar 3rd, 2006 at 04:27 AM.
Oct 21st, 2013, 10:35 AM
Re: "True Random" Number Generator (Mark II)
Thanks for your nice and compact generator.
I ran the following code some times:
Dim d = 0.0, RNG = New TrueRandom2
For i = 1 To 10 ^ 6
d += RNG.GetDouble()
d /= 10 ^ 6
The results were as below:
I would have expected closer to 0.5, is this on purpose?
Click Here to Expand Forum to Full Width