For example:
In: -0.01 + (-0.02) + (-0.4) + (-0.05)
Out: -0.48000000000000004
Instead of -0.48
Why does it happen so? And how to avoid such situations?
For example:
In: -0.01 + (-0.02) + (-0.4) + (-0.05)
Out: -0.48000000000000004
Instead of -0.48
Why does it happen so? And how to avoid such situations?