On Thu, 9 Sep 2021 16:30:29 GMT, Ian Graves <igra...@openjdk.org> wrote:
>> Relaxing some assertion bounds to allow for small error values that still >> show improvement over previous summation method. > > Ian Graves has updated the pull request incrementally with one additional > commit since the last revision: > > Tweaking asserts Marked as reviewed by darcy (Reviewer). test/jdk/java/util/DoubleStreamSums/CompensatedSums.java line 87: > 85: badParallelStreamError += > Math.pow(computeFinalSum(DoubleStream.of(rand).parallel().collect(doubleSupplier,objDoubleConsumer,badCollectorConsumer)) > - sum[0], 2); > 86: > 87: Above, if there are going to be multiple uese of Math.pow(arg, 2) in the test, I recommend defining a local private static square(double d) method for this test where square is double square(double arg) {return arg * arg;} The library method pow(arg, 2) does a check for the exponent being two and does a multiple instead. ------------- PR: https://git.openjdk.java.net/jdk/pull/5430