On Thu, 14 Jul 2022 20:54:59 GMT, Joe Darcy <da...@openjdk.org> wrote:

>> src/java.base/share/classes/java/lang/Float.java line 1100:
>> 
>>> 1098: 
>>> 1099:         // The overflow threshold is binary16 MAX_VALUE + 1/2 ulp
>>> 1100:         if (abs_f > (65504.0f + 16.0f) ) {
>> 
>> if (abs_f >= (65504.0f + 16.0f) ) {
>> 
>> Value exactly halfway must round to infinity.
>
> Good catch. The rest of the code computed the right value, but the condition 
> should be changed as suggested.

I increased test coverage around Binary16.MAX_VALUE+0.5*ulp(Binary16.MAX_VALUE).

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

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

Reply via email to