Hi Markus,
...never use float/double when you want to have numeric precision ;-)
Code:
float f = 0.8f;
System.out.println("Float f: " + f);
double d1 = 0.8d;
System.out.println("Double d1: " + d1);
double d2= (double)f;
System.out.println("Double d2: " + d2);
Result:
Float f: 0.8
Double d1: 0.8
Double d2: 0.800000011920929
Unfortunately we internally use Java-class DecimalFormat and this class internally casts float values to double values, so is using exactly what is done with the d2-variale in the code above...
We now introduced a correction factor when comparing from-to in the grid of "0.0000002". The correction factor is only applied when using float or double - it is not applied when using BigDecimal.
Changes are applied in version 20221114 (just on its way to be released).
Thanks for your hint! Björn