Article 3QS2S 10 best rational approximations for pi

10 best rational approximations for pi

by
John
from John D. Cook on (#3QS2S)

It's easy to create rational approximations for I. Every time you write down I to a few decimal places, that's a rational approximation. For example, 3.14 = 314/100. But that's not the best approximation.

Think of the denominator of your fraction as something you have to buy. If you have enough budget to buy a three-digit denominator, then you're better off buying 355/113 rather than 314/100 because the former is more accurate. The approximation 355/113 is accurate to 6 decimal places, whereas 314/100 is only accurate to 2 decimal places.

There's a way to find the most economical rational approximations to I, or any other irrational number, using continued fractions. If you're interested in details, see the links below.

Here are the 10 best rational approximations to I, found via continued fractions.

 |----------------+----------| | Fraction | Decimals | |----------------+----------| | 3 | 0.8 | | 22/7 | 2.9 | | 333/106 | 4.1 | | 355/113 | 6.6 | | 103993/33102 | 9.2 | | 104348/33215 | 9.5 | | 208341/66317 | 9.9 | | 312689/99532 | 10.5 | | 833719/265381 | 11.1 | | 1146408/364913 | 11.8 | |----------------+----------|

If you only want to know the number of correct decimal places, ignore the fractional parts of the numbers in the Decimals column above. For example, 22/7 gives two correct decimal places. But it almost gives three. (Technically, the Decimals column gives the -log10 of the absolute error.)

In case you're curious, here's a plot of the absolute errors on a log scale.

pi_frac_errors2.svg

Related postsoAic7-IV5SU
External Content
Source RSS or Atom Feed
Feed Location http://feeds.feedburner.com/TheEndeavour?format=xml
Feed Title John D. Cook
Feed Link https://www.johndcook.com/blog
Reply 0 comments