Am 30.12.2015 um 20:29 schrieb TomD <tomdiscus@xxxxxx>:
x = 0.1 + 0.1 + 0.1 x == 0.3 -> false A general programming problem ! Equality checks with floats have to be done with a defined threshold, e.g. (x - 0.3).abs < 1e-4 // 1e-4 = 1 * (10 ** -4) = 0.0001 -> true or use the dedicated method equalWithPrecision, here with default threshold arg precision = 1e-4 x.equalWithPrecision(0.3) -> true Greetings Daniel |