[lworld+fp16] RFR: 8339252: Add method float16Value() to BigInteger and BigDecimal [v3]

Joe Darcy darcy at openjdk.org
Tue Sep 3 22:15:46 UTC 2024


On Tue, 3 Sep 2024 16:32:47 GMT, Raffaello Giulietti <rgiulietti at openjdk.org> wrote:

>> This patch adds `float16Value()` to `BigInteger` and `BigDecimal`, as well as `Float16.valueOf(BigDecimal)`.
>
> Raffaello Giulietti has updated the pull request incrementally with one additional commit since the last revision:
> 
>   More clarification in a comment.

src/java.base/share/classes/java/lang/Float16.java line 286:

> 284:     */
> 285:     public static Float16 valueOf(long value) {
> 286:         if (value <= -65_520L) {  // -(Float16.MAX_VALUE + Float16.ulp(Float16.MAX_VALUE) / 2)

I assume you'll sync in / merge this change from the branch.

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

PR Review Comment: https://git.openjdk.org/valhalla/pull/1228#discussion_r1742764559


More information about the valhalla-dev mailing list