I note that python3 says that:
- 1.1+2.2 is 3.3000000000000003.
- 2.2+4.4 is 6.6000000000000005.
- 1.1+2.3 is 3.4.
- 2.2+4.3 is 6.5.
- And so on.
I realise that floating point arithmetic is not perfectly accurate, as per
Is floating point math broken?
so that, for instance, that 1.1 may not be perfectly represented inside the float type.
However, there seems to be something about a query of the form x+2x that provokes an exceptional inaccuracy. Is there a simple intuition as to why?