Tool to compute continued fractions. A continued fraction is the representation of a number N in a form of a series of integers (a0, a1, ..., an) such as N = (a0+1/(a1+1/(a2+1/(...1/(an))).

Continued Fractions - dCode

Tag(s) : Series

dCode is free and its tools are a valuable help in games, maths, geocaching, puzzles and problems to solve every day!

A suggestion ? a feedback ? a bug ? an idea ? *Write to dCode*!

Continued fraction expansion is close to algorithm of euclidean division, as for PGCD.

__Example:__ If the fraction approximating pi is $ 355/113 = 3.14159292035... $

$$ 355 = 3 \times 113 + 16 \\ 113 = 7 \times 16 + 1 \\ 16 = 16 \times 1 + 0 $$

The continued fraction is `[3,7,16]`

Some developments of continuous fractions are infinite

To find the corresponding fraction, use the irreducible fraction tool.

Calculate an approximate value of the root (approximation as accurate as possible) and dCode will provide the corresponding continuous fraction.

The easiest way is to use `cfrac`: $$ e=2+\cfrac{1}{1+\cfrac{1}{2+\cfrac{1}{ 1+\cfrac{1}{1+\cfrac{1}{4+\cfrac{1}{1+\cfrac{1}{1+\cfrac{1}{6+\cdots}}}}}}}} $$

But the shortest way is to write $$ e = [2 ; 1, 2, 1, 1, 4, 1, 1, 6, \cdots] $$

Most known continued fractions are:

— Square Root of 2: $ \sqrt{2} = [1;2,2,2,2,2,\cdots] $

— Golden Ratio: $ \Phi = [1;1,1,1,1,1,\cdots] $

dCode retains ownership of the "Continued Fractions" source code. Except explicit open source licence (indicated Creative Commons / free), the "Continued Fractions" algorithm, the applet or snippet (converter, solver, encryption / decryption, encoding / decoding, ciphering / deciphering, breaker, translator), or the "Continued Fractions" functions (calculate, convert, solve, decrypt / encrypt, decipher / cipher, decode / encode, translate) written in any informatic language (Python, Java, PHP, C#, Javascript, Matlab, etc.) and all data download, script, or API access for "Continued Fractions" are not public, same for offline use on PC, mobile, tablet, iPhone or Android app!

Reminder : dCode is free to use.

The copy-paste of the page "Continued Fractions" or any of its results, is allowed (even for commercial purposes) as long as you credit dCode!

Exporting results as a .csv or .txt file is free by clicking on the *export* icon

Cite as source (bibliography):

*Continued Fractions* on dCode.fr [online website], retrieved on 2024-06-15,

continued,fraction,approximation,pade,reciprocal,sequence,convergent,representation

https://www.dcode.fr/continued-fractions

© 2024 dCode — El 'kit de herramientas' definitivo para resolver todos los juegos/acertijos/geocaching/CTF.

Feedback