JDK 19 |
---|
19Resolved |
Relates :
|
|
Relates :
|
The specification of these methods is now tighter than in earlier releases and the new implementation fully adheres to it. As a consequence, some returned strings are now shorter than when using earlier releases, and for inputs at the extremes of the subnormal ranges near zero, might look differently. However, the number of cases where there's a difference in output is quite small compared to the sheer number of possible `double` and `float` inputs. One example is `Double.toString(2e23)`, which now returns `"2.0E23"`, whereas in earlier releases it returns `"1.9999999999999998E23"`. Another example, in the `double` subnormal range, is `Double.toString(1e-323)` which now returns `"9.9E-324"`, as mandated by the new specification.