This week's book giveaway is in the Performance forum.
We're giving away four copies of The Java Performance Companion and have Charlie Hunt, Monica Beckwith, Poonam Parhar, & Bengt Rutisson on-line!
See this thread for details.
Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Exponent to regular number

 
Ronald Schindler
Ranch Hand
Posts: 50
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,
I haven't been able to find the answer to this anywhere. So...
I'm setting a double to equal the value of 10 to the 10th power as shown here:
double myDbl = java.lang.Math.pow(10, 10);
Its returning the number in exponentional notation and what I want is the number in the format of 100. What's the method to accomplish this number format?
Thanks for any assist.
Ronald
 
Michael Ernest
High Plains Drifter
Sheriff
Posts: 7292
Netbeans IDE VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Cheap way: cast the result to a long.
------------------
Michael Ernest, co-author of: The Complete Java 2 Certification Study Guide
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic