File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Java in General and the fly likes Double value operations Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "Double value operations" Watch "Double value operations" New topic
Author

Double value operations

dumani jayasinghe
Greenhorn

Joined: Dec 03, 2008
Posts: 29
Hi all,
Please help me to clarify the given matter.

double a=1.0
double b=0.01


i got the value 0.009999....8 for a mode b .Please any one can explain me this.

Thnx a lot
Henry Wong
author
Sheriff

Joined: Sep 28, 2004
Posts: 18121
    
  39


See point 20 of the beginners FAQ.

http://www.coderanch.com/how-to/java/JavaBeginnersFaq

Henry


Books: Java Threads, 3rd Edition, Jini in a Nutshell, and Java Gems (contributor)
dumani jayasinghe
Greenhorn

Joined: Dec 03, 2008
Posts: 29
Thank you very much Henry Wong.It helps me to have a good knowledge in java basics.
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19544
    
  16

That's not just in Java, that's general computing. You will run into the same issue in (almost) every programming language there is.


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Double value operations
 
Similar Threads
Parameter dependent Method call
please, explain how the answer was gotten
Casting doubles to bytes
format double
unary operators