Clean-room implementation of Double::toString(double) and Float::toString(float)

Brian Burkhalter brian.burkhalter at
Fri Mar 30 20:42:43 UTC 2018

Hello Raffaello,

On Mar 30, 2018, at 9:50 AM, raffaello.giulietti at wrote:

> the topic I would like to work on is to solve the bugs described at
> about the
> results produced by the current implementation of
> Double::toString(double). I noticed that after all these years most of
> the issues illustrated in the bug report still remain unsolved in the
> latest OpenJDK.

The JBS [1] issue is [2]. It is currently owned by me.

> […]
> The new code also has a better specification than the current one, while
> being mostly compatible. Indeed, the current specification leaves room
> for interpretation and thus cannot ensure that an implementation
> produces consistent and unique results from one release to the next. The
> newer spec ensures a unique result.

Any specification change would need to go through the Compatibility and Specification Review process. [3]

> If there is interest in the new implementation, I would be glad to
> contribute my code to the OpenJDK.

Speaking for myself, any contribution in this area would be welcome. Work could proceed under the extant JBS bug ID.

> I've already signed the Oracle Contributor Agreement a few days ago.

Processing the OCA should take at least two weeks [4].

> The code currently sits in its own module, is mostly polished,
> thoroughly tested but has never been audited by people other than myself.
> My target is to be able to integrate it in the JDK 11 LTS release, due
> in late September 2018.

Per the JDK 11 schedule [5] there could well be sufficient time to run this submission through the review processes. I suggest, once your OCA has been processed, to proceed by posting your proposed changes for review on this mailing list. Note that in general attachments are scrubbed, so the patch would need either to be included inline or published as a webrev [6].




More information about the core-libs-dev mailing list