2 ms·
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).
by orlp 5y 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).
- lupire 5y agoN 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