Skip to content

Commit 4d2fa29

Browse files
committed
Add comment about kahan summation
1 parent c0fc2c4 commit 4d2fa29

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

doc/source/user_guide/computation.rst

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -233,8 +233,9 @@ see the :ref:`groupby docs <groupby.transform.window_resample>`.
233233

234234
When using ``rolling()`` and an associated function the results are calculated with rolling sums. As a consequence
235235
when having values differing with magnitude :math:`1/np.finfo(np.double).eps` this results in truncation. It must be
236-
noted, that large values may have an impact on windows, which do not include these values. The same holds true for
237-
``Rolling.var()`` for values differing with magnitude :math:`(1/np.finfo(np.double).eps)^{0.5}`.
236+
noted, that large values may have an impact on windows, which do not include these values. Kahan summation is used
237+
to compute the rolling sums to preserve accuracy as much as possible.The same holds true for ``Rolling.var()`` for
238+
values differing with magnitude :math:`(1/np.finfo(np.double).eps)^{0.5}`.
238239

239240
We work with ``rolling``, ``expanding`` and ``exponentially weighted`` data through the corresponding
240241
objects, :class:`~pandas.core.window.Rolling`, :class:`~pandas.core.window.Expanding` and :class:`~pandas.core.window.ExponentialMovingWindow`.

0 commit comments

Comments
 (0)