diff --git a/Python/bltinmodule.c b/Python/bltinmodule.c index 7f366b43599ae5..84fbc33a48ca61 100644 --- a/Python/bltinmodule.c +++ b/Python/bltinmodule.c @@ -2605,7 +2605,10 @@ builtin_sum_impl(PyObject *module, PyObject *iterable, PyObject *start) } if (PyFloat_CheckExact(item)) { // 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 t = f_result + x; if (fabs(f_result) >= fabs(x)) {