3 ms·
More interesting to grasp is that even rand() * rand() / rand() is less evenly distributed than rand(). It does seem like it should be possible to remap the nu
by GavinB 16y ago
More interesting to grasp is that even
rand() * rand() / rand()
is less evenly distributed than rand().
It does seem like it should be possible to remap the numbers onto an even distribution if you knew how uneven to expect it to be. That would probably lead to some loss of fidelity at the limits of accuracy of the variable, however.