Skip to content
Topos Uranos

Summary

This lesson studies the decimal writing of rational numbers. It shows that the digits of a quotient arise from the remainders of long division, defines the value of an infinite decimal expansion by means of nested intervals and the Archimedean property, and proves the three theorems that characterize it: an irreducible fraction has a terminating expansion if and only if its denominator has no prime factors other than 22 and 55; the expansion of every rational number is terminating or repeating, with a period of length less than the denominator; and, conversely, every repeating expansion represents a rational number, whose generating fraction is obtained from the sum of a geometric progression. From this follow the equality between 0.999… and 11, the characterization of irrational numbers by their non-repeating expansions and, finally, scientific notation, significant figures and the bound on the error that rounding commits.

Learning objectives

  1. Obtain the decimal expansion of a fraction by long division and justify, with the remainders, why each digit lies between 00 and 99 and why the expansion approximates the fraction.
  2. Decide, from the factorization of the denominator, whether a fraction has a terminating or a repeating expansion, and bound the length of its period.
  3. Find the generating fraction of a repeating expansion and justify rigorously equalities such as that of 0.999… with 11.
  4. Write numbers in scientific notation, round them to a given number of significant figures and bound the absolute and relative errors committed.

Long division and decimal digits

In the lesson on the rational numbers fractions and their operations were studied; in the lesson on positional numeral systems, the writing of natural numbers with digits. The decimal expansion brings both together: it extends positional notation to the right of the decimal point, with negative powers of 1010. Thus the number written 0.375 is, by definition, a sum of tenths, hundredths and thousandths:

310+7102+5103=375103=38\frac{3}{10} + \frac{7}{10^2} + \frac{5}{10^3} = \frac{375}{10^3} = \frac{3}{8}

In general, a terminating decimal expansion consists of an integer part NN and a finite number of digits c1,c2,…,cnc_1, c_2, \ldots, c_n, each between 00 and 99, and represents the following number:

N+c110+c2102+⋯+cn10n=N+∑k=1nck10kN + \frac{c_1}{10} + \frac{c_2}{10^2} + \cdots + \frac{c_n}{10^n} = N + \sum_{k = 1}^{n} \frac{c_k}{10^k}

Since the sign of a rational number is written separately, it suffices to study the positive rationals. To find the expansion of a fraction pq\frac{p}{q} of natural numbers one uses long division, which is nothing other than repeated division with remainder: first pp is divided by qq, which gives the integer part NN and a remainder r0r_0; then, at each step, the last remainder is multiplied by 1010 and divided by qq. The quotient of that division is the next digit, and its remainder feeds the step that follows:

p=qN+r0,10rk−1=qck+rk,0≤rk<qp = qN + r_0, \qquad 10 r_{k - 1} = q c_k + r_k, \qquad 0 \le r_k < q
ExampleThe long division of 3 by 7

We compute the digits of 37\frac{3}{7}. At each step we write the dividend, which is ten times the previous remainder, the digit obtained and the new remainder. The figure shows the staircase of divisions and, above it, the digits as they accumulate.

Proof

  1. 10⋅3=30=7⋅4+210 \cdot \dato{r0}{3} = 30 = 7 \cdot \resaltar{4} + \resaltar{2}

    Since 3<73 < 7, the integer part is 00 and the first remainder is the numerator itself, r0=3r_0 = 3. We multiply the remainder by 1010 and divide by 77: the tenths digit is 44.

  2. 10⋅2=20=7⋅2+610 \cdot 2 = 20 = 7 \cdot \resaltar{2} + \resaltar{6}

    With the remainder 22 we obtain the hundredths digit.

  3. 10⋅6=60=7⋅8+410 \cdot 6 = 60 = 7 \cdot \resaltar{8} + \resaltar{4}

    With the remainder 66, the thousandths digit.

  4. 10⋅4=40=7⋅5+510 \cdot 4 = 40 = 7 \cdot \resaltar{5} + \resaltar{5}

    With the remainder 44, the fourth digit.

  5. 10⋅5=50=7⋅7+110 \cdot 5 = 50 = 7 \cdot \resaltar{7} + \resaltar{1}

    With the remainder 55, the fifth.

  6. 10⋅1=10=7⋅1+310 \cdot 1 = 10 = 7 \cdot \resaltar{1} + \resaltar{3}

    With the remainder 11, the sixth; and the new remainder is 33, the same one we started with.

  7. 37=428571106+1106⋅37\frac{3}{7} = \frac{428571}{10^6} + \frac{1}{10^6} \cdot \resaltar{\frac{3}{7}}

    From here on the division repeats step by step: what remains to be divided, 37\frac{3}{7} multiplied by 1106\frac{1}{10^6}, is the same quotient shifted six places. The digits form a block that repeats without end.

