sorry for my careless mistake you are actually using double here which is 64 bits in java, but the argument is the same. you can use the following program to find out what exactly happens:
class T {
public static void main (String args[]) {
double d = 0;
for(; d < 10.1; d += 0.1){
if(d > 9.8){
System.out.print(Long.toBinaryString(Double.doubleToLongBits(d))+" == >"+d+"\n");
}
}