2 ms·
Thank you! That really helped me understand this issue. I got ChatGPT Code Interpreter to generate an example for me: a = 0.1 b = 0.2 c = 0.3
by simonw 4y ago
Thank you! That really helped
me understand this issue.
I got ChatGPT Code Interpreter to generate an example for me:
a = 0.1
b = 0.2
c = 0.3
result1 = (a + b) + c
result2 = a + (b + c)
(result1, result2, result1 == result2)
Output:
(0.6000000000000001, 0.6, False)
- monkeydust 4y agoInterestingly when I copy paste your example I get true. Perhaps that itself is the example