How are floating errors handled by the computer

Viewed 51

I understand that floating number has their limitations so this can be expected:

>>> 0.1 + 0.2 == 0.3
False

But why is this valid? Computers can't store 0.45, 0.55 reliably either right?

>>> 0.45 + 0.55 == 1.00
True

I want to know how in the first case computer couldn't correct its inaccuracy and in the later one it could.

1 Answers
Related