On Wed, 22 Feb 2023 02:08:27 GMT, Sandhya Viswanathan 
<sviswanat...@openjdk.org> wrote:

> Change the java/lang/float.java and the corresponding shared runtime constant 
> expression evaluation to generate QNaN.
> The HW instructions generate QNaNs and not SNaNs for floating point 
> instructions. This happens across double, float, and float16 data types. The 
> most significant bit of mantissa is set to 1 for QNaNs.

Changing the Java code to match the semantics of a given architecture's HW 
instruction risks requiring that other architectures have to implement 
additional code to match those semantics, potentially impacting the benefit of 
using an intrinsic in the first place.

Consistent output across all execution contexts is certainly a desirable 
quality, but at what cost?

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

PR: https://git.openjdk.org/jdk/pull/12704

Reply via email to