[3.12] gh-111933: fix broken link to A.Neumaier article (gh-111937) (gh-111993)

This commit is contained in:
Miss Islington (bot) 2023-11-12 02:22:44 +01:00 committed by GitHub
parent 13ca1f02a4
commit 158a7e1acd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -2605,7 +2605,10 @@ builtin_sum_impl(PyObject *module, PyObject *iterable, PyObject *start)
}
if (PyFloat_CheckExact(item)) {
// Improved KahanBabuš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 t = f_result + x;
if (fabs(f_result) >= fabs(x)) {