On Mon, 13 Sep 2021 00:08:20 GMT, Joe Darcy <da...@openjdk.org> wrote:
>> Ian Graves has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Tweaking asserts > > 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. Good call. Done. ------------- PR: https://git.openjdk.java.net/jdk/pull/5430