Continued Fractions

A continued fraction is a very neat thing. Here’s the idea: take a number where you don’t know its fractional form. Pick the nearest simple fraction 1/n that’s just a little bit too large. If you were looking at, say, 0.4, you’d take 1/2, because it’s a bit bigger. That gives you a first approximation of the number as a fraction. But it’s a little bit too big. If the value of a fraction is a little bit larger than you want it to be, that means that the denominator of that fraction is a little bit too small, and to fix it you need to add a correction to the denominator to make it a little bit bigger. A continued fraction works on that basic principle. Just keep adjusting the denominator; you approximate the correction to the ...

Get Good Math now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.