JDK-8365690 : Release Note: `java.text.DecimalFormat` Now Uses the `Double.toString(double)` Algorithm
  • Type: Sub-task
  • Component: core-libs
  • Sub-Component: java.text
  • Priority: P4
  • Status: New
  • Resolution: Unresolved
  • Submitted: 2025-08-18
  • Updated: 2025-08-18
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 26
26Unresolved
Description
Class `java.text.DecimalFormat` now uses the algorithm implemented in `Double.toString(double)` and in `java.util.Formatter` to format floating-point values.

As a consequence, in rare cases the outcome might be slightly different than with the old algorithm. For example, the `double` 7.3879E20 now produces "738790000000000000000" rather than "738790000000000100000" given appropriate formatting specifications.

To help migrating applications that might be impacted by this change, for a few releases the old algorithm will still be available to `DecimalFormat` and classes that depend on it, like `NumberFormat`. The old algorithm can be enabled with the "-Djdk.compat.DecimalFormat=true" option on the launcher command line. Absent this option, the new algorithm is used.