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

DoubleStream.sum() & DoubleSummaryStats implementations that reduce numerical errors

    XMLWordPrintable

Details

    Backports

      Description

        The sum() and average() methods of java.util.stream.DoubleStream are prone to numerical error.

        Better implementations are required for sequential and parallel evaluation that reduce numerical error.

        The implementations could, for example, use the Kahan summation algorithm:

          http://en.wikipedia.org/wiki/Kahan_summation_algorithm

        That could be applied for sequential evaluation and for parallel evaluation where the leafs are evaluated sequentially and those sums are then added together up the computation tree.

        Attachments

          Issue Links

            Activity

              People

                darcy Joe Darcy
                psandoz Paul Sandoz
                Votes:
                0 Vote for this issue
                Watchers:
                8 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved: