Numbers & Functions · 2 The Hole in the Number Line
2.7 The number a computer can't hold
Now here’s where it gets interesting, and it’s the whole reason I made you sit with infinite decimals.
To write π down exactly, you would need infinitely many digits. Not a lot of digits. Infinitely many. You would never finish. A computer cannot do that. It has room for maybe fifteen or sixteen digits, and then it is out of boxes. So when you hand it π, it writes down 3.141592653589793 and then it stops, and throws the rest away forever. It rounds. The number it actually stores isn’t π — it’s a near-miss.
And it’s not just the irrationals. The fraction 1 10 — plain old 0.1 — turns into a repeating decimal when you write it in binary, the computer’s native twos. So the machine can’t store 0.1 exactly either. Here’s the demonstration that makes everyone’s eyebrows go up. Ask almost any computer: does 0.1 + 0.2 = 0.3? The computer says no. It reports the answer as 0.30000000000000004. It’s not broken. It rounded 0.1 and rounded 0.2, each to the nearest dot it could store, and the two tiny roundings didn’t quite cancel. A speck of error, made visible. ▶Run it yourself — watch your own computer get 0.1 + 0.2 “wrong.” (notebook 2.1 in Colab) One line of code makes your machine print 0.30000000000000004 on your own screen. Then try printing 1 3 and π and see exactly where the computer runs out of room. Reading about it is a curiosity; watching your own computer do it is unforgettable.
Our number line is perfect and infinite. The computer’s number line is a finite grid of dots. Most real numbers fall between the dots, so the computer quietly snaps each one to the nearest dot it can hold. It isn’t lying to you — it’s working with a very good sketch of the real numbers, never the real thing.
our line continuous — every point is a number computer π snaps to nearest dot Figure 2.5. The finite grid versus the continuous line. Most reals (like π) fall between the computer’s representable dots, so it stores the nearest dot instead — a faithful sketch, not the real thing.
Most of the time that speck of error is far too small to matter. But specks add up. When a computer trains an artificial intelligence, it performs billions of The Hole in the Number Line these slightly-rounded steps, each feeding the next. Stack a billion tiny errors and they can grow into a real one. And notice what this quietly tells you. The careful, infinite reasoning you’re learning in this book is not the clumsy version of what computers do — it’s the exact version. You are learning the ground truth that the machine spends all its effort trying to imitate.
All 8 chapters of Numbers & Functions · Foundations · All courses