Work out continued fraction instantly with clear inputs, formula shown and shareable results.
A continued fraction writes x as a₀ + 1/(a₁ + 1/(a₂ + …)) by repeatedly taking the integer part and inverting the remainder. Truncating gives the convergents, which are the best rational approximations for their denominator size.
Continued fraction
x = a₀ + 1/(a₁ + 1/(a₂ + 1/(a₃ + …)))
[3; 7, 15, 1, 292, …], whose second convergent 22/7 is the familiar approximation.
By the theory of best approximation, no fraction with a smaller denominator comes closer to x than the corresponding convergent.