|
|
|
|
|
by Semaphor
910 days ago
|
|
I once wrote a small script (in C#) to pick a few tens out of a few 1000s. I got weird repeats. I switched to a cryptographically secure RNG, and the repeats were gone. It was probably pure chance, but I stopped using the normal random function ever since ;) |
|
In [1] it says that numbers have a 0.5034 probability of being odd due to rounding errors in the algorithm that picks a number in a range, which is unacceptable for a simulation, but may actually be better than a real coin toss [2]. The raw RNG is also flawed but not that badly [3]
[1] https://fuglede.dk/en/blog/bias-in-net-rng/
[2] https://arxiv.org/abs/2310.04153
[3] https://gist.github.com/fuglede/772402ecc3997ada82a03ce65361...