Skip to main content
Cornell University
We gratefully acknowledge support from the Simons Foundation, member institutions, and all contributors. Donate
arxiv logo > stat > arXiv:1810.04744

Help | Advanced Search

arXiv logo
Cornell University Logo

quick links

  • Login
  • Help Pages
  • About

Statistics > Computation

arXiv:1810.04744 (stat)
[Submitted on 10 Oct 2018]

Title:Generalized Ziggurat Algorithm for Unimodal and Unbounded Probability Density Functions with Zest

Authors:Morteza Jalalvand (1), Mohammad A. Charsooghi (1) ((1) Institute for Advanced Studies in Basic Sciences)
View a PDF of the paper titled Generalized Ziggurat Algorithm for Unimodal and Unbounded Probability Density Functions with Zest, by Morteza Jalalvand (1) and 1 other authors
View PDF
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 library's class without modifying any part of the library. Performance of Zest is compared against performance of random modules of (GCC's implementation of) Standard Template Library (STL) and Boost. The presented results show that Zest is faster than both in most cases, sometimes by a factor of more than 10.
We also present a C++ implementation of a uniform floating-point random number generator (RNG) which is capable of producing all representable floating-point numbers in $[0,1)$ which will be used in the Ziggurat algorithm near unbounded peaks and tails. The common method of dividing a random integer by the range of the RNG can not produce random floating-point numbers with fully random fraction bits and very small random numbers. The presented uniform floating-point RNG is very efficient and in the case of producing double precision floating-point numbers it's even faster than simply multiplying a 64-bit integer by $2^{-64}$.
Subjects: Computation (stat.CO); Computational Physics (physics.comp-ph)
Cite as: arXiv:1810.04744 [stat.CO]
  (or arXiv:1810.04744v1 [stat.CO] for this version)
  https://doi.org/10.48550/arXiv.1810.04744
arXiv-issued DOI via DataCite

Submission history

From: Morteza Jalalvand [view email]
[v1] Wed, 10 Oct 2018 20:41:37 UTC (98 KB)
Full-text links:

Access Paper:

    View a PDF of the paper titled Generalized Ziggurat Algorithm for Unimodal and Unbounded Probability Density Functions with Zest, by Morteza Jalalvand (1) and 1 other authors
  • View PDF
  • TeX Source
  • Other Formats
license icon view license
Current browse context:
stat.CO
< prev   |   next >
new | recent | 2018-10
Change to browse by:
physics
physics.comp-ph
stat

References & Citations

  • NASA ADS
  • Google Scholar
  • Semantic Scholar
export BibTeX citation Loading...

BibTeX formatted citation

×
Data provided by:

Bookmark

BibSonomy logo Reddit logo

Bibliographic and Citation Tools

Bibliographic Explorer (What is the Explorer?)
Connected Papers (What is Connected Papers?)
Litmaps (What is Litmaps?)
scite Smart Citations (What are Smart Citations?)

Code, Data and Media Associated with this Article

alphaXiv (What is alphaXiv?)
CatalyzeX Code Finder for Papers (What is CatalyzeX?)
DagsHub (What is DagsHub?)
Gotit.pub (What is GotitPub?)
Hugging Face (What is Huggingface?)
Papers with Code (What is Papers with Code?)
ScienceCast (What is ScienceCast?)

Demos

Replicate (What is Replicate?)
Hugging Face Spaces (What is Spaces?)
TXYZ.AI (What is TXYZ.AI?)

Recommenders and Search Tools

Influence Flower (What are Influence Flowers?)
CORE Recommender (What is CORE?)
  • Author
  • Venue
  • Institution
  • Topic

arXivLabs: experimental projects with community collaborators

arXivLabs is a framework that allows collaborators to develop and share new arXiv features directly on our website.

Both individuals and organizations that work with arXivLabs have embraced and accepted our values of openness, community, excellence, and user data privacy. arXiv is committed to these values and only works with partners that adhere to them.

Have an idea for a project that will add value for arXiv's community? Learn more about arXivLabs.

Which authors of this paper are endorsers? | Disable MathJax (What is MathJax?)
  • About
  • Help
  • contact arXivClick here to contact arXiv Contact
  • subscribe to arXiv mailingsClick here to subscribe Subscribe
  • Copyright
  • Privacy Policy
  • Web Accessibility Assistance
  • arXiv Operational Status
    Get status notifications via email or slack