On Tue, 29 Oct 2024 14:03:35 GMT, Raffaello Giulietti <rgiulie...@openjdk.org> 
wrote:

>> Joe Darcy has updated the pull request incrementally with one additional 
>> commit since the last revision:
>> 
>>   Add support for proper String -> Float16 conversion.
>
> src/jdk.incubator.vector/share/classes/jdk/incubator/vector/Float16.java line 
> 549:
> 
>> 547:         long maskedValue = dAsLong & mask;
>> 548:         // Can't have all-zeros or all-ones in low-order bits
>> 549:         return maskedValue != 0L && maskedValue != mask;
> 
> Suggestion:
> 
>         long mask = 0x03FF_FFFF_FFFFL; // 42 low-order bits
>         long maskedValue = dAsLong & mask;
>         // not halfway between two adjacent Float16 values
>         return maskedValue != 0x0200_0000_0000L;
> 
> I think this should be sufficient?

Let's talk about the case analysis off-list.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/21574#discussion_r1821896159

Reply via email to