Terminating Decimal

Fractions & Decimals

A terminating decimal is a decimal that ends after a finite number of digits, such as 0.25 or 3.125.

Definition

A terminating decimal is a decimal that stops after a certain number of digits. It does not go on forever. Examples: $0.5$, $0.25$, $3.75$, $0.125$.

Example

$1/2 = 0.5$ (stops after $1$ digit). $1/4 = 0.25$ (stops after $2$ digits). $1/8 = 0.125$ (stops after $3$ digits). These are all terminating decimals.

Key Insight

Fractions that terminate always have denominators (in simplest form) whose only prime factors are $2$ and $5$. Since our base-ten system is built from $2 \times 5$, only these factors "fit perfectly" into base ten.

Definition

A fraction $a/b$ in lowest terms produces a terminating decimal if and only if $b$ has no prime factors other than $2$ and $5$: $b = 2^m \cdot 5^n$ for some non-negative integers $m, n$. In that case, the decimal terminates after $\max(m, n)$ digits. This is because $10 = 2 \times 5$, so $b$ always divides some power of $10$.

Example

$7/40$: $40 = 2^3 \times 5$. Terminating with $\max(3,1) = 3$ digits. $7/40 = 7 \times 25/1000 = 175/1000 = 0.175$. But $1/6$: $6 = 2 \times 3$. Factor of $3$ means it repeats: $0.1666\ldots = 0.1\overline{6}$.

Key Insight

To predict whether a fraction terminates, you only need to check the denominator after simplifying. This single test tells you more about the decimal expansion than doing the actual long division.

Definition

A rational $p/q$ in lowest terms terminates in base $b$ iff every prime factor of $q$ also divides $b$. For base $10$: $q$ must be of the form $2^a \cdot 5^c$. Equivalently, $q \mid 10^N$ for some $N$. In base $2$ (binary), only fractions with denominators that are powers of $2$ terminate - explaining why $0.1$ in base $10$ ($= 1/10$) cannot be represented exactly in binary ($10 = 2 \times 5$, and $5$ is not a factor of $2$).

Example

In base $12$ (duodecimal), fractions with denominators $2^a \times 3^b \times 2^c = 2^a \times 3^b$ (since $12 = 2^2 \times 3$) terminate. So $1/3 = 0.4$ (base $12$, terminating!) while $1/5$ repeats in base $12$. The choice of base radically alters which fractions terminate.

Key Insight

The termination condition reveals a deep connection between arithmetic and the structure of a number base. A "better" base for everyday arithmetic might be base $12$ (divisible by $2, 3, 4, 6$) because far more common fractions would terminate - a historical argument made by advocates of dozenal (base-$12$) arithmetic.