Multiplication works fine, but 2.2 cannot be represented exactly as double. Nearest doubles:
- 2.199999999999999733 (0x400199999999999999)
- 2.200000000000000177 (0x40019999999999999a)
Some software will print the last value as 2.2 , but this does not mean that it is accurate. It just means that it is considered "close enough."
source share