A one-line Python quiz stumps the timeline: does 0.1 + 0.2 == 0.3?

cneuralnetwork · x · 2026-11-29

cneuralnetwork posts a one-line Python quiz: what does print(0.1 + 0.2 == 0.3) output? The answer is False — binary floating point can't represent 0.1 or 0.2 exactly, so the sum lands at 0.30000000000000004. A classic precision gotcha that keeps tripping people up.

Original post →

More from Fun

Fun channel →