KM 5433 Blog/Joe Colannino

A blog discussing knowledge management and library science issues.

Tuesday, February 08, 2011

Operations with Continued Fractions and Square Roots/ J. Colannino

Continued fractions represent a powerful and efficient method and codify an algorithm to generate the best rational approximations for any irrational number.  For example, 355/113 is a remarkably accurate rational approximation to pi (and easy to remember: 113355, then split the 3s and invert).  2721/1001 is a good approximation for e.  Likewise, 99/70 is the best rational approximation to the square root of two for any two digit denominator.  (1393/985 is the best for a three digit denominator).  Indeed, square roots are always expressible as periodic continued fractions.  For example, sqrt(2) = 1+1/(2+1/(2+1/(2+1/(2... and simple continued fractions (those with 1 in the numerator exclusively like the one just shown) always reduce to the best rational approximations.  In fact, square roots are always expressible in continued fraction form using unchanging numerators and denominators, e.g., sqrt(7) = 2+3/(4+3/(4+3/(4+....  I refer to these as facile continued fractions because they are easy to derive.  They can always be converted to simple continued fractions; e.g., sqrt(7) = 2+1/(1+1/(1+1/(1+1/(4+... using simple operations.  Since this blog doesn't permit the graphical features required, I've uploaded a document describing the procedure here.  If you want to have fun deriving the best rational approximations, I've uploaded an Excel spreadsheet here.  If you are interested in these kinds of things, my full LinkedIn profile has many more uploaded documents.

Labels: , ,