aspose 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


Win a copy of Spring in Action this week in the Spring forum!
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: 18896
    
  40


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: 19718
    
  20

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