Uploaded image for project: 'Commons Numbers'
  1. Commons Numbers
  2. NUMBERS-163

Summation and LinearCombination Accumulators

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Closed
    • Major
    • Resolution: Implemented
    • None
    • 1.0
    • core
    • None

    Description

      It would be useful to have simple accumulator classes in Summation and LinearCombination to perform extended precision operations on arbitrary collections of values without requiring conversion to double[]. Ex:

      Summation.Accumulator sum= Summation.accumulator(1d);
      sum.add(x)
          .add(y)
          .add(z)
         .add(w);
      double sumResult = sum.get();
      
      LinearCombination.Accumulator comb = LinearCombination.accumulator(1d);
      comb.add(x, scale)
          .add(y, scale)
          .add(z, scale)
          .add(w, scale);
      double combResult = comb.get();
      

      Attachments

        1. FMA.java
          4 kB
          Gilles Sadowski
        2. Sum.java
          7 kB
          Gilles Sadowski

        Activity

          People

            Unassigned Unassigned
            mattjuntunen Matt Juntunen
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 1h 20m
                1h 20m