[lworld+fp16] RFR: 8341245: Add 'shortest length' toString() to Float16 [v2]

Joe Darcy darcy at openjdk.org
Tue Oct 1 19:24:50 UTC 2024


On Tue, 1 Oct 2024 08:20:24 GMT, Raffaello Giulietti <rgiulietti at openjdk.org> wrote:

>> Add `Float16.toString()` with the same 'shortest length' properties as of `[Double|Float].toString()`.
>
> Raffaello Giulietti has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Revert back experimental remnant of valueOf(String).

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

> 212:      * @param   f16   the {@code Float16} to be converted.
> 213:      * @return a string representation of the argument.
> 214:      * @see java.lang.Float#toString(float)

Please also fix/adjust the implSpec portions of the method's javadoc.

src/java.base/share/classes/jdk/internal/math/Float16ToDecimal.java line 124:

> 122: 
> 123:     /**
> 124:      * Returns a string representation of the {@code float}

Nit: "float argument" -> "Float16 argument"

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

PR Review Comment: https://git.openjdk.org/valhalla/pull/1260#discussion_r1783371489
PR Review Comment: https://git.openjdk.org/valhalla/pull/1260#discussion_r1783373836


More information about the valhalla-dev mailing list