This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes This is simple. Please help Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Beginning Java
Reply locked New topic
Author

This is simple. Please help

David Barry
Ranch Hand

Joined: Jan 13, 2009
Posts: 83
I know that you do 6.83783 * 10^3 as 6.83783E3, but how do I do that number times 10 to the negative third?
fred rosenberger
lowercase baba
Bartender

Joined: Oct 02, 2003
Posts: 11153
    
  16

you want 10 to the negative 1/3 power? that's the same as 1 over the cube root of 10, which would require you to use the Math.pow function:

6.83783 / Math.pow(10.0, 1.0/3);

are you sure you didn't mean 10 to the negative three power?

in which case you simply would write

6.83783E-3


There are only two hard things in computer science: cache invalidation, naming things, and off-by-one errors
David Barry
Ranch Hand

Joined: Jan 13, 2009
Posts: 83
Thanks for the help. I figured it out, finally.
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 37953
    
  22
Please don't use thread titles like This is simple. Please help.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: This is simple. Please help
 
Similar Threads
How to convert a number into an Array
Recruiting Infidels
Instance blocks.
The First Annual Synchronized GlobalOrgasm Day
it draws firstly circle and then after a second the circle disappears