Skip to content

Fractions Are Stored Approximately

Beginning of the lesson

Fractions Are Stored Approximately

Integers bent to the finite cell and survived: a range appeared, a sign became a reading, but every integer inside the range is stored exactly. Fractions will not be so lucky. Today the finite cell meets an infinite enemy — and loses, honestly, by an argument you can count on your fingers. Every language on Earth inherits the loss.

Learning goals: derive why storing all fractions exactly is impossible in principle; explain what a fraction agreement actually chooses; and carry away the two practical laws — never compare fractions for exact equality, and never count money in fractions.

The counting argument

How many fractions live between 0 and 1? Infinitely many: 1/2, 1/3, 1/4, … and between any two of them, more. How many values can a cell represent? Finitely many — the previous lessons' fixed catalog (a million, for our six-digit toy). Now the argument, complete in one sentence:

A finite catalog cannot give a distinct entry to each of infinitely many fractions — so storing all fractions exactly is impossible in principle, for any cell size, any machine, any language, forever.

This is not a limitation to be engineered away next decade — it is arithmetic: infinite into finite does not go without loss. Every fraction agreement is therefore a choice of casualties: which fractions get an exact catalog entry, and which are replaced by the nearest stored neighbor. Our toy machine's simplest such agreement: "the cell holds the fraction's first six digits after the point" — it stores 0.5 exactly, and replaces 1/3 with 0.333333, forever short of the truth by a sliver that no widening of the cell eliminates (0.3333333333 is still not 1/3).

Continue this lesson on YourAIZone

The full lesson has the complete explanation, worked examples, common mistakes, tests with instant checking and an AI tutor. Start right away as a guest, or create an account to keep your progress.

In the full lesson

  • The complete explanation
  • Worked examples
  • Common mistakes and how to avoid them
  • Test questions: 2
  • AI tutor that answers questions about the topic
  • Progress tracking for students, parents and teachers