[vector api] RFR: Fix the issue about float/double reduce-max/min operations with NaN as an input
Yang Zhang (Arm Technology China)
Yang.Zhang at arm.com
Wed Dec 12 08:37:16 UTC 2018
Hi
When I implement reduce-max/min, I found there is an issue about float/double reduce-max/min operations with NaN as an input.
In java doc, if either value is NaN, then the result of max/min(a, b) is NaN. But the result of "((a > b) ? a : b)" is affected by sequence of (a, b). If a is NaN, the result is b. If b is NaN, the result is b (NaN).
I have a patch which could fix this issue. Could you please help to review it?
http://cr.openjdk.java.net/~yzhang/vectorapi.nan/webrev.00/
Ps. With this patch, there are 5 failures on x86 platform.
jdk/incubator/vector/Float256VectorTests.java
jdk/incubator/vector/Float64VectorTests.java
jdk/incubator/vector/FloatMaxVectorTests.java
jdk/incubator/vector/Double128VectorTests.java
jdk/incubator/vector/DoubleMaxVectorTests.java
Webrev:
Regards,
Yang
More information about the panama-dev
mailing list