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

Raffaello Giulietti rgiulietti at openjdk.org
Wed Sep 4 10:00:31 UTC 2024


On Tue, 3 Sep 2024 22:30:03 GMT, Joe Darcy <darcy at openjdk.org> wrote:

>> 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/math/BigDecimal.java line 3837:
> 
>> 3835:         }
>> 3836:         if (scale < 0) {
>> 3837:             return Float16.valueOf(signum() * w.multiply(bigTenToThe(-scale)).floatValue());
> 
> Are the calls to `floatValue()` for the `scale < 0` and `scale == 0` cases meant to be calls to `float16Value()`?
> 
> If not, the different coding pattern from the analagous float and double methods should be documented in a comment.

Improved code to mirror analogous code in `fullDoubleValue()`.

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

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


More information about the valhalla-dev mailing list