Rounding, Approximation & Scale

Start from zero — the basic math you need before everything else

Some numbers are exact. A classroom with 12 chairs has exactly 12, not 11.6 and not 12.4. Most of the numbers you meet outside a simple headcount aren't like that. A stopwatch might read 9.83274 seconds. A calculator dividing 1 by 7 might show 0.142857142857. Numbers like these carry far more digits than you actually need, and rounding is how you trim one down to a simpler value while being honest about how much detail you're keeping.

Rounding isn't guessing, and it isn't lying either. You choose a level of detail that fits the situation, then adjust the last digit you're keeping based on what comes right after it. You'll often see the result written with the symbol ≈, read as "is approximately equal to", as in 7.846 ≈ 7.85. Get that habit right and you can round anything: a price, a measurement, a model's output score.

Here's a picture worth keeping in mind. A rain gauge is just a collecting cylinder with graduation marks printed up the side. Rain rarely falls to exactly one of those marks, so if the water sits between two lines, you read off the nearest one and write that down. Extra digits wouldn't make your reading more honest. They would only pretend the gauge shows detail it can't actually show. Try it yourself below: drag the point along the line and switch between rounding to the nearest one, tenth, and hundredth, and watch which mark wins.

Where this lives in MLComputers store almost all real-valued numbers with finite precision. A value that looks perfectly clean on your screen may already be a close binary approximation underneath. This matters more than it sounds: very small gradients can vanish entirely at low precision, and very large values can overflow. The same discipline applies to how you report results. Writing a model's accuracy as 0.873642…
▶ Rounding, Approximation & Scale
← Powers of TenWhat a Variable Is →