aspose file tools*
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
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: 11479
    
  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: 39834
    
  28
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