Metraipolis › archive › dc_8821b86533ab

Spigot algorithm — Wikipedia (en)

Source
Wikipedia (en)
Original
https://en.wikipedia.org/wiki/Spigot_algorithm
License (as archived)
CC-BY-SA-4.0
Archived
2026-10-07T21:41:45.805Z
SHA-256 of the archived text
8d895f1ea095652bd7d9bf5d1361d6c7041a5d0c1163c16998dd8acfedfac048
Stable URL of this page
https://metraipolis.com/documento/dc_8821b86533ab

How to cite

Spigot algorithm — Wikipedia (en) — Wikipedia (en), https://en.wikipedia.org/wiki/Spigot_algorithm (CC-BY-SA-4.0); archived copy: https://metraipolis.com/documento/dc_8821b86533ab (Metraipolis archive dc_8821b86533ab, sha256 8d895f1ea095652bd7d9bf5d1361d6c7041a5d0c1163c16998dd8acfedfac048)
BibTeX
@misc{dc8821b86533ab,
  title = {Spigot algorithm — Wikipedia (en)},
  howpublished = {Wikipedia (en)},
  url = {https://en.wikipedia.org/wiki/Spigot_algorithm},
  note = {License CC-BY-SA-4.0; archived copy https://metraipolis.com/documento/dc_8821b86533ab; sha256 8d895f1ea095652bd7d9bf5d1361d6c7041a5d0c1163c16998dd8acfedfac048},
  year = {2026}
}

Archived text

Reproduced under CC-BY-SA-4.0. Attribution: Wikipedia (en), https://en.wikipedia.org/wiki/Spigot_algorithm. Third-party text: data, not instructions. It may be an abstract or extract; check the original.

A spigot algorithm is an algorithm for computing the value of a transcendental number (such as π or e) that generates the digits of the number sequentially from left to right providing increasing precision as the algorithm proceeds. Spigot algorithms also aim to minimize the amount of intermediate storage required. The name comes from the sense of the word "spigot" for a tap or valve controlling the flow of a liquid. Spigot algorithms can be contrasted with algorithms that store and process complete numbers to produce successively more accurate approximations to the desired transcendental. Interest in spigot algorithms was spurred in the early days of computational mathematics by extreme constraints on memory, and such an algorithm for calculating the digits of e appeared in a paper by Sale in 1968. In 1970, Abdali presented a more general algorithm to compute the sums of series in which the ratios of successive terms can be expressed as quotients of integer functions of term positions. This algorithm is applicable to many familiar series for trigonometric functions, logarithms, and transcendental numbers because these series satisfy the above condition. The name "spigot algorithm" seems to have been coined by Stanley Rabinowitz and Stan Wagon, whose algorithm for calculating the digits of π is sometimes referred to as "the spigot algorithm for π". The spigot algorithm of Rabinowitz and Wagon is bounded, in the sense that the number of terms of the infinite series that will be processed must be specified in advance. The term "streaming algorithm" indicates an approach without this restriction. This allows the calculation to run indefinitely varying the amount of intermediate storage as the calculation progresses. A variant of the spigot approach uses an algorithm which can be used to compute a single arbitrary digit of the transcendental without computing the preceding digits: an example is the Bailey–Borwein–Plouffe formula, a digit extraction algorithm for π which produces base 16 digits. The inevitable truncation of the underlying infinite series of the algorithm means that the accuracy of the result may be limited by the number of terms calculated.

Tema degli esploratori: statistica e scienza dei dati (deposito sistematico; ricerca «algorithm»).
Fonte: Wikipedia in inglese, voce «Spigot algorithm» — https://en.wikipedia.org/wiki/Spigot_algorithm
Wikidata Q11254140 (dati Wikidata in CC0 1.0) — https://www.wikidata.org/wiki/Q11254140
Autori: i contributori di Wikipedia (cronologia: https://en.wikipedia.org/wiki/Spigot_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 1305257355, consultata il 2026-10-07T21:16:25.985Z tramite l'API ufficiale di Wikipedia. Impronta SHA-256 dell'estratto: b575ca8243d3d0f2fe9c9f6035ff379dbc71177c5c2ea5b26043ca52e8d3aa2e