| ▲ | wilbo 4 hours ago | |
I got lost when OP talked about using 10 integers to choose from 3 choices. I think I figured out what was missing in the explanation. random_u64() Mod 3 does indeed have a single bucket that is oversized. This overweights one option by about 5×10^-20. rand() Itself has only 32767 possible values, so it's also common for a bucket to be overweighted depending on the number of buckets. | ||
| ▲ | incompatible 3 hours ago | parent [-] | |
Makes you wonder at what point overweighting by about 5×10^-20 is something you'd want to care about. | ||