Calculate a Continued Fraction
Calculator for continued fractions up to a certain number of calculation steps. A continued fraction has the form
The calculation is done backwards:
kn = an + bn
kn-1 = an-1 + bn-1 / kn
kn-2 = an-2 + bn-2 / kn-1
k1 = a1 + b1 / k2
- 1+1/(1+1/(1+1/(...))), where a=1 and b=1, is the continued fraction expansion of the golden ratio.
- a=6 and b=pow(2*i-1#2) approaches the value of π+3. After 100 steps, the result is 6.1415923985336, the exact value with 13 decimal places is 6.1415926535898. This is reached after about 20000 steps.