Unbias a random generator: Difference between revisions

m
Top level link to Wikipedia article mentioning source of task
(added Elixir)
m (Top level link to Wikipedia article mentioning source of task)
Line 7:
 
The actual unbiasing should be done by generating two numbers at a time from randN and only returning a 1 or 0 if they are different. As long as you always return the first number or always return the second number, the probabilities discussed above should take over the biased probability of randN.
 
This task is an implementation of [http://en.wikipedia.org/wiki/Randomness_extractor#Von_Neumann_extractor Von Neumann debiasing], first described in a 1951 paper.
 
=={{header|Ada}}==
Anonymous user