# Pi

**URL:** <https://boards.straightdope.com/t/pi/791924>\
**Category:** Factual Questions\
**Created:** [July 23, 2017, 8:47am UTC](https://boards.straightdope.com/t/pi/791924 "2017-07-23T08:47:09Z")\
**Posts on this page:** 14\
**Page:** 12

<div class="post-metadata">

**Author:** ![Jimpy](https://avatars.discourse-cdn.com/v4/letter/j/c68b51/32.png) [@Jimpy](https://boards.straightdope.com/u/Jimpy)\
**Post date:** [July 29, 2017, 1:59am UTC](https://boards.straightdope.com/t/pi/791924/221 "2017-07-29T01:59:08Z")

</div>

797 decimal places pi is equal to 3.14159265358979323846264338327950288419716939937510582097494459230781640628620899862803482534211706798214808651328230664709384460955058223172535940812848111745028410270193852110555964462294895493038196442881097566593344612847564823378678316527120190914564856692346034861045432664821339360726024914127372458700660631558817488152092096282925409171536436789259036001133053054882046652138414695194151160943305727036575959195309218611738193261179310511854807446237996274956735188575272489122793818301194912983367336244065664308602139494639522473719070217986094370277053921717629317675238467481846766940513200056812714526356082778577134275778960917363717872146844090122495343014654958537105079227968925892354201995611212902196086403441815981362977477130996051870721134999999

So you could round that to 3.14159265358979323846264338327950288419716939937510582097494459230781640628608998628034825342117067982148086513282306647093844609550582231725359408128481117450284102701938521105559644622948954930381964428810975665933446128475648233786783165271201909145648566923460348610454326648213393607260249141273724587006606315588174881520920962829254091715364367892590360011330530548820466521384146951941511609433057270365759591953092186117381932611793105118548074462379962749567351885752724891227938183011949129833673362440656643086021394946395224737190 7021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853 7105079227968925892354201995611212902196086403441815981362977477130996051870721135 and it would work for most calculations you would need, but it still wouldn’t be exact. If you made a circle the diameter of the known universe, the difference would be way less, 720 orders of magnitude less than the diameter of a proton.

If you need more accuracy than that, you’re on your own.

---

<div class="post-metadata">

**Author:** ![septimus](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/septimus/32/410_2.png) [@septimus](https://boards.straightdope.com/u/septimus)\
**Post date:** [July 29, 2017, 4:17am UTC](https://boards.straightdope.com/t/pi/791924/222 "2017-07-29T04:17:59Z")

</div>

> [@Jimpy](#):
>
> 797 decimal places pi is equal to 3.14159 … 1134999999

Nitpick: After the sextuple 9, pi continues …837297804995  
Thus, don’t you think that, to [del]797[/del] 767 decimal places, pi should be rendered as 3.14159 … 1135000000 ?

😃

BTW, you needn’t Google to find the first 767 decimals of pi. Using the standard Unix _bc_ calculator  
scale = 770  
4\*a(1)  
produces this much precision almost instantaneously.

---

<div class="post-metadata">

**Author:** ![rat\_avatar](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/rat_avatar/32/255_2.png) [@rat\_avatar](https://boards.straightdope.com/u/rat_avatar)\
**Post date:** [July 29, 2017, 4:56am UTC](https://boards.straightdope.com/t/pi/791924/223 "2017-07-29T04:56:38Z")

</div>

> [@septimus](#):
>
> Nitpick: After the sextuple 9, pi continues …837297804995  
> Thus, don’t you think that, to [del]797[/del] 767 decimal places, pi should be rendered as 3.14159 … 1135000000 ?
> 
> 😃
> 
> BTW, you needn’t Google to find the first 767 decimals of pi. Using the standard Unix _bc_ calculator  
> scale = 770  
> 4\*a(1)  
> produces this much precision almost instantaneously.

Using the Chudnovsky algorithm I can calculate 2.5M places in 2 min on this computer, but I don’t have enough ram to do more but here are the first 3000, that are verified. 🙂

3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632788659361533818279682303019520353018529689957736225994138912497217752834791315155748572424541506959508295331168617278558890750983817546374649393192550604009277016711390098488240128583616035637076601047101819429555961989467678374494482553797747268471040475346462080466842590694912933136770289891521047521620569660240580381501935112533824300355876402474964732639141992726042699227967823547816360093417216412199245863150302861829745557067498385054945885869269956909272107975093029553211653449872027559602364806654991198818347977535663698074265425278625518184175746728909777727938000816470600161452491921732172147723501414419735685481613611573525521334757418494684385233239073941433345477624168625189835694855620992192221842725502542568876717904946016534668049886272327917860857843838279679766814541009538837863609506800642251252051173929848960841284886269456042419652850222106611863067442786220391949450471237137869609563643719172874677646575739624138908658326459958133904780275900994657640789512694683983525957098258226205224894077267194782684826014769909026401363944374553050682034962524517493996514314298091906592509372216964615157098583874105978859597729754989301617539284681382686838689427741559918559252459539594310499725246808459872736446958486538367362226260991246080512438843904512441365497627807977156914359977001296160894416948685558484063534220722258284886481584560285060168427394522674676788952521385225499546667278239864565961163548862305774564980355936345681743241125150760694794510965960940252288797108931456691368672287489405601015033086179286809208747609178249385890097149096759852613655497818931297848216829989487226588048575640142704775551323796414515237462343645428584447952658678210511413547357395231134271661021359695362314429524849371871101457654035902799344037420073105785390621983874478084784896833214457138687519435064302184531910484810053706146806749192781911979399520614196634287544406437451237181921799983910159195618146751426912397489409071864942319

---

<div class="post-metadata">

**Author:** ![LSLGuy](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/lslguy/32/5813_2.png) [@LSLGuy](https://boards.straightdope.com/u/LSLGuy)\
**Post date:** [July 29, 2017, 12:24pm UTC](https://boards.straightdope.com/t/pi/791924/224 "2017-07-29T12:24:28Z")

</div>

> [@Thudlow\_Boink](#):
>
> Anyone struggling with the idea of complex numbers, or how they are used to represent rotation, might benefit from looking at the [article on them at Better Explained](https://betterexplained.com/articles/a-visual-intuitive-guide-to-imaginary-numbers/).
> 
> (And, in case we’ve gotten too far from the thread topic, [here’s Better Explained’s look at how Archimedes approximated pi](https://betterexplained.com/articles/prehistoric-calculus-discovering-pi/).)

Returning to our regularly scheduled OP …

A big thanks to **Thudlow Boink** for these links; I’d never heard of that site. it looks to be a gold mine for folks trying to stretch their math wings past the stuff they think they remember from whatever they memorized back in school.

Our intrepid OP would do well to start reading that site beginning with topics he’s sure he understands working out towards the edge of what he thinks he understands then beyond.

---

<div class="post-metadata">

**Author:** ![Jimpy](https://avatars.discourse-cdn.com/v4/letter/j/c68b51/32.png) [@Jimpy](https://boards.straightdope.com/u/Jimpy)\
**Post date:** [July 29, 2017, 4:45pm UTC](https://boards.straightdope.com/t/pi/791924/225 "2017-07-29T16:45:27Z")

</div>

> [@septimus](#):
>
> Nitpick: After the sextuple 9, pi continues …837297804995  
> Thus, don’t you think that, to [del]797[/del] 767 decimal places,

I goofed on my adding because I did it by hand and the only reason I was looking at this thread was I waiting for the LOTRO last beta test for update 21 to come on line and while I was typing it my friend, who I was Skyping with said it was up. Yes, on a $3000 computer with at least 3 calculators and Mathcad installed, I was adding by hand.

---

<div class="post-metadata">

**Author:** ![Indistinguishable](https://avatars.discourse-cdn.com/v4/letter/i/90ced4/32.png) [@Indistinguishable](https://boards.straightdope.com/u/Indistinguishable)\
**Post date:** [August 1, 2017, 6:52am UTC](https://boards.straightdope.com/t/pi/791924/226 "2017-08-01T06:52:06Z")

</div>

> [@Indistinguishable](#):
>
> Glad they helped! (I forgot to go back and finish off the elaboration posts, but will do so tonight or this weekend as well.)

Ah, I’ve managed time poorly, but will still do this, once I get a chance.

---

<div class="post-metadata">

**Author:** ![Dr.Strangelove](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/dr.strangelove/32/6613_2.png) [@Dr.Strangelove](https://boards.straightdope.com/u/Dr.Strangelove)\
**Post date:** [August 1, 2017, 8:17am UTC](https://boards.straightdope.com/t/pi/791924/227 "2017-08-01T08:17:59Z")

</div>

> [@Indistinguishable](#):
>
> Specifically, just applying mechanical differentiation, we find that f’ = -1/2 \* sinc(sqrt(x)). And then, re-differentiating, we find that f’’ = (sinc(sqrt(x)) -cos(sqrt(x)))/(4x) = (-2f’ - f)/(4x).

A small error here but it doesn’t affect the rest of the proof:  
f’ = -1/2 \* sin(sqrt(x))/sqrt(x)

Or, if we want to use sinc:  
f’ = -1/2 \* sinc(sqrt(x))\*sqrt(x)

And then the second derivative:  
f’’ = (sin(sqrt(x))/sqrt(x) + cos(sqrt(x)))/(4x)

I can see how this works; the sin() bits have an extra sqrt(x) factor in them, but this is consistent, so if you factor that out you get a polynomial in terms of x. The cos() bits don’t have the extra sqrt(x) factor, and this is also consistent because you always end up multiplying by the derivative of the inside (having gotten there from the sin()). So it all works out in the end like you say.

---

<div class="post-metadata">

**Author:** ![Indistinguishable](https://avatars.discourse-cdn.com/v4/letter/i/90ced4/32.png) [@Indistinguishable](https://boards.straightdope.com/u/Indistinguishable)\
**Post date:** [August 1, 2017, 9:11am UTC](https://boards.straightdope.com/t/pi/791924/228 "2017-08-01T09:11:49Z")

</div>

> [@Dr.Strangelove](#):
>
> A small error here but it doesn’t affect the rest of the proof:  
> f’ = -1/2 \* sin(sqrt(x))/sqrt(x)
> 
> Or, if we want to use sinc:  
> f’ = -1/2 \* sinc(sqrt(x))\*sqrt(x)

sin(sqrt(x))/sqrt(x) = sinc(sqrt(x)), not sinc(sqrt(x)) \* sqrt(x), no? I don’t see my error.

> [@](#):
>
> And then the second derivative:  
> f’’ = (sin(sqrt(x))/sqrt(x) + cos(sqrt(x)))/(4x)

Minor and unimportant, affecting nothing, but: oughtn’t the cosine term be negated as I had it?

---

<div class="post-metadata">

**Author:** ![Dr.Strangelove](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/dr.strangelove/32/6613_2.png) [@Dr.Strangelove](https://boards.straightdope.com/u/Dr.Strangelove)\
**Post date:** [August 1, 2017, 9:34am UTC](https://boards.straightdope.com/t/pi/791924/229 "2017-08-01T09:34:42Z")

</div>

You are clearly right–brain fart on my part. I did the math without the sinc (just a sin), then tried to substitute it in after, but obviously screwed it up. Sorry!

That said, there _is_ a sqrt(x) factor hiding in there, which was part of my initial confusion with the approach–I was getting expressions with half-integer powers after playing with the math in your first post. I knew I could just factor out a x^0.5 to get a polynomial but I wondered where the x^0.5 went. Now I see that it disappeared inside the sinc. Although I’m familiar with sinc for image processing purposes, it’s not really part of my mental toolkit for calculus.

---

<div class="post-metadata">

**Author:** ![Dr.Strangelove](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/dr.strangelove/32/6613_2.png) [@Dr.Strangelove](https://boards.straightdope.com/u/Dr.Strangelove)\
**Post date:** [August 1, 2017, 9:45am UTC](https://boards.straightdope.com/t/pi/791924/230 "2017-08-01T09:45:23Z")

</div>

Maybe to explain myself a little better:

From your first post on the subject, I did find that the derivatives came in the form:  
P(x)sin(x) + Q(x)cos(x)

…where P(x) is _not_ a polynomial but rather consisted of half-integer powers of x. Ok, I saw from the y=1/4x substitution that the negative powers would be made positive, and that I could further factor out a x^0.5 to then make it a polynomial, but I didn’t really make it further than that.

But I think I see how it all works out now, with the derivatives ping-ponging between sin(sqrt(x)) and cos(sqrt(x)), and the chain rule providing the extra power of 0.5 to “switch” between the half-integer powers and integer (polynomial) powers.

Anyway, I suspect this logic is entirely wrapped up in your mental picture of how sinc(u) works and so the mechanics of it are abstracted away as far as you’re concerned. But your second post to completed the picture for me, so thanks again.

---

<div class="post-metadata">

**Author:** ![Andy\_L](https://avatars.discourse-cdn.com/v4/letter/a/c67d28/32.png) [@Andy\_L](https://boards.straightdope.com/u/Andy_L)\
**Post date:** [August 1, 2017, 3:47pm UTC](https://boards.straightdope.com/t/pi/791924/231 "2017-08-01T15:47:13Z")

</div>

> [@CurtC](#):
>
> I did a graph a couple of days ago in Excel, where I took the first 1500 numbers for the numerator, found the denominator that would make the fraction closest to pi, figured the error, and then graphed 1/error for each of the numerators. That way, if it was off by 1%, the number being graphed would be 100. If it was off by 0.01%, the number would be 10,000.
> 
> The graph was pretty much just three spikes, which were 355, two times that, and three times that. There were no other ratios that registered more than a pixel or two at the bottom of the graph. It’s pretty astounding how good that ratio is.

I played this game out to 5,000,000 for the numerator (which is probably too far, actually, for accurate calculations), and saw a bunch of interesting patterns. Multiples of 113 as the numerator are the best representation for pi (and were no better than 113) out a long way (I’ll report further when I have a little more time).

---

<div class="post-metadata">

**Author:** ![DPRK](https://avatars.discourse-cdn.com/v4/letter/d/4491bb/32.png) [@DPRK](https://boards.straightdope.com/u/DPRK)\
**Post date:** [August 1, 2017, 5:04pm UTC](https://boards.straightdope.com/t/pi/791924/232 "2017-08-01T17:04:06Z")

</div>

I explicitly want to encourage people in these sorts of investigations, but also feel obligated to point out that the [continued fraction for pi](http://mathworld.wolfram.com/PiContinuedFraction.html) has been computed to billions of terms 🙂

The next denominator after 113 is 33102.

---

<div class="post-metadata">

**Author:** ![Andy\_L](https://avatars.discourse-cdn.com/v4/letter/a/c67d28/32.png) [@Andy\_L](https://boards.straightdope.com/u/Andy_L)\
**Post date:** [August 1, 2017, 5:06pm UTC](https://boards.straightdope.com/t/pi/791924/233 "2017-08-01T17:06:49Z")

</div>

> [@DPRK](#):
>
> I explicitly want to encourage people in these sorts of investigations, but also feel obligated to point out that the [continued fraction for pi](http://mathworld.wolfram.com/PiContinuedFraction.html) has been computed to billions of terms 🙂
> 
> The next denominator after 113 is 33102.

Yeah, I’m just in it for the fun of looking at the plots. I’ll confirm that I get 103993/33102 as a peak, anyway.

---

<div class="post-metadata">

**Author:** ![Indistinguishable](https://avatars.discourse-cdn.com/v4/letter/i/90ced4/32.png) [@Indistinguishable](https://boards.straightdope.com/u/Indistinguishable)\
**Post date:** [August 1, 2017, 9:23pm UTC](https://boards.straightdope.com/t/pi/791924/234 "2017-08-01T21:23:19Z")

</div>

> [@Dr.Strangelove](#):
>
> Anyway, I suspect this logic is entirely wrapped up in your mental picture of how sinc(u) works and so the mechanics of it are abstracted away as far as you’re concerned. But your second post to completed the picture for me, so thanks again.

I actually don’t know the derivative of sinc or such things off the top of my head; I’d sit down and calculate it from scratch each time. For what it’s worth, I personally thought about this barely ever thinking of sinc, or the specific values of f’ and f’‘, at all. The specific value of f’ in terms of sinc I listed only for people who like to see the details, but I myself thought about this by moving to the abstract.

Like I said in [post 199](http://boards.straightdope.com/sdmb/showpost.php?p=20373526&postcount=199), suppose you are given something of the form P(y)f + Q(y)f’, and you wish to take its derivative, knowing only that f’’ is also of this form and that y’ is also a polynomial in y. You can readily go ahead and see that this derivative is also of the same form, increasing the degree of the polynomials at a fixed rate.

It doesn’t matter whether f is cos(sqrt(x)) and y = 1/(4x), or any other things with the same property. This is why I like abstraction; it gets rid of the clutter of unnecessary details, and lets you see only the things that matter. So it becomes clear how to generalize this argument to further situations too (not just the trigonometric situations I happened to use it for here).

So the only important thing is to establish that f’’ is indeed of the form P(y)f + Q(y)f’ for some y whose derivative is also a polynomial in y. All the other details stop mattering once you’ve shown that.

Anyway, whatever way works for you to understand it works; I’m just expanding on how it became easiest for me to understand.

[Previous page](https://boards.straightdope.com/t/pi/791924.md?page=11)
