I was working through debugging a program of mine where certain doubles and floats were not equal to each other. I have looked for answers previous to posting this on here as to why this would happen but could not find much relevant information. For example:
System.out.println(4.4f == 4.4);
This prints false while,
System.out.println(4.5f == 4.5);
Prints true.
Could someone shed some light on why this is the case in JAVA?