Possible Duplicate:
Strange floating-point behaviour in a Java program
Why does JSP/JSTL division by 1000 sometimes give remainder?
I am trying to get the numbers after the decimal.
ex: 60.
4 -> 0.4
Yet, when do
double a = 60.4 % 1;
it comes out to be 0.3999999999999986
.
Why is this? And how could it be fixed?