MATHEMATICS

Sabtu, 27 Agustus 2011

Continued fractions (2)

A finite continued fraction (FCF) is a map $$f: \mathbf{N}^m \rightarrow \mathbf{Q} $$ $$\left( a_1, a_2, \cdots a_m \right) \mapsto a_1 + \frac{1}{a_2 + \frac{1}{\ddots + \frac{1}{a_m}}}$$

Continued fractions are calculated by creating a table of convergents, as follows:






$k$$a_k$$p_k$$q_k$$C_k$
$-1$$0$
$0$$1$$0$
$1$$a_1$$a_1 \cdot p_0 + p_{-1}$$1$$\frac{p_1}{q_1}$
$k$$a_k$$a_k \cdot p_{k-1} + p_{k-2}$$a_k \cdot q_{k-1} + q_{k-2}$$\frac{p_k}{q_k}$


The table consists of $m+2$ rows. The value of the FCF is $\frac{p_m}{q_m}$.

To be continued.

See also: Continued fractions (1)

Tidak ada komentar:

Posting Komentar