RFR: 8214761: Bug in parallel Kahan summation implementation

Ian Graves igraves at openjdk.java.net
Tue Jul 6 18:22:50 UTC 2021


On Fri, 2 Jul 2021 21:30:56 GMT, stefan-zobel <github.com+18482851+stefan-zobel at openjdk.org> wrote:

>> 8214761: Bug in parallel Kahan summation implementation
>
> src/java.base/share/classes/java/util/DoubleSummaryStatistics.java line 161:
> 
>> 159: 
>> 160:         //Negating this value because low-order bits are in negated form
>> 161:         sumWithCompensation(-other.sumCompensation);
> 
> Wouldn't that be `double tmp =  sum - sumCompensation;` in getSum() in line 246 too?

Good catch will review and make the change.

-------------

PR: https://git.openjdk.java.net/jdk/pull/4674


More information about the core-libs-dev mailing list