Greetings,
I am self-learning from the python tutorial in the python docs. I am unable to wrap my head around this simple piece of code. Any kind of help is deeply appreciated.
These decimal fractions are not exactly representable in binary floating point, and the binary approximations were already as close as it’s possible to get.
Adding the 3 copies of the closest binary approximation to 0.1 yields a sum that’s a little larger than the closest binary approximation to 0.3: