# Is π unusually close to 7920/2521?

EDIT: One can look at a particular type of approximation to $\pi$ based on comparing radians to degrees. If you try to approximate $\pi$ by fractions of the form $180n/(360k+1)$, you can find that $\pi \approx \frac{7920}{2521}$. And this is pretty close: the continued fraction expansion of $\pi$ is $(3; 7,15,1,292,\ldots)$, and the continued fraction for the approximation is $(3;7,16,4,2,2)$.

However, if you switched out 360 for dividing the circle into $r$ pieces, you are looking for approximations of $\pi$ of the form $rn / 2(rk+1)$ as $n$ and $k$ vary.

• Is this particular approximation for $\pi$ you get, based on 360 degrees, unusually close for the size ($n=44$, $k=7$) present?

I feel like I have to tell a story to justify this question, because otherwise it's a little weird -- please bear with me.

Some time (a long time) ago, I was in a programming class for grade-school kids and we were learning to do some basic graphics. We were drawing fireworks, and encountered the problem that the "bursts" seemed to have their points going off in random directions. You can guess why: the standard library functions for sin and cos were expecting radians instead of degrees.

Our teacher told us that there was some conversion factor, but didn't remember it. So I set the computer on a loop to draw lines out from the center of a circle, to see if I could figure out what the conversion factor was. It animated drawing lines at angles of 1 radian, 2 radians, 3 radians, ... 360 radians, and then cleared the screen and started over drawing lines at 2 radians, 4 radians, 6 radians ... and then again drawing at 3 radians, 6 radians, 9 radians, ...

Of course, this was kind of misguided, but it was interesting to watch for a few minutes. (If I was more motivated, I would try and animate it again, but those skills are very rusty.) And then, at the multiples of 44 radians, it suddenly worked: it visibly drew a nice, sweeping path all the way around the circle in one pass.

I tweaked around with it a little and found that while (cos(360*44),sin(360*44)) were pretty close to (1,0), a better approximation was had if you used about 43.99975 instead. I still remember this number all this time later.

Now I know radians a little better, and abstractly know that this is because $2\pi(7 + \tfrac{1}{360})$ is very close to the integer 44. Another way to say this is by trying to find approximations as I stated above. As I learned more math I understood this less and less, because the answer seems much closer than it deserves to be based on how small the numbers in question are.

• I don't know. Is it ‘unusual’ that all ‘famous’ rationals are ‘close’ to multiples of $\displaystyle\frac17$ ? E.g., $\pi\simeq\displaystyle\frac{22}7$ , $e\simeq\displaystyle\frac{19}7$ , $\gamma\simeq\displaystyle\frac47$ , $\sqrt2\simeq\displaystyle\frac{10}7$ , $\sqrt3\simeq\displaystyle\frac{12}7$ , $\displaystyle\frac e\pi\simeq\displaystyle\frac67$ , $e^\pi\simeq\displaystyle\frac{162}7$ , $\pi^2\simeq\displaystyle\frac{69}7$ ? Or that $\gamma\simeq\displaystyle\frac1{\sqrt3}$ ? – Lucian Dec 7 '13 at 1:44
• One of the facts about continued fractions is that there give the closest approximations with the smaller determinants. Between $\frac{355}{113}=[3;7,15,1]$ and $\frac{103993}{33102}=[3;7,15,1,292]$ there is no $\frac{p}{q}$ closer to $\pi$ than these two fractions for $q<33102$. – Carlos Eugenio Thompson Pinzón Dec 7 '13 at 1:52
• @Lucian : i guess you mean irrationals.. – user87543 Dec 7 '13 at 2:24
• @CarlosEugenioThompsonPinzón, It's unclear what you mean by “$\frac{p}{q}$ closer to $\pi$ than these two fractions,” but the sequence of "best approximations" is not quite the sequence of continued fraction approximants. Some in-between “bests” can occur before an approximant ending in a $1$. In the case at hand, the sequence of best approximations is $[3;7,15,1],[3;7,15,1,146],[3;7,15,1,147],[3;7,15,1,148]\dots[3;7,15,1,292],[3;7,15,1,292,1],[3;7,15,1,292,1,1],[3;7,15,1,292,1,1,1],[3;7,15,1,292,1,1,1,2]\dots$ – Steve Kass Dec 7 '13 at 3:00
• By the way, my comment should have said “Some in-between ‘bests’ can occur before an approximant ending in a number bigger than 1.” – Steve Kass Dec 7 '13 at 16:46

