I don't know whether this question is asked before. I couldn't find it in searches.
System.out.println(1.00 - 9*.10);
the above statement prints out 0.09999999999999998
instead of simply 0.01
I know this is a well known problem in JAVA but i want to know the reason why it is so. Can someone guide me to the implementation details of float
and explain the reason.