This is documentation for Mathematica 3, which was
based on an earlier version of the Wolfram Language.
 NumberTheory`ContinuedFractions` The decimal expansion is the most common way to represent a real number. This package supports two alternative representations: the continued fraction expansion of a real number and the arbitrary base expansion of a rational number in terms of preperiodic and periodic parts. The continued fraction expansion of a real number is a representation of the form The integers are called the partial quotients. Rational numbers have a finite number of partial quotients, while irrational numbers have an infinite continued fraction expansion. Continued fractions also find application in the factorization of integers (see, for example, Chapter 10 in [Rosen]). If the number has partial quotients , the rational number formed by considering the first partial quotients , is called the convergent of . The convergents of a number provide, in a certain sense, the best rational approximation with a small denominator to the given real number. Continued fractions. This loads the package. In[1]:= <