[lworld+fp16] RFR: 8334432: Refine Float16.fma
Joe Darcy
darcy at openjdk.org
Sat Jul 6 19:42:47 UTC 2024
On Fri, 5 Jul 2024 12:33:29 GMT, Jatin Bhateja <jbhateja at openjdk.org> wrote:
> My query was in following context, citing excerpt from JVM Specification 22 section 2.11.3.
>
> "The Java Virtual Machine does not indicate overflow or underflow during operations on floating-point data types. That is, floating-point instructions never cause the Java Virtual Machine to throw a run-time exception (not to be confused with an IEEE 754 floating-point exception). **An operation that overflows produces a signed infinity; an operation that underflows produces a subnormal value or a signed zero;** an operation that has no unique mathematically defined result produces NaN. All numeric operations with NaN as an operand produce NaN as a result"
Sure; that is reasonable.
The correctness of the Float16.fma method relies on the correctness of the double to Float16 conversion. As part of a larger test update, I was planned on expanding the double to Float16 testing. In particular, a test methodology like:
For each finite Float16 value, test the double values around the half-way point to make sure the rounding is correct in those cases. Since there are so few Float16 values, I expect this test to run quickly.
-------------
PR Review Comment: https://git.openjdk.org/valhalla/pull/1143#discussion_r1667420329
More information about the valhalla-dev
mailing list