Currently Float16Vector.toString prints raw short values from the backing
storage, i.e. the IEEE 754 binary16 bit encodings. Patch uses Float16.toString
routine to print the lane values in more user-friendly human-readable
floating-point format.
In addition, the various bit representations of NaN are canonicalized so that
such lanes are simply printed as "NaN". Float16.toString API renders each lane
as a human-readable floating-point value and prints canonical text ("NaN",
"Infinity", "-0.0")
Kindly review and share your feedback.
Best Regards,
Jatin
---------
- [x] I confirm that I make this contribution in accordance with the [OpenJDK
Interim AI Policy](https://openjdk.org/legal/ai).
-------------
Commit messages:
- 8386322: Float16Vector.toString should render lane values using
Float16.toString
Changes: https://git.openjdk.org/jdk/pull/31800/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=31800&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8386322
Stats: 45 lines in 8 files changed: 34 ins; 0 del; 11 mod
Patch: https://git.openjdk.org/jdk/pull/31800.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/31800/head:pull/31800
PR: https://git.openjdk.org/jdk/pull/31800