The problem is that the .575 value does not have an exact representation in floating point encoding. Correction depends on what you do with the value, as well as the effect of inaccuracy.
If this is just a display problem, use rounding to 3 decimal places and you will get 0.575.
If this is due to an inaccuracy in the calculation, try storing the value as a fraction, which will be accurate. You will need to store and process two floating point values, but that will be for sure. Postpone effective division until the last moment when you need a result.
Check if the difference between the two values matches your problem. For example, subtract sqrt epsilon for the value and check how the changes affect the result of the final calculation and compare it with the required or desired accuracy.
Unfortunately, we have to live with the limitation of the representation of real value in float. Using 128-bit precision floats will make the error much smaller, but not zero.
source share