This isn't exceptionally good compared to the partial convergents of the continued fraction expansion. Terminating the continued fraction for $\pi$ right before the $292$ gives $\frac{355}{113}= \textbf{3.141592}9203\ldots$, which gets $6$ digits after the decimal place right, while your fraction only gets $3$ digits after the decimal place correct even though it has larger numerator and denominator.

Your approximation is actually not as close as you think. You can do better with even smaller numbers. For instance,$$\dfrac{355}{113} \approx 3.1415929203$$ which matches with the first $7$ digits of $\pi \approx 3.1415926535$. Look here for better rational approximation to $\pi$.

EDIT

Below are the first $41$ best rational approximations to $\pi$ of the form $\dfrac{180p}{360q+1}$. \begin{array}{|c|c|c|} \hline p & q & \text{error} = \left \vert \pi - \dfrac{180p}{360q+1} \right \vert\\ \hline 6 & 1 & 1.499029e-01 \\ 12 & 2 & 1.457535e-01 \\ 18 & 3 & 1.443679e-01 \\ 19 & 3 & 2.214463e-02 \\ 25 & 4 & 1.876129e-02 \\ 44 & 7 & 1.781845e-05 \\ 754 & 120 & 1.290995e-06 \\ 1464 & 233 & 7.942709e-07 \\ 2174 & 346 & 6.219941e-07 \\ 2884 & 459 & 5.345415e-07 \\ 3594 & 572 & 4.816417e-07 \\ 4304 & 685 & 4.461949e-07 \\ 5014 & 798 & 4.207869e-07 \\ 5724 & 911 & 4.016820e-07 \\ 6434 & 1024 & 3.867937e-07 \\ 7144 & 1137 & 3.748646e-07 \\ 7854 & 1250 & 3.650924e-07 \\ 8564 & 1363 & 3.569405e-07 \\ 9274 & 1476 & 3.500367e-07 \\ 9984 & 1589 & 3.441149e-07 \\ 10694 & 1702 & 3.389794e-07 \\ 11404 & 1815 & 3.344834e-07 \\ 12114 & 1928 & 3.305144e-07 \\ 12824 & 2041 & 3.269848e-07 \\ 13534 & 2154 & 3.238256e-07 \\ 14244 & 2267 & 3.209814e-07 \\ 14954 & 2380 & 3.184072e-07 \\ 15664 & 2493 & 3.160664e-07 \\ 16374 & 2606 & 3.139286e-07 \\ 17084 & 2719 & 3.119685e-07 \\ 17794 & 2832 & 3.101648e-07 \\ 18504 & 2945 & 3.084995e-07 \\ 19214 & 3058 & 3.069573e-07 \\ 19924 & 3171 & 3.055250e-07 \\ 20634 & 3284 & 3.041912e-07 \\ 21344 & 3397 & 3.029462e-07 \\ 22054 & 3510 & 3.017814e-07 \\ 22764 & 3623 & 3.006892e-07 \\ 23474 & 3736 & 2.996631e-07 \\ 24184 & 3849 & 2.986973e-07 \\ 24894 & 3962 & 2.977865e-07 \\ \hline \end{array}

Here is the MATLAB code that produces the result:

Here is the MATLAB code:

