On Fri, 16 Oct 2026 16:34:12 GMT, Raffaello Giulietti <[email protected]> 
wrote:

>> The existing noDoubleRoundingToFloat16 check doesn't take into account the 
>> exponent / significand interaction of subnormals so only normal-range values 
>> are eligible to go through the existing fast-path.
>> 
>> 
>> 
>> ---------
>> - [x] I confirm that I make this contribution in accordance with the 
>> [OpenJDK Interim AI Policy](https://openjdk.org/legal/ai).
>
> src/jdk.incubator.vector/share/classes/jdk/incubator/vector/Float16.java line 
> 493:
> 
>> 491:                                                            // handles 
>> infinities too
>> 492:             Double.isNaN(trialResult) ||
>> 493:             (Math.abs(trialResult) > (0x1.0p-14) && // 
>> Float16.MIN_VALUE, avoid subnormal range
> 
> Suggestion:
> 
>             (Math.abs(trialResult) > (0x1.0p-14) && // Float16.MIN_NORMAL, 
> avoid subnormal range
> 
> 
> Any reason for using the static field in the comment but not in the code?

Good catch; I'll fix that in the next push.

Since the code needs the value as a double and it is a constant, I thought 
using the double literal was preferable to `Float16.MIN_NORMAL.doubleValue()` 
or similar expression.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/33392#discussion_r4297046897

Reply via email to