mirror of
https://github.com/python/cpython
synced 2024-09-16 00:07:33 +00:00
gh-111933: fix broken link to A.Neumaier article (gh-111937)
This commit is contained in:
parent
ce6a533c4b
commit
12a30bc1aa
|
@ -2611,7 +2611,10 @@ builtin_sum_impl(PyObject *module, PyObject *iterable, PyObject *start)
|
||||||
}
|
}
|
||||||
if (PyFloat_CheckExact(item)) {
|
if (PyFloat_CheckExact(item)) {
|
||||||
// Improved Kahan–Babuška algorithm by Arnold Neumaier
|
// Improved Kahan–Babuška algorithm by Arnold Neumaier
|
||||||
// https://www.mat.univie.ac.at/~neum/scan/01.pdf
|
// Neumaier, A. (1974), Rundungsfehleranalyse einiger Verfahren
|
||||||
|
// zur Summation endlicher Summen. Z. angew. Math. Mech.,
|
||||||
|
// 54: 39-51. https://doi.org/10.1002/zamm.19740540106
|
||||||
|
// https://en.wikipedia.org/wiki/Kahan_summation_algorithm#Further_enhancements
|
||||||
double x = PyFloat_AS_DOUBLE(item);
|
double x = PyFloat_AS_DOUBLE(item);
|
||||||
double t = f_result + x;
|
double t = f_result + x;
|
||||||
if (fabs(f_result) >= fabs(x)) {
|
if (fabs(f_result) >= fabs(x)) {
|
||||||
|
|
Loading…
Reference in a new issue