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

Paul Sandoz psandoz at openjdk.org
Fri Jul 22 23:01:11 UTC 2022


On Fri, 22 Jul 2022 01:29:57 GMT, Joe Darcy <darcy at openjdk.org> wrote:

>> Initial implementation.
>
> Joe Darcy has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Implement review feedback.

I don't claim to be an expert in IEEE formats... the methods generally look good with thorough testing. Looking forward to the impact intrinsification will have!

test/jdk/java/lang/Float/Binary16Conversion.java line 29:

> 27:  * @summary Verify conversion between float and the binary16 format
> 28:  * @library ../Math
> 29:  * @build FloatConsts

Is this line necessary?

test/jdk/java/lang/Float/Binary16Conversion.java line 33:

> 31:  */
> 32: 
> 33: import static java.lang.Float.*;

Unused.

test/jdk/java/lang/Float/Binary16Conversion.java line 100:

> 98: 
> 99:         return errors;
> 100:     };

Suggestion:

    }

test/jdk/java/lang/Float/Binary16Conversion.java line 409:

> 407:         public static final short MAX_SUBNORMAL     = 0x03ff;
> 408:         public static final short MIN_VALUE         = 0x0001;
> 409:         public static final short NEGATIVE_ZERO     = (short)0x8000;

Unused.

test/jdk/java/lang/Float/Binary16ConversionNaN.java line 30:

> 28:  */
> 29: 
> 30: import static java.lang.Float.*;

Unused.

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

Marked as reviewed by psandoz (Reviewer).

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


More information about the core-libs-dev mailing list