3 random numbers from 2 random numbers task
<p>Suppose, you have some uniform destribution <strong>rnd(x)</strong> function what will return 0 or 1.
How you can use this function to create any <strong>rnd(x,n)</strong> function what will return uniform distributed numbers from 0 to n?</p>

<p>I mean everyone using it, but for me it's not so clever. For example, I can create distributions with right border 2^n-1 ([0-1],[0-3],[0-7], etc.) but can't find a way how to do this for ranges like [0-2] or [0-5] without using very big numbers for reasonable precision.</p>