Fraction Arithmetic Is Harder Than You Remember. Let a Machine Do It.
Ask most adults to add 3/7 and 5/11 without a calculator and watch them pause. Fraction arithmetic is one of those skills that fades fast after school, and when you need it -- for woodworking measu...

Source: DEV Community
Ask most adults to add 3/7 and 5/11 without a calculator and watch them pause. Fraction arithmetic is one of those skills that fades fast after school, and when you need it -- for woodworking measurements, recipe scaling, engineering calculations, or implementing rational number libraries -- the rules feel less intuitive than you remember. I want to refresh the fundamentals and explain why fractions still matter in a world of floating-point decimals. Why fractions exist when we have decimals The number 1/3 in decimal is 0.333333... repeating forever. No finite decimal representation is exact. In a programming context, this means floating-point arithmetic produces tiny errors that accumulate: 0.1 + 0.2 === 0.3 // false 0.1 + 0.2 // 0.30000000000000004 Fractions avoid this entirely. 1/3 + 1/3 + 1/3 = 3/3 = 1, exactly. No rounding, no accumulated error. Financial calculations, scientific computing, and any domain where exact arithmetic matters either uses fractions (rational numbers) inte