The expansion of 37\frac{3}{7} is therefore 0.428571428571…, with period 428571. The example contains the whole lesson in germ: the digits come from the remainders, the remainders are less than the divisor and, as soon as one repeats, everything that follows repeats. The first fact worth securing is that the digits so obtained are genuine digits and that they approximate the fraction as closely as one wishes.

LemmaThe digits of long division

Let pp and qq be natural numbers, and let NN, r0r_0 and, for each natural number kk, ckc_k and rkr_k be the numbers given by the long division of pp by qq. Then each ckc_k is a digit, between 00 and 99, and for every natural number nn the following equality holds, in which the last summand is nonnegative and less than 110n\frac{1}{10^n}.

pq=N+∑k=1nck10k+rnq⋅10n\frac{p}{q} = N + \sum_{k = 1}^{n} \frac{c_k}{10^k} + \frac{r_n}{q \cdot 10^n}

The proof proceeds by induction on nn. The figure accompanies the argument with 37\frac{3}{7}: each new digit chooses one of the ten parts of the previous interval, which is magnified to show it.

Proof

  1. qck≤10rk−1<10q→0≤ck≤9q c_k \le 10 r_{k - 1} < 10q \rightarrow 0 \le c_k \le 9

    Each ckc_k is a digit: since the previous remainder is less than qq, the dividend 10rk−110 r_{k - 1} is less than 10q10q, and the quotient is less than 1010.

  2. pq=N+r0q\dato{base}{\frac{p}{q} = N + \frac{r_0}{q}}

    For n=0n = 0, with no digits, the equality is the first division with remainder, divided by qq.

  3. rnq⋅10n=10rnq⋅10n+1=qcn+1+rn+1q⋅10n+1=cn+110n+1+rn+1q⋅10n+1\dato{paso}{\frac{r_n}{q \cdot 10^n} = \frac{\resaltar{10 r_n}}{q \cdot 10^{n + 1}} = \frac{\resaltar{q c_{n + 1} + r_{n + 1}}}{q \cdot 10^{n + 1}} = \frac{c_{n + 1}}{10^{n + 1}} + \frac{r_{n + 1}}{q \cdot 10^{n + 1}}}

    Inductive step: the last summand is rewritten with the next division, 10rn=qcn+1+rn+110 r_n = q c_{n + 1} + r_{n + 1}, and split into two fractions.

  4. pq=N+∑k=1n+1ck10k+rn+1q⋅10n+1\frac{p}{q} = N + \sum_{k = 1}^{n + 1} \frac{c_k}{10^k} + \frac{r_{n + 1}}{q \cdot 10^{n + 1}}

    Substituting into the equality of order nn gives the one of order n+1n + 1; by induction, the equality holds for every nn.

  5. 0≤pq−Tn=rnq⋅10n<110n0 \le \frac{p}{q} - T_n = \frac{\resaltar{r_n}}{q \cdot 10^n} < \frac{1}{10^n}

    Since 0≤rn<q0 \le r_n < q, the last summand is nonnegative and less than 110n\frac{1}{10^n}: the fraction lies at a distance less than 110n\frac{1}{10^n} from its truncation of order nn, the number TnT_n formed by the integer part and the first nn digits.

The lemma says that pq\frac{p}{q} lies in the interval that begins at TnT_n and has length 110n\frac{1}{10^n}, with the left endpoint included and the right one excluded; these intervals, which will be studied in detail in the lesson on the real line, are written as follows:

Tn=N+∑k=1nck10k,pq∈[Tn,Tn+110n)T_n = N + \sum_{k = 1}^{n} \frac{c_k}{10^k}, \qquad \frac{p}{q} \in \ico{T_n}{T_n + \frac{1}{10^n}}