min     =   1;
fid     =   fopen('output.txt','w');
for q=1:4000
for p=floor(6.1*q):1:6.4*q
error   =   abs(pi-180*p/(360*q+1));
if(error<min)
fprintf(fid, '%i & %i & %d \\\\\n', p,q,error);
min =   error;
end
end
end

• I think he means "unusually good for the conditions above" - that it is of the form $$\frac{180p}{360q+1}$$ – Thomas Andrews Dec 7 '13 at 1:55
• @Cowardly down-voter: Leave a comment when you down-vote. Don't stay as a coward. – user17762 Dec 7 '13 at 2:39
• This is a really interesting table. I find it interesting that the next approximation after 44 comes so much later, and then that the error is hovering within seven significant digits for so long. (What method are you using to pick out "best" approximations?) – Tyler Lawson Dec 7 '13 at 2:43
• @TylerLawson Yes, if you look at it, it takes a long time to reduce the error from 7e-7 to 2e-7. I have added the MATLAB code to the answer. – user17762 Dec 7 '13 at 2:44

If we look at the continued fraction of the expression $\frac{\pi}{180}$, we get:

$$\frac\pi{180} = [0,57,3,2,1,1,1,2,40,\dots]$$

And:

$$\frac{44}{2521} = [0,57,3,2,1,1,1,1]$$

So that's a pretty good match.

It is between two terms of the continued fraction expansion of $\frac\pi{180}$, in particular.

Now, whether this is surprisingly good in any way, given your conditions, is hard to say. I'd try random real numbers to see how often you get similarly good approximations of this form.

I don't know that there is anything known about deep reasons for good rational approximations for $\pi$ in any form. Certainly, the reasons we use 360 degrees in a circle is not due to any "deep" significance of the number 360, except that it is divisible into lots of different values, so it would be a remarkably deep result if we found something particular about $360$ and $\pi$.

• I've also heard that we use $360$ degrees in a circle because it is close to $365$ days in a year, and maybe even that it was once thought that there were exactly $360$ days in a year. Someone please correct me if I'm mistaken. – Dylan Yott Dec 7 '13 at 2:22

If $\left|\frac pq-r\right|\lt\frac1{2q^2}$, then $\frac pq$ is a convergent for the continued fraction for $r\not\in\mathbb{Q}$.

If $\frac pq$ is a convergent for the continued fraction for $r\not\in\mathbb{Q}$, then $\left|\frac pq-r\right|\lt\frac1{q^2}$

Thus, I would call $\frac pq$ is a "good" approximation for $r$ if $\left|\frac pq-r\right|\,q^2\lt1$. In this case, $$\left|\frac {7920}{2521}-\pi\right|\,2521^2\gt113$$ so I wouldn't say that this is a particularly good approximation for $\pi$.

• I think he means unusually or unexpectedly good given the condition of the form. – Thomas Andrews Dec 7 '13 at 1:55

The general form of your approximation is better expressed as,

$$\frac{1}{\pi} \approx \frac{360k+1}{180n} = \frac{2k}{n}+\frac{1}{180n}$$

Your example has $k=7,\, n=44$, hence,

$$\frac{1}{\pi} \approx \frac{2521}{7920} = \color{red}{\frac{7}{22}} + \frac{1}{22\cdot2\cdot180}$$

Of course, the approximation $\pi \approx 22/7$ is well-known. Similarly, if you searched higher, you'd find,

$$\frac{1}{\pi} \approx \frac{11776861}{36998100} = \color{red}{\frac{113}{355}} + \frac{1}{355\cdot579\cdot180}$$

and so on.

• Ah, great! So you start with the continued fraction term and try to get the error as small as possible. Nice recasting. – Tyler Lawson Dec 7 '13 at 2:41
• Yes, however, based on your original approximation, I gave the second term two constraints: 1st, it is a unit fraction; 2nd, its denominator is divisible by the denominator of the first term. Without these constraints, one can use smaller numbers. – Tito Piezas III Dec 7 '13 at 2:50