Possible Duplicate:
how to fix double precision issue in java
I have a small piece of code like this:
double number1 = 6;
double number2 = 5.99;
double result = number1 - number2;
However, the result == 0.009999999999999787
instead of 0.01
I know it is the issue of IEEE 754 standard, but I don't understand why. Could you please explain it for me?