This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes JDBC and the fly likes printing doubles with full precision Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "printing doubles with full precision" Watch "printing doubles with full precision" New topic
Author

printing doubles with full precision

Scott Huddleston
Greenhorn

Joined: Jun 28, 2001
Posts: 12
I'm extracting doubles (from an Oracle 8i v.8.16 DB) using getDouble(i). I know that the value in the database has about 25 sigificant digits to the right of the decimal point. The problem is that I can't seem to print all the significant digits. Is there any way to print doubles with full precision? I've tried using NumberFormat and setting the max fractional digits to higher numbers, but it seems the maximum is 14 digits to the right of the decimal point and then it rounds automatically in the 15th position.
Thanks for any help.
 
 
subject: printing doubles with full precision