From f77b6b68990c774e1e5dcf5eeda4928a3d057018 Mon Sep 17 00:00:00 2001 From: "Christine P. Chai" Date: Thu, 20 Feb 2025 20:17:11 -0800 Subject: [PATCH] DOC: Clarify the magnitude for truncation --- doc/source/user_guide/window.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/doc/source/user_guide/window.rst b/doc/source/user_guide/window.rst index 406d77d5b8caa..5b27442c80bb8 100644 --- a/doc/source/user_guide/window.rst +++ b/doc/source/user_guide/window.rst @@ -70,7 +70,8 @@ which will first group the data by the specified keys and then perform a windowi Some windowing aggregation, ``mean``, ``sum``, ``var`` and ``std`` methods may suffer from numerical imprecision due to the underlying windowing algorithms accumulating sums. When values differ - with magnitude :math:`1/np.finfo(np.double).eps` this results in truncation. It must be + with magnitude ``1/np.finfo(np.double).eps`` (approximately :math:`4.5 \times 10^{15}`), + this results in truncation. It must be noted, that large values may have an impact on windows, which do not include these values. `Kahan summation `__ is used to compute the rolling sums to preserve accuracy as much as possible.