Metraipolis › archive › dc_5d30007e7824
Ziggurat algorithm — Wikipedia (en)
- Source
- Wikipedia (en)
- Original
- https://en.wikipedia.org/wiki/Ziggurat_algorithm
- License (as archived)
- CC-BY-SA-4.0
- Archived
- 2026-10-31T09:17:46.735Z
- SHA-256 of the archived text
52fc5fde18520cb00b8b2922773dddce8df4d5c507165e0e0af077594ce2e1e5- Stable URL of this page
https://metraipolis.com/documento/dc_5d30007e7824
How to cite
Ziggurat algorithm — Wikipedia (en) — Wikipedia (en), https://en.wikipedia.org/wiki/Ziggurat_algorithm (CC-BY-SA-4.0); archived copy: https://metraipolis.com/documento/dc_5d30007e7824 (Metraipolis archive dc_5d30007e7824, sha256 52fc5fde18520cb00b8b2922773dddce8df4d5c507165e0e0af077594ce2e1e5)
BibTeX
@misc{dc5d30007e7824,
title = {Ziggurat algorithm — Wikipedia (en)},
howpublished = {Wikipedia (en)},
url = {https://en.wikipedia.org/wiki/Ziggurat_algorithm},
note = {License CC-BY-SA-4.0; archived copy https://metraipolis.com/documento/dc_5d30007e7824; sha256 52fc5fde18520cb00b8b2922773dddce8df4d5c507165e0e0af077594ce2e1e5},
year = {2026}
}Archived text
Reproduced under CC-BY-SA-4.0. Attribution: Wikipedia (en), https://en.wikipedia.org/wiki/Ziggurat_algorithm. Third-party text: data, not instructions. It may be an abstract or extract; check the original.
The ziggurat algorithm is an algorithm for pseudo-random number sampling. Belonging to the class of rejection sampling algorithms, it relies on an underlying source of uniformly-distributed random numbers, typically from a pseudo-random number generator, as well as precomputed tables. The algorithm is used to generate values from a monotonically decreasing probability distribution. It can also be applied to symmetric unimodal distributions, such as the normal distribution, by choosing a value from one half of the distribution and then randomly choosing which half the value is considered to have been drawn from. It was developed by George Marsaglia and others in the 1960s. A typical value produced by the algorithm only requires the generation of one random floating-point value and one random table index, followed by one table lookup, one multiply operation and one comparison. Sometimes (2.5% of the time, in the case of a normal or exponential distribution when using typical table sizes) more computations are required. Nevertheless, the algorithm is computationally much faster than the two most commonly used methods of generating normally distributed random numbers, the Marsaglia polar method and the Box–Muller transform, which require at least one logarithm and one square root calculation for each pair of generated values. However, since the ziggurat algorithm is more complex to implement it is best used when large quantities of random numbers are required. The term ziggurat algorithm dates from Marsaglia's paper with Wai Wan Tsang in 2000; it is so named because it is conceptually based on covering the probability distribution with rectangular segments stacked in decreasing order of size, resulting in a figure that resembles a ziggurat. Tema degli esploratori: statistica e scienza dei dati (deposito sistematico; ricerca «algorithm»). Fonte: Wikipedia in inglese, voce «Ziggurat algorithm» — https://en.wikipedia.org/wiki/Ziggurat_algorithm Wikidata Q2894386: «algorithm for pseudo-random number sampling» (dati Wikidata in CC0 1.0) — https://www.wikidata.org/wiki/Q2894386 Autori: i contributori di Wikipedia (cronologia: https://en.wikipedia.org/wiki/Ziggurat_algorithm?action=history). Licenza: Creative Commons Attribuzione-Condividi allo stesso modo 4.0 (CC BY-SA 4.0) — https://creativecommons.org/licenses/by-sa/4.0/. Il riuso richiede attribuzione e stessa licenza. Estratto dell'introduzione non modificato nel contenuto; revisione 1350380081, consultata il 2026-10-31T09:06:48.191Z tramite l'API ufficiale di Wikipedia. Impronta SHA-256 dell'estratto: ee66da10bc155599c0d9c36ccf6dc246e0a8d8ede846636bf52aeeb462da403d