This is an open-source generator written by Peter Occil. Any copyright to this page is released to the Public Domain. In case this is not possible, this page is also licensed under Creative Commons Zero. If you have comments or issues on this generator, send them to the GitHub issues page.
This generator supports generating instructions that choose a non-uniform random number by flipping a real coin or rolling a real six-sided die.
Saad, F.A., Freer C.E., et al. "The Fast Loaded Dice Roller: A Near-Optimal Exact Sampler for Discrete Probability Distributions", in _AISTATS 2020_ 108.
Leydold, et al., "An Automatic Code Generator for Nonuniform Random Variate Generation", 2001.
Lumbroso, J., "Optimal Discrete Uniform Generation from Coin Flips, and Applications", arXiv:1304.1916 [cs.DS]