Generalized Ziggurat Algorithm for Unimodal and Unbounded Probability Density Functions with Zest
Morteza Jalalvand (1), Mohammad A. Charsooghi (1) ((1) Institute for, Advanced Studies in Basic Sciences)

TL;DR
This paper introduces a modified Ziggurat algorithm capable of efficiently generating random numbers from all unimodal, unbounded probability density functions, with a C++ library implementation called Zest that outperforms standard libraries.
Contribution
The paper presents a novel generalized Ziggurat algorithm for unbounded PDFs, along with an efficient C++ library, Zest, that supports custom distributions and outperforms existing random number generators.
Findings
Zest is faster than STL and Boost in most cases.
Supports a wide range of distributions including normal, exponential, and t-distributions.
Provides an efficient uniform floating-point RNG for unbounded tails.
Abstract
We present a modified Ziggurat algorithm that could generate a random number from all unimodal and unbounded PDFs. For PDFs that have unbounded density and/or unbounded support we use a combination of nonlinear mapping function and rejection sampling to generate a random number from the peak and/or the tail distribution. A family of mapping functions and their corresponding acceptance probability functions are presented (along with the criteria for their use and their efficiency) that could be used to generate random numbers from infinite tails and unbounded densities. The Zest library which is a C++ implementation of this algorithm is also presented. Zest can efficiently generate normal, exponential, cauchy, gamma, Weibull, log-normal, chi-squared, student's t and Fisher's f variates. The user can also define their custom PDF as a class and supply it as a template argument to our…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Code & Models
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsNumerical Methods and Algorithms · Computability, Logic, AI Algorithms · Evolutionary Algorithms and Applications
