On Thu, 5 Jan 2023 12:50:25 GMT, Raffaello Giulietti <rgiulie...@openjdk.org> 
wrote:

> One reason is that if the `byte[]` contains a non-canonical NaN then `get()` 
> would return it. The original code first reads an integer value and then 
> converts it to a floating-point value, so for backward compatibility the same 
> should happen in the new code.

The method does not normalize, it does just this:
https://github.com/openjdk/jdk/blob/739769c8fc4b496f08a92225a12d07414537b6c0/src/java.base/share/native/libjava/Float.c#L34-L43

Theres also no `rawIntBitsToFloat`. You only need to take care of writing a 
float to outside the JDK, when it reads it in the normalization does not matter.

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

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

Reply via email to