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))).

dCode is free and its tools are a valuable help in games, puzzles and problems to solve every day! You have a problem, an idea for a project, a specific need and dCode can not (yet) help you? You need custom development? Contact-me!

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))).

Answers to Questions

How to calculate a continued fraction?

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

Example: If the fraction 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]

How to calculate the continued fraction of a root?

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

How to write a continued fraction in LaTex?

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}}}}}}}} $$

Ask a new question

Source code

dCode retains ownership of the source code of the script Continued Fractions online. Except explicit open source licence (indicated Creative Commons / free), any algorithm, applet, snippet, software (converter, solver, encryption / decryption, encoding / decoding, ciphering / deciphering, translator), or any function (convert, solve, decrypt, encrypt, decipher, cipher, decode, code, translate) written in any informatic langauge (PHP, Java, C#, Python, Javascript, Matlab, etc.) which dCode owns rights will not be given for free. So if you need to download the online Continued Fractions script for offline use, check contact page !

dCode uses cookies to customize the site content, analyze user behavior and adapt dCode to your use. Some data is stored and collected for advertising purposes and may be shared with our partners. OK