pith. sign in

arxiv: 1403.6870 · v2 · pith:DDU5VJXUnew · submitted 2014-03-26 · 💻 cs.MS

A modified ziggurat algorithm for generating exponentially- and normally-distributed pseudorandom numbers

classification 💻 cs.MS
keywords algorithmdistributionlayersrejectionzigguratexponentially-fastgenerating
0
0 comments X
read the original abstract

The Ziggurat Algorithm is a very fast rejection sampling method for generating PseudoRandom Numbers (PRNs) from common statistical distributions. The algorithm divides a distribution into rectangular layers that stack on top of each other (resembling a Ziggurat), subsuming the desired distribution. Random values within these rectangular layers are then sampled by rejection. This implementation splits layers into two types: those constituting the majority that fall completely under the distribution and can be sampled extremely fast without a rejection test, and a few additional layers that encapsulate the fringe of the distribution and require a rejection test. This method offers speedups of 65% for exponentially- and 82% for normally-distributed PRNs when compared to the best available C implementations of these generators. Even greater speedups are obtained when the algorithm is extended to the Python and MATLAB/OCTAVE programming environments.

This paper has not been read by Pith yet.

discussion (0)

Sign in with ORCID, Apple, or X to comment. Anyone can read and Pith papers without signing in.