#random
-
When random isn't random enough: the modulo trap
The classic way to pick a random object — grab a big number and take it modulo the count — quietly breaks uniformity. The author explains why, and what to reach for instead.
The classic way to pick a random object — grab a big number and take it modulo the count — quietly breaks uniformity. The author explains why, and what to reach for instead.