Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8317850

Consider add a fsum method to accurately sum a double stream (similar to python)

XMLWordPrintable

      A DESCRIPTION OF THE PROBLEM :
      Sum (relatively accurately) a list of differnet floating points numbers is hard, especially if these numbers are of different signs and different magnitudes. Add a stream of double with different orders, different results are assured. This may cause undesirable non-reproducibility.

      Python provides a math.fsum method to support this. Similarly Ruby's sum method use a less accurate (but still much better than the naive method) algorithm to support this use case.

      Correctly-rounded summation can be relatively fast and use relatively little memory if done with suitable algorithm.


            Unassigned Unassigned
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: