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 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

This is simple. Please help

David Barry
Ranch Hand

Joined: Jan 13, 2009
Posts: 84
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

Joined: Oct 02, 2003
Posts: 11917

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


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: 84
Thanks for the help. I figured it out, finally.
Campbell Ritchie

Joined: Oct 13, 2005
Posts: 45277
Please don't use thread titles like This is simple. Please help.
I agree. Here's the link:
subject: This is simple. Please help
It's not a secret anymore!