Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Double value operations

 
dumani jayasinghe
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Marshal
Pie
Posts: 21195
81
C++ Chrome Eclipse IDE Firefox Browser Java jQuery Linux VI Editor Windows
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

See point 20 of the beginners FAQ.

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

Henry
 
dumani jayasinghe
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you very much Henry Wong.It helps me to have a good knowledge in java basics.
 
Rob Spoor
Sheriff
Pie
Posts: 20549
57
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That's not just in Java, that's general computing. You will run into the same issue in (almost) every programming language there is.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic