You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Alex Herbert (Jira)" <ji...@apache.org> on 2022/10/14 10:45:00 UTC
[jira] [Updated] (NUMBERS-163) Summation and LinearCombination Accumulators
[ https://issues.apache.org/jira/browse/NUMBERS-163?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Alex Herbert updated NUMBERS-163:
---------------------------------
Component/s: core
> Summation and LinearCombination Accumulators
> --------------------------------------------
>
> Key: NUMBERS-163
> URL: https://issues.apache.org/jira/browse/NUMBERS-163
> Project: Commons Numbers
> Issue Type: New Feature
> Components: core
> Reporter: Matt Juntunen
> Priority: Major
> Fix For: 1.0
>
> Attachments: FMA.java, Sum.java
>
> Time Spent: 1h 20m
> Remaining Estimate: 0h
>
> 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:
> {code:java}
> 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();
> {code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)