When Two Calculations Almost Agree

A tiny rounding difference, a missing observation, and a wrongly shaped result are different problems. We need checks that distinguish them before trusting a numerical answer.

10 sections · 4 questions · 2 coding challenges

1 / 10

Representing Real Quantities With Finite Storage

BOTIE

A computer has a finite number of bits for each stored numerical value. Many decimal fractions therefore cannot be represented exactly in binary floating-point storage. Repeated arithmetic must round intermediate results.

NumPy exposes data types, finite-value checks, and approximate comparisons so a program can account for those limitations. The tolerance is part of our numerical contract, not a way to declare every discrepancy harmless.

Sources for this history