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 $(\lfloor \alpha_n \rfloor)_{n\geq0}$ where $\alpha_n$ is recursively defined as:
 * $\alpha_n = \displaystyle \begin{cases} x & : n = 0 \\

\dfrac 1 {\{\alpha_{n-1}\}} & : n \geq 1 \end{cases}$ where:
 * $\lfloor \cdot \rfloor$ is the floor function
 * $\{ \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