IEEE 754 Floating-Point: Why 0.1 + 0.2 ≠ 0.3 and What to Use for Financial Calculations
0.1 + 0.2 ≠ 0.3 in nearly every programming language — because 0.1 can't be represented exactly in binary. Here's the IEEE 754 bit structure (sign, exponent, mantissa), special values (NaN, Infinity, -0), why integers above 2^53 lose precision in JavaScript, and why financial code should never use floats.