Re: RFR: 8273514: java/util/DoubleStreamSums/CompensatedSums.java failure [v2]

2021-09-13 Thread Ian Graves
On Mon, 13 Sep 2021 00:08:20 GMT, Joe Darcy  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


Re: RFR: 8273514: java/util/DoubleStreamSums/CompensatedSums.java failure [v2]

2021-09-12 Thread Joe Darcy
On Thu, 9 Sep 2021 16:30:29 GMT, Ian Graves  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


Re: RFR: 8273514: java/util/DoubleStreamSums/CompensatedSums.java failure [v2]

2021-09-10 Thread Roger Riggs
On Thu, 9 Sep 2021 16:30:29 GMT, Ian Graves  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

LGTM

-

Marked as reviewed by rriggs (Reviewer).

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


Re: RFR: 8273514: java/util/DoubleStreamSums/CompensatedSums.java failure [v2]

2021-09-09 Thread Ian Graves
> 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

-

Changes:
  - all: https://git.openjdk.java.net/jdk/pull/5430/files
  - new: https://git.openjdk.java.net/jdk/pull/5430/files/e3aaa680..8f77f3d3

Webrevs:
 - full: https://webrevs.openjdk.java.net/?repo=jdk=5430=01
 - incr: https://webrevs.openjdk.java.net/?repo=jdk=5430=00-01

  Stats: 2 lines in 1 file changed: 1 ins; 0 del; 1 mod
  Patch: https://git.openjdk.java.net/jdk/pull/5430.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/5430/head:pull/5430

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