Unbias a random generator: Difference between revisions

m
J: further cleanup (did not actually need parenthesis)
(J: bugfix (needed parenthesis) and cleanup)
m (J: further cleanup (did not actually need parenthesis))
Line 11:
 
<lang j>biased=: 0 = ?
unbiased=: (i.@# { ::$: 2 | 0 3 -.~ _2 #.\ +: biased@# ]) ::$:</lang>
 
Example use:
6,962

edits