# Notation
## Generalized form

A continued fraction is an expression of the form
    $a_{0}+{\cfrac {b_{1}}{a_{1}+{\cfrac {b_{2}}{a_{2}+{\cfrac {b_{3}}{a_{3}+{_{\ddots }}}}}}}}$
where :
* $a_{n}$ and $b_{n}$ are either integers, rational numbers, real numbers, or complex numbers.
* $a_{0}$, $a_{1}$ etc., are called the coefficients or terms of the continued fraction
Variants or types :
* If $b_{n}=1$ for all $n$ the expression is called a simple continued fraction.
* If the expression contains a finite number of terms, it is called a finite continued fraction.
* If the expression contains an infinite number of terms, it is called an infinite continued fraction.
Thus, all of the following illustrate valid finite simple continued fractions:
Examples of finite simple continued fractions :
| Formula | Numeric | Remarks |
| $\ a_{0}$ | $\ 2$ | All integers are a degenerate case |
| $\ a_{0}+{\cfrac {1}{a_{1}}}$ | $\ 2+{\cfrac {1}{3}}$ | Simplest possible fractional form |
| $\ a_{0}+{\cfrac {1}{a_{1}+{\cfrac {1}{a_{2}}}}}$ | $\ -3+{\cfrac {1}{2+{\cfrac {1}{18}}}}$ | First integer may be negative |
| $\ a_{0}+{\cfrac {1}{a_{1}+{\cfrac {1}{a_{2}+{\cfrac {1}{a_{3}}}}}}}$ | $\ {\cfrac {1}{15+{\cfrac {1}{1+{\cfrac {1}{102}}}}}}$ | First integer may be zero |

## simple form

It is generally assumed that the numerator b of all of the fractions is 1. Such form is called a simple or regular continued fraction, or said to be in canonical form.
If real number is a fraction ( x < 1), then $a_{0}$ is zero and the notation is simplified:

### Finite

Notation :
Every finite continued fraction represents a rational number ${\frac {p}{q}}$:
If positive real fraction x is rational number, there are exactly two different continued fraction expansions:
where
* $a_{n}>1$
* Usually the first, shorter form is chosen as the canonical representation
* second form is one longer then the first

### Infinite

Notation :
Every infinite continued fraction is irrational number $\alpha$ :
The rational number ${\frac {p_{n}}{q_{n}}}$ obtained by limited number of terms in a continued fraction is called a n-th convergent
because sequence of rational numbers ${\frac {p_{n}}{q_{n}}}$ converges to irrational number $\alpha$
In other words irrational number $\alpha$ is the limit of convergent sequence.
Nominator p and denominator q can be found using the relevant recursive relation:
    $p_{n}=a_{n}p_{n-1}+p_{n-2}$
    $q_{n}=a_{n}q_{n-1}+q_{n-2}$
so
${\frac {p_{n}}{q_{n}}}={\frac {a_{n}p_{n-1}+p_{n-2}}{a_{n}q_{n-1}+q_{n-2}}}$
Key words :
* the sequence of continued fraction convergents ${\frac {p_{n}}{q_{n}}}$ of irrational number $\alpha$
* sequence of the convergents
* continued fraction expansion
* rational aproximation of irrational number
* a best rational approximation to a real number r by rational number p/q

# How to use it in computer programs

* decimal number ( real or rational) to continued fraction
** abacus CAS
** Maxima CAS : cf (expr) Converts expr into a continued fraction.

## Maxima CAS

In Maxima CAS one have cf and float(cfdisrep)
To compute n-th convergent:

# Examples

* number theory
** aproximation of irrational number, see rotation number in case of Siegel disk
* continued fractions based functions over the complex plan
* " a continued fraction may be regarded as a sequence of Möbius maps" Alan F. Beardone

# Help

* math.stackexchange questions tagged continued-fractions
* mathoverflow questions tagged continued-fractions
* Continued Fractions - Professor John Barrow
* Chaos in Numberland: The secret life of continued fractions By John D. Barrow

# See also

* binary expansion ( representation of real number)
* fractional iteration
* dynamics of continued fractions
** Dynamics of continued fractions and kneading sequences of unimodal maps by Claudio Bonanno, Carlo Carminati, Stefano Isola, Giulio Tiozzo

# References

* ↑ Continued Fractions and Dynamics by Stefano Isola
* ↑ Darren C. Collins, Continued Fractions, MIT Undergraduate Journal of Mathematics,
* ↑ continued fractions based functions over the complex plane
* ↑ continued-fractions-with-applications by L. Lorentzen H. Waadeland
* ↑ Continued Fractions, Discrete Groups and Complex Dynamics by Alan F. Beardone. Beardone, A.F. Comput. Methods Funct. Theory (2001) 1: 535. https://doi.org/10.1007/BF03321006
* CALENDARS AND CONTINUOUS FRACTIONS by Anne Broise ( in fr.)
* Dynamics of continued fractions and kneading sequences of unimodal maps by Claudio Bonanno, Carlo Carminati, Stefano Isola, Giulio Tiozzo