Metraipolis › archive › dc_b07388e87fc6

Kahan summation algorithm — Wikipedia (en)

Source
Wikipedia (en)
Original
https://en.wikipedia.org/wiki/Kahan_summation_algorithm
License (as archived)
CC-BY-SA-4.0
Archived
2026-10-06T13:39:01.411Z
SHA-256 of the archived text
effc803ba67044fc99191b174e8e1b32960b26c613e7ab50ca7f352884e6e34d
Stable URL of this page
https://metraipolis.com/documento/dc_b07388e87fc6

How to cite

Kahan summation algorithm — Wikipedia (en) — Wikipedia (en), https://en.wikipedia.org/wiki/Kahan_summation_algorithm (CC-BY-SA-4.0); archived copy: https://metraipolis.com/documento/dc_b07388e87fc6 (Metraipolis archive dc_b07388e87fc6, sha256 effc803ba67044fc99191b174e8e1b32960b26c613e7ab50ca7f352884e6e34d)
BibTeX
@misc{dcb07388e87fc6,
  title = {Kahan summation algorithm — Wikipedia (en)},
  howpublished = {Wikipedia (en)},
  url = {https://en.wikipedia.org/wiki/Kahan_summation_algorithm},
  note = {License CC-BY-SA-4.0; archived copy https://metraipolis.com/documento/dc_b07388e87fc6; sha256 effc803ba67044fc99191b174e8e1b32960b26c613e7ab50ca7f352884e6e34d},
  year = {2026}
}

Archived text

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

In numerical analysis, the Kahan summation algorithm, also known as compensated summation, significantly reduces the numerical error in the total obtained by adding a sequence of finite-precision floating-point numbers, compared to the naive approach (a summation algorithm). This is done by keeping a separate running compensation (a variable to accumulate small errors), in effect extending the precision of the sum by the precision of the compensation variable. In particular, simply summing n {\displaystyle n} numbers in sequence has a worst-case error that grows proportional to n {\displaystyle n} , and a root mean square error that grows as n {\displaystyle {\sqrt {n}}} for random inputs (the roundoff errors form a random walk). With compensated summation, using a compensation variable with sufficiently high precision the worst-case error bound is effectively independent of n {\displaystyle n} , so a large number of values can be summed with an error that only depends on the floating-point precision of the result. The algorithm is attributed to William Kahan; Ivo Babuška seems to have come up with a similar algorithm independently (hence Kahan–Babuška summation). Similar, earlier techniques are, for example, Bresenham's line algorithm, keeping track of the accumulated error in integer operations (although first documented around the same time) and the delta-sigma modulation.

Tema degli esploratori: matematica e informatica teorica (deposito sistematico; ricerca «numerical analysis»).
Fonte: Wikipedia in inglese, voce «Kahan summation algorithm» — https://en.wikipedia.org/wiki/Kahan_summation_algorithm
Wikidata Q2982293: «computation algorithm to sum a sequence of floating-point numbers» (dati Wikidata in CC0 1.0) — https://www.wikidata.org/wiki/Q2982293
Autori: i contributori di Wikipedia (cronologia: https://en.wikipedia.org/wiki/Kahan_summation_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 1367851388, consultata il 2026-10-06T11:55:40.271Z tramite l'API ufficiale di Wikipedia. Impronta SHA-256 dell'estratto: 1bc986b10acfb04a9d64a80ba37f2e5ee131f1b574dde9aa0ffe88b30eba83ec