(self, value: float)
Update the moving window sum using Neumaier's algorithm.

    For more details please refer to:
    https://en.wikipedia.org/wiki/Kahan_summation_algorithm#Further_enhancements

    Args:
      value: The new value to be added to the window.
Update the moving window sum using Neumaier's algorithm.
Update the moving window sum using Neumaier s algorithm .
def _neumaier_sum(self, value: float):
    """Update the moving window sum using Neumaier's algorithm.

    For more details please refer to:
    https://en.wikipedia.org/wiki/Kahan_summation_algorithm#Further_enhancements

    Args:
      value: The new value to be added to the window.
    """

    new_sum = self._sum + value
    if abs(self._sum) >= abs(value):
      # If self._sum is bigger, low-order digits of value are lost.
      self._correction += (self._sum - new_sum) + value
    else:
      # low-order digits of sum are lost
      self._correction += (value - new_sum) + self._sum

    self._sum = new_sum
def _neumaier_sum ( self , value : float ) : new_sum = self . _sum + value if abs ( self . _sum ) >= abs ( value ) : # If self._sum is bigger, low-order digits of value are lost. self . _correction += ( self . _sum - new_sum ) + value else : # low-order digits of sum are lost self . _correction += ( value - new_sum ) + self . _sum self . _sum = new_sum