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
Register / Login


Win a copy of Mongo DB Applied Patterns this week in the MongoDB forum
or a resume review from Five Year Itch in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Java in General
Reply 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: 16680
    
  19


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

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
How To Ask Questions How To Answer Questions
 
I agree. Here's the link: jrebel
 
subject: Double value operations
 
Similar Threads
Casting doubles to bytes
Parameter dependent Method call
please, explain how the answer was gotten
format double
unary operators