Why 0.1 + 0.2 ≠ 0.3: A Deep Dive into IEEE 754 and Floating-Point Arithmetic
You can find the Chinese version at 從 IEEE 754 標準來看為什麼浮點誤差是無法避免的
Introduction
When people first learn to code, they often encounter floating-point errors. If you haven't experienced this yet, you're very lucky!
For example, in Python, 0.1 + 0.2 does...
larrylu.dev4 min read