File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Beginning Java and the fly likes Exponent to regular number Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Exponent to regular number" Watch "Exponent to regular number" New topic

Exponent to regular number

Ronald Schindler
Ranch Hand

Joined: Jul 11, 2000
Posts: 50
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.
Michael Ernest
High Plains Drifter

Joined: Oct 25, 2000
Posts: 7292

Cheap way: cast the result to a long.
Michael Ernest, co-author of: The Complete Java 2 Certification Study Guide

Make visible what, without you, might perhaps never have been seen.
- Robert Bresson
I agree. Here's the link:
subject: Exponent to regular number
jQuery in Action, 3rd edition