Definition:Continued Fraction/Expansion of Real Number

Irrational Number
Let $x$ be an irrational number.

The continued fraction expansion of $x$ is the simple continued fraction $\paren {\floor {\alpha_n} }_{n \ge 0}$ where $\alpha_n$ is recursively defined as:
 * $\alpha_n = \displaystyle \begin{cases} x & : n = 0 \\

\dfrac 1 {\fractpart {\alpha_{n - 1} } } & : n \ge 1 \end{cases}$ where:
 * $\floor {\, \cdot \,}$ is the floor function
 * $\fractpart {\, \cdot \,}$ is the fractional part function.

Rational Number
Let $x$ be a rational number.

The continued fraction expansion of $x$ is found using the Euclidean Algorithm.

Also see

 * Continued Fraction Algorithm
 * Definition:Simple Continued Fraction
 * Correspondence between Rational Numbers and Simple Finite Continued Fractions
 * Correspondence between Irrational Numbers and Simple Infinite Continued Fractions

Examples

 * Continued Fraction Expansion/Example
 * Continued Fraction Expansion of Irrational Square Root/Example

Generalizations

 * Definition:Continued Fraction Expansion of Laurent Series
 * Definition:p-Adic Ruban Continued Fraction Expansion