$r = $x * $y ** (1 - rand 2);
update:
Or if you want to reduce the variance:
where $n is an odd integer bigger than one.$r = $x * $y ** ((1 - rand 2) ** $n)
In reply to Re: custom random number generator
by salva
in thread custom random number generator
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |