RFR: JDK-8289551: Conversions between bit representations of half precision values and floats [v6]

Joe Darcy darcy at openjdk.org
Mon Jul 25 21:09:03 UTC 2022


On Sat, 23 Jul 2022 18:00:12 GMT, Raffaello Giulietti <duke at openjdk.org> wrote:

>> Joe Darcy has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Implement review feedback.
>
> src/java.base/share/classes/java/lang/Float.java line 1112:
> 
>> 1110:         if (abs_f >= (65504.0f + 16.0f) ) {
>> 1111:             return (short)(sign_bit | 0x7c00); // Positive or negative infinity
>> 1112:         } else {
> 
> The ` else {` with the corresponding closing `}` could be removed and the code in this branch could be un-indented. This would make the code visually less "jagged".

Good suggestion; the reduced indenting in this case also allows some of the comment blocks to take up fewer lines.

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

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


More information about the core-libs-dev mailing list