How Continued Fractions Produce Remarkably Accurate Approximations

Introduction

Why can a fraction such as 355/113 represent pi more accurately than many much simpler guesses? One answer lies in continued fractions: a way of writing a number as a whole part followed by a chain of fractions. Their structure reveals useful rational approximations, often with surprisingly small denominators. The method works for familiar constants as well as numbers encountered in calculation.

What Is a Continued Fraction?

A continued fraction expresses a number through repeated division. Instead of writing a decimal approximation, it records a whole number, then a fraction whose denominator contains another whole number, and so on. A simple continued fraction has the form:

x = a0 + 1/(a1 + 1/(a2 + 1/(a3 + …)))

Here, a0 is a whole number, and the later terms a1, a2, and so on are positive whole numbers. The expression nests: each new term is part of the denominator of the fraction before it.

For example, the continued fraction [1; 2, 2, 2, …] represents the square root of 2. The semicolon separates the first term from the rest. The endless repetition means the number is irrational: its decimal expansion does not end or settle into a repeating pattern.

A finite continued fraction represents a rational number exactly. For instance, [1; 2, 2] equals 1 + 1/(2 + 1/2), which simplifies to 7/5. Truncating an infinite continued fraction therefore gives a sequence of rational numbers that can be used to approximate the original number.

How the Expansion Is Found

The process begins by taking the whole-number part of a number. For a number greater than 1, that is its integer part. The remaining fraction is inverted, and the process is repeated. Each step extracts another whole number from what remains.

Take the square root of 2, approximately 1.4142. Its whole-number part is 1. Subtracting 1 leaves about 0.4142. Inverting that remainder gives about 2.4142, whose whole-number part is 2. Repeating the operation continues to produce 2 each time, giving [1; 2, 2, 2, …].

This resembles the Euclidean algorithm, the familiar method for finding the greatest common divisor of two whole numbers. The Euclidean algorithm repeatedly divides and keeps the remainders. Continued fractions apply a related process to a number and the fractional parts left after each division.

For irrational numbers, the process does not terminate. For rational numbers, it eventually does, because the division remainders ultimately reach zero. The exact expansion can be computed using fractions and integer arithmetic, even when a decimal representation would be inconvenient.

Turning Terms into Rational Approximations

Each time a continued fraction is cut off after a term, the result is called a convergent. Convergents are not arbitrary fractions: they reflect the step-by-step structure of the expansion. For the square root of 2, the first few are:

[1] = 1/1
[1; 2] = 3/2
[1; 2, 2] = 7/5
[1; 2, 2, 2] = 17/12
[1; 2, 2, 2, 2] = 41/29

These values alternate below and above the square root of 2. The first approximation, 1, is rough; 3/2 is a little high; 7/5 is low; and each later convergent gets closer. Their denominators grow, but the accuracy generally improves rapidly.

Convergents can be calculated without repeatedly simplifying a large nested expression. If the continued-fraction terms are a0, a1, a2, and so on, let pn/qn be the convergent through an. Starting with p−2 = 0, p−1 = 1, q−2 = 1, and q−1 = 0, use:

pn = anpn−1 + pn−2
qn = anqn−1 + qn−2

Each new numerator and denominator is built from the two previous ones. This recurrence is a practical way to generate approximations using only whole-number calculations.

Why the Approximations Can Be So Accurate

The key is that the continued fraction tracks how a number differs from successive whole numbers. Its terms describe the sizes of those differences after they have been inverted. A convergent uses this information in a way that often places a rational number exceptionally close to the original, rather than merely matching a few decimal digits by chance.

For an irrational number, each convergent p/q satisfies the standard bound |x − p/q| < 1/q². This says its error is smaller than the reciprocal of the square of its denominator. It is a useful general guarantee, though the actual error may be much smaller. The bound does not mean every fraction with denominator q has this property.

The sequence also has an alternating pattern: successive convergents lie on opposite sides of the number. This comes from the arithmetic of the recurrence. Neighboring convergents pn/qn and pn−1/qn−1 obey pnqn−1 − pn−1qn = ±1. Their difference is therefore exactly 1/(qnqn−1), a small gap when the denominators are large.

Large terms in the continued fraction can lead to especially strong approximations. Such a term makes the next denominator much larger than the previous one, while the new convergent can still land very close to the value being represented. The size of the terms therefore helps explain why some numbers have strikingly good rational approximations.

Pi and the Fraction 355/113

The number pi has a continued fraction that begins [3; 7, 15, 1, 292, …]. Truncating after the first term gives 3/1; after the next, 22/7; and after the next two, 333/106 and 355/113. The fraction 355/113 is about 3.14159292, while pi begins 3.14159265. The difference is roughly 0.00000027.

This is a remarkably close match for a denominator of only 113. It does not make 355/113 equal to pi: pi is irrational, so no ratio of whole numbers represents it exactly. Nor is 355/113 the next convergent after 333/106 in a mysterious leap; it follows directly from including the term 1 in pi’s continued fraction.

The next term, 292, is unusually large. Including it produces a convergent with a much larger denominator and an even smaller error. This illustrates the role of partial quotients: a large term can signal that a particularly strong approximation is available at that stage.

Why This Is More Than a Decimal Shortcut

Decimals are useful when a fixed number of digits is enough, but they do not always show the simplest fraction close to a value. For example, a decimal approximation may suggest thousands of digits of precision without revealing whether a much smaller numerator and denominator provide a convenient estimate.

Continued fractions are useful when the size of the denominator matters. If a quantity must be represented by a ratio of whole numbers, a convergent can offer a good balance between simplicity and accuracy. The relevant choice depends on the task: an approximation with a larger denominator may be more accurate, but it may also be less practical.

The same mathematics appears in number theory, numerical computation, and problems involving ratios. Continued fractions can help identify rational numbers close to a measured or calculated value, study how well numbers can be approximated, and analyze algorithms based on division. They are a mathematical tool, not a promise that every real-world measurement is exact enough to justify a highly precise fraction.

What Continued Fractions Do Not Guarantee

Continued fractions provide a systematic route to excellent approximations, but the phrase “best approximation” needs care. Convergents have strong optimality properties, especially when comparing errors in relation to denominators. However, the best choice under a particular practical rule may not be the latest convergent. A task might impose a maximum denominator, require a specific tolerance, or assign different costs to different errors.

There are also fractions between consecutive convergents, sometimes called intermediate fractions or semiconvergents, that can be useful under certain limits. Thus, if a problem asks for the closest fraction with a denominator below a particular cap, it is worth checking the exact constraint rather than assuming the answer is always the final convergent already calculated.

Finally, numerical accuracy and measurement accuracy are different. If an input comes from a physical measurement, its uncertainty may be much larger than the mathematical error of a fraction chosen to approximate it. A long string of calculated digits cannot remove uncertainty already present in the original data.

Conclusion

Continued fractions reveal the structure hidden behind a number’s successive remainders. Truncating the expansion produces convergents, rational approximations with well-understood accuracy and often remarkably small errors. Examples such as 355/113 for pi show the method’s appeal, while the square root of 2 demonstrates its repeating pattern. Their real strength is a principled balance between closeness and simplicity.