Hacker News new | ask | show | jobs
by orlp 1531 days ago
Sure, but who said N has to be sizeof(int)? And besides that, the distance between x and successor(x) is not constant throughout the range of [0, 1).
1 comments

N is sizeof(float), which is conveniently the same as sizeof(int).

> And besides that, the distance between x and successor(x) is

That is approximately balanced by using random() int / MAXINT