The proof of Proposition 5.1.14 leads to an algorithm for computing the continued fraction of a rational number.
A nonzero rational number can be represented in exactly two ways; for example, (see Exercise 5.2).