We help IT Professionals succeed at work.

what does 9.999999999999999E-5 mean exactly, help!!

gagaliya
gagaliya asked
on
Medium Priority
879 Views
Last Modified: 2012-08-13
i have a Double variable - TEST_DOUBLE that shows up on the screen/xml as  9.999999999999999E-5  can someone please tell me in term of normal decimal number what this equals to exactly?  is it 0.000000....00099999999   or 99999999.99999... etc?

when i put it through this rounding function:

public double roundDouble(double d, int places)
{ return Math.round(d * Math.pow(10, (double) places)) / Math.pow(10, (double) places);   }

roundDouble(TEST_DOUBLE.doubleValue(),2);

it returns back as 0.0 ???

very confused, i know it's some euler number, but just need an exact value of waht 9.99999999999E-5 means. thank you

Comment
Watch Question

Mick BarryJava Developer
CERTIFIED EXPERT
Top Expert 2010

Commented:
it means 9.999 x 10 to the power of -5
Java Developer
CERTIFIED EXPERT
Top Expert 2010
Commented:
ie. 9.9999 x 0.00001 = 0.000099999

Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts
CERTIFIED EXPERT
Top Expert 2016
Commented:
It's an exponent

(9.9/ 100000)
Mick BarryJava Developer
CERTIFIED EXPERT
Top Expert 2010

Commented:
Basicaly the E notation tells you how many places to shift the decimal point

Author

Commented:
ah thanks guys!
Mick BarryJava Developer
CERTIFIED EXPERT
Top Expert 2010

Commented:
no worries :)
CERTIFIED EXPERT
Top Expert 2016

Commented:
:-)
Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.