JDK-6575878 : Double.toString(string) expands value
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.lang
  • Affected Version: 6
  • Priority: P4
  • Status: Resolved
  • Resolution: Duplicate
  • OS: linux
  • CPU: x86
  • Submitted: 2007-06-30
  • Updated: 2019-07-12
  • Resolved: 2019-07-12
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.
Other
tbdResolved
Related Reports
Duplicate :  
Description
FULL PRODUCT VERSION :


ADDITIONAL OS VERSION INFORMATION :
Linux  2.6.21-1.3194.fc7

A DESCRIPTION OF THE PROBLEM :
When Double.toString(String) is called with "7.79625120912E289" as the string value, "7.796251209119999E289" is returned instead of "7.79625120912E289".



STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
System.out.println(new Double("7.79625120912E289").toString());

EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
"7.79625120912E289"
ACTUAL -
"7.796251209119999E289"

REPRODUCIBILITY :
This bug can be reproduced always.

---------- BEGIN SOURCE ----------
System.out.println(new Double("7.79625120912E289").toString());
---------- END SOURCE ----------

Comments
Verified that this issue duplicates JDK-4511638. To be specific, with the proposed fix for JDK-4511638 applied this issue does not reproduce.
12-07-2019

EVALUATION Possibly duplicate of 4511638.
02-07-2007