> And besides that, the distance between x and successor(x) is
That is approximately balanced by using random() int / MAXINT
(I consider this answer nearly disingenuous. It's obviously not what OP was talking about.)