# Definition:Value of Continued Fraction

This page has been identified as a candidate for refactoring of medium complexity.Until this has been finished, please leave
`{{Refactor}}` in the code.
Because of the underlying complexity of the work needed, it is recommended that you do not embark on a refactoring task until you have become familiar with the structural nature of pages of $\mathsf{Pr} \infty \mathsf{fWiki}$.To discuss this page in more detail, feel free to use the talk page.When this work has been completed, you may remove this instance of `{{Refactor}}` from the code. |

Informally, the **value** of a finite continued fraction is the number which results from calculating out the fractions.

Note that formally the continued fraction and its **value** are considered to be distinct; a continued fraction is its sequence of partial quotients.

However, this is a nicety of interpretation and may usually be ignored — $x = \left[{a_1, a_2, a_3, \ldots, a_n}\right]$ is often used to mean that $x$ is the **value** of the given continued fraction.

## Definition

Let $F$ be a field, such as the field of real numbers $\R$.

### Finite Continued Fraction

Let $n \ge 0$ be a natural number.

Let $\sequence {a_k}_{0 \mathop \le k \mathop \le n}$ be a finite continued fraction in $F$.

Let $\overline F = F \cup \set \infty$ be extended by infinity.

### Definition 1

The **value** $\sqbrk {a_0, a_1, \ldots, a_n} \in F \cup \set \infty$ is the right iteration of the binary operation:

- $\sqbrk {\cdot, \cdot}: F \times \overline F \to \overline F$:
- $\sqbrk {a, b} = a + \dfrac 1 b$.

That is, it is recursively defined as:

- $\sqbrk {a_0, \ldots, a_n} = \begin{cases} a_0 & : n = 0 \\ a_0 + \dfrac 1 {\sqbrk {a_1, \ldots, a_n} } & : n > 0 \\ \end{cases}$

or as:

- $\sqbrk {a_0, \ldots, a_n} = \begin{cases} a_0 & : n = 0 \\ \sqbrk {a_0, \ldots, a_{n - 2}, a_{n - 1} + \dfrac 1 {a_n} } & : n > 0 \\ \end{cases}$

### Definition 2

Let the matrix product:

- $\begin{pmatrix} a_0 & 1 \\ 1 & 0 \end{pmatrix} \cdots \begin{pmatrix} a_n & 1 \\ 1 & 0 \end{pmatrix} = \begin{pmatrix} x_{11} & x_{12} \\ x_{21} & x_{22} \end{pmatrix}$

The **value** of the finite continued fraction is $\dfrac{x_{11} }{x_{21} }$

### Infinite Continued Fraction

Let $\struct {F, \norm {\,\cdot\,} }$ be a valued field.

Let $C = \sequence {a_n}_{n \mathop \ge 0}$ be a infinite continued fraction in $F$.

Then $C$ **converges** to its **value** $x \in F$ if and only if the following hold:

- For all natural numbers $n \in \N_{\ge 0}$, the $n$th denominator is nonzero
- The sequence of convergents $\sequence {C_n}_{n \mathop \ge 0}$ converges to $x$.

## Also denoted as

The **value** of a continued fraction $C$ can also be denoted $\operatorname{Val}(C)$.