Why does
2.23 + 0.17 = 2.4899999999999998
but
1.23 + 0.17 = 1.49
Screenshot from a debug console:
Why does
2.23 + 0.17 = 2.4899999999999998
but
1.23 + 0.17 = 1.49
Screenshot from a debug console:
It's the magic of floating point numbers :)
You can read some interesting things about it. Also, there are solutions for that problems.