On Wed, 6 May 2026 23:04:20 GMT, Paul Sandoz <[email protected]> wrote:

>> Jatin Bhateja has updated the pull request incrementally with one additional 
>> commit since the last revision:
>> 
>>   Review comments resolution
>
> src/jdk.incubator.vector/share/classes/jdk/incubator/vector/Float16Vector.java
>  line 3800:
> 
>> 3798:             }
>> 3799:             return value;
>> 3800:         }
> 
> There is a really subtle bug here, reflecting the fact we probably don't test 
> for `-0.0`. (It's usually that or NaNs which trip us up!)
> 
> I did not find this fix myself an AI review did (quite impressively). 
> However, I explored the possible fixes and asked the AI to verify. The 
> easiest fix is to first convert the raw float 16 value into a float as in:
> 
> float ef = shortBitsToFloat16(e).floatValue();
> 
> Then from then on implement in the same manner as the same method on 
> `FloatVector`.

Addressed and also extended the test generators to include int/long corner 
cases to catch this issue without fix.

> src/jdk.incubator.vector/share/classes/jdk/incubator/vector/gen-src.sh line 
> 164:
> 
>> 162:       carriertype=short
>> 163:       Carriertype=Short
>> 164:       FPtype=FP16
> 
> Do we need this? Can we just explicitly declare `-KFP16` instead in the 
> `Float16` case args?

Done

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

PR Review Comment: https://git.openjdk.org/jdk/pull/28002#discussion_r3200605190
PR Review Comment: https://git.openjdk.org/jdk/pull/28002#discussion_r3200608640

Reply via email to