Unbias a random generator: Difference between revisions
J: bugfix (needed parenthesis) and cleanup
(J) |
(J: bugfix (needed parenthesis) and cleanup) |
||
Line 11:
<lang j>biased=: 0 = ?
unbiased=: (i.@# { 2 | 0 3 -.~ _2 #.\ +: biased@#
Example use:
|