What's the math behind this? Please explain. Thank you.
Asked
Active
Viewed 56 times
2

javadev
- 688
- 2
- 6
- 17

familiacarballo
- 107
- 1
- 1
- 6
-
110.1 - 10 == 0.09999999999999964 – AcK Feb 07 '21 at 14:12
-
1Because binary floating-point cannot always represent decimal numbers exactly. – a guest Feb 07 '21 at 14:29
-
See https://stackoverflow.com/questions/588004/is-floating-point-math-broken – a guest Feb 07 '21 at 14:30
-
And yet, `(10+0.1)=10.1` == `TRUE` ;) *(Still, use integers, or use `ROUND()`)* – MatBailie Feb 07 '21 at 14:50
1 Answers
0
as mentioned, it's a floating-point issue so to get TRUE out of it you should do:
=IF(ROUND(10.1-10, 1)=0.1, TRUE)

player0
- 124,011
- 12
- 67
- 124