A continued fraction expresses a real number as . Each i is an integer, and truncating the expansion yields excellent rational approximations. Famous constants like and have intriguing patterns in their continued fractions.
Provide a decimal number and a maximum number of terms. The algorithm repeatedly takes the integer part, subtracts it, and then inverts the fractional remainder until the desired depth or an exact value is reached. The resulting sequence describes the continued fraction in standard bracket notation.
Continued fractions reveal number-theoretic properties and often converge faster than simple decimals. They are central in Diophantine approximation, where we seek fractions close to real numbers. Try exploring irrational numbers to see long, non-repeating patterns versus short expansions for rationals.
Approximate the value of a double integral over a rectangular region.
Approximate solutions to first-order differential equations using Euler's method.
Construct a cubic Hermite interpolant through two points with specified derivatives.