Talk:Approximations of π

Latest comment: 3 months ago by GoldenRing in topic Digit extraction methods


Wallis product?

edit

Should the Wallis product be mentioned on this page or is it too obscure? It does seem that some books use it at leas as an example; see http://math.stackexchange.com/questions/1097633/how-to-show-frac-pi4-frac2-cdot4-cdot4-cdot6-cdot6-cdot8-dotsm3-cdot — Preceding unsigned comment added by 86.121.137.79 (talk) 15:50, 9 January 2015 (UTC)Reply

Done. Wqwt (talk) 20:37, 10 January 2024 (UTC)Reply

Fractional approximations

edit

Here is a list of fractions giving approximations of pi with increasing denominators and increasing precision:
fraction = approximation (error) [number of exact digits]
3 / 1 = 3.000 (4.507% err) [1] <<<
13 / 4 = 3.250 (3.451% err) [1]
16 / 5 = 3.200 (1.859% err) [1]
19 / 6 = 3.166667 (0.798% err) [2]
22 / 7 = 3.142857 (0.04025% err) [3] <<
179 / 57 = 3.140350 (0.03953% err) [3]
201 / 64 = 3.140625 (0.03080% err) [3]
223 / 71 = 3.140845 (0.02380% err) [3]
245 / 78 = 3.141025 (0.01805% err) [4]
267 / 85 = 3.141176 (0.01325% err) [4]
289 / 92 = 3.141304 (0.00918% err) [4]
311 / 99 = 3.141414 (0.00568% err) [4]
333 / 106 = 3.141509 (0.00265% err) [5]
355 / 113 = 3.141592920 (0.0000084914% err) [7] <<<<<
52163 / 16604 = 3.141592387 (0.0000084738% err) [7]
52518 / 16717 = 3.141592390 (0.0000083592% err) [7]
52873 / 16830 = 3.141592394 (0.0000082460% err) [7]
53228 / 16943 = 3.141592398 (0.0000081344% err) [7]
53583 / 17056 = 3.141592401 (0.0000080242% err) [7]
53938 / 17169 = 3.141592404 (0.0000079155% err) [7]
54293 / 17282 = 3.141592408 (0.0000078083% err) [7]
54648 / 17395 = 3.141592411 (0.0000077024% err) [7]
55003 / 17508 = 3.141592414 (0.0000075979% err) [7]
55358 / 17621 = 3.141592418 (0.0000074947% err) [7]
55713 / 17734 = 3.141592421 (0.0000073928% err) [7]
56068 / 17847 = 3.141592424 (0.0000072922% err) [7]
56423 / 17960 = 3.141592427 (0.0000071929% err) [7]
56778 / 18073 = 3.141592430 (0.0000070949% err) [7]
57133 / 18186 = 3.141592433 (0.0000069980% err) [7]
57488 / 18299 = 3.141592436 (0.0000069024% err) [7]
57843 / 18412 = 3.141592439 (0.0000068079% err) [7]
58198 / 18525 = 3.141592442 (0.0000067146% err) [7]
58553 / 18638 = 3.141592445 (0.0000066224% err) [7]
58908 / 18751 = 3.141592448 (0.0000065313% err) [7]
59263 / 18864 = 3.141592451 (0.0000064413% err) [7]
59618 / 18977 = 3.141592454 (0.0000063524% err) [7]
59973 / 19090 = 3.141592456 (0.0000062645% err) [7]
60328 / 19203 = 3.141592459 (0.0000061777% err) [7]
60683 / 19316 = 3.141592462 (0.0000060919% err) [7]
61038 / 19429 = 3.141592464 (0.0000060071% err) [7]
61393 / 19542 = 3.141592467 (0.0000059232% err) [7]
61748 / 19655 = 3.141592470 (0.0000058404% err) [7]
62103 / 19768 = 3.141592472 (0.0000057584% err) [7]
62458 / 19881 = 3.141592475 (0.0000056774% err) [7]
62813 / 19994 = 3.141592477 (0.0000055974% err) [7]
63168 / 20107 = 3.141592480 (0.0000055182% err) [7]
63523 / 20220 = 3.141592482 (0.0000054399% err) [7]
63878 / 20333 = 3.141592485 (0.0000053625% err) [7]
64233 / 20446 = 3.141592487 (0.0000052859% err) [7]
64588 / 20559 = 3.141592489 (0.0000052102% err) [7]
64943 / 20672 = 3.141592492 (0.0000051353% err) [7]
65298 / 20785 = 3.141592494 (0.0000050612% err) [7]
65653 / 20898 = 3.141592496 (0.0000049879% err) [7]
66008 / 21011 = 3.141592499 (0.0000049154% err) [7]
66363 / 21124 = 3.141592501 (0.0000048437% err) [7]
66718 / 21237 = 3.141592503 (0.0000047728% err) [7]
67073 / 21350 = 3.141592505 (0.0000047026% err) [7]
67428 / 21463 = 3.141592508 (0.0000046331% err) [7]
67783 / 21576 = 3.141592510 (0.0000045643% err) [7]
68138 / 21689 = 3.141592512 (0.0000044963% err) [7]
68493 / 21802 = 3.141592514 (0.0000044290% err) [7]
68848 / 21915 = 3.141592516 (0.0000043624% err) [7]
69203 / 22028 = 3.141592518 (0.0000042965% err) [7]
69558 / 22141 = 3.141592520 (0.0000042312% err) [7]
69913 / 22254 = 3.141592522 (0.0000041666% err) [7]
70268 / 22367 = 3.141592524 (0.0000041026% err) [7]
70623 / 22480 = 3.141592526 (0.0000040393% err) [7]
70978 / 22593 = 3.141592528 (0.0000039767% err) [7]
71333 / 22706 = 3.141592530 (0.0000039146% err) [7]
71688 / 22819 = 3.141592532 (0.0000038532% err) [7]
72043 / 22932 = 3.141592534 (0.0000037923% err) [7]
72398 / 23045 = 3.141592536 (0.0000037321% err) [7]
72753 / 23158 = 3.141592538 (0.0000036725% err) [7]
73108 / 23271 = 3.141592540 (0.0000036134% err) [7]
73463 / 23384 = 3.141592541 (0.0000035549% err) [7]
73818 / 23497 = 3.141592543 (0.0000034970% err) [7]
74173 / 23610 = 3.141592545 (0.0000034396% err) [7]
74528 / 23723 = 3.141592547 (0.0000033828% err) [7]
74883 / 23836 = 3.141592549 (0.0000033265% err) [7]
75238 / 23949 = 3.141592550 (0.0000032707% err) [7]
75593 / 24062 = 3.141592552 (0.0000032155% err) [7]
75948 / 24175 = 3.141592554 (0.0000031608% err) [7]
76303 / 24288 = 3.141592555 (0.0000031065% err) [7]
76658 / 24401 = 3.141592557 (0.0000030528% err) [7]
77013 / 24514 = 3.141592559 (0.0000029996% err) [7]
77368 / 24627 = 3.141592561 (0.0000029469% err) [7]
77723 / 24740 = 3.141592562 (0.0000028947% err) [7]
78078 / 24853 = 3.141592564 (0.0000028429% err) [7]
78433 / 24966 = 3.141592565 (0.0000027916% err) [7]
78788 / 25079 = 3.141592567 (0.0000027407% err) [7]
79143 / 25192 = 3.141592569 (0.0000026904% err) [7]
79498 / 25305 = 3.141592570 (0.0000026404% err) [7]
79853 / 25418 = 3.141592572 (0.0000025909% err) [7]
80208 / 25531 = 3.141592573 (0.0000025419% err) [7]
80563 / 25644 = 3.141592575 (0.0000024933% err) [7]
80918 / 25757 = 3.141592576 (0.0000024451% err) [7]
81273 / 25870 = 3.141592578 (0.0000023973% err) [7]
81628 / 25983 = 3.141592579 (0.0000023500% err) [7]
81983 / 26096 = 3.141592581 (0.0000023030% err) [7]
82338 / 26209 = 3.141592582 (0.0000022565% err) [7]
82693 / 26322 = 3.141592584 (0.0000022103% err) [7]
83048 / 26435 = 3.141592585 (0.0000021646% err) [7]
83403 / 26548 = 3.141592587 (0.0000021192% err) [7]
83758 / 26661 = 3.141592588 (0.0000020743% err) [7]
84113 / 26774 = 3.141592589 (0.0000020297% err) [7]
84468 / 26887 = 3.141592591 (0.0000019854% err) [7]
84823 / 27000 = 3.141592592 (0.0000019416% err) [7]
85178 / 27113 = 3.141592593 (0.0000018981% err) [7]
85533 / 27226 = 3.141592595 (0.0000018550% err) [7]
85888 / 27339 = 3.141592596 (0.0000018122% err) [7]
86243 / 27452 = 3.141592597 (0.0000017698% err) [7]
86598 / 27565 = 3.141592599 (0.0000017278% err) [7]
86953 / 27678 = 3.1415926006 (0.0000016860% err) [8]
87308 / 27791 = 3.1415926019 (0.0000016447% err) [8]
87663 / 27904 = 3.1415926032 (0.0000016036% err) [8]
88018 / 28017 = 3.1415926044 (0.0000015629% err) [8]
88373 / 28130 = 3.1415926057 (0.0000015225% err) [8]
88728 / 28243 = 3.1415926070 (0.0000014824% err) [8]
89083 / 28356 = 3.1415926082 (0.0000014427% err) [8]
89438 / 28469 = 3.1415926095 (0.0000014033% err) [8]
89793 / 28582 = 3.1415926107 (0.0000013641% err) [8]
90148 / 28695 = 3.1415926119 (0.0000013253% err) [8]
90503 / 28808 = 3.1415926131 (0.0000012868% err) [8]
90858 / 28921 = 3.1415926143 (0.0000012486% err) [8]
91213 / 29034 = 3.1415926155 (0.0000012107% err) [8]
91568 / 29147 = 3.1415926167 (0.0000011731% err) [8]
91923 / 29260 = 3.1415926179 (0.0000011358% err) [8]
92278 / 29373 = 3.1415926190 (0.0000010987% err) [8]
92633 / 29486 = 3.1415926202 (0.0000010620% err) [8]
92988 / 29599 = 3.1415926213 (0.0000010255% err) [8]
93343 / 29712 = 3.1415926225 (0.0000009893% err) [8]
93698 / 29825 = 3.1415926236 (0.0000009534% err) [8]
94053 / 29938 = 3.1415926247 (0.0000009177% err) [8]
94408 / 30051 = 3.1415926258 (0.0000008824% err) [8]
94763 / 30164 = 3.1415926269 (0.0000008473% err) [8]
95118 / 30277 = 3.1415926280 (0.0000008124% err) [8]
95473 / 30390 = 3.1415926291 (0.0000007778% err) [8]
95828 / 30503 = 3.1415926302 (0.0000007435% err) [8]
96183 / 30616 = 3.1415926313 (0.0000007094% err) [8]
96538 / 30729 = 3.1415926323 (0.0000006755% err) [8]
96893 / 30842 = 3.1415926334 (0.0000006420% err) [8]
97248 / 30955 = 3.1415926344 (0.0000006086% err) [8]
97603 / 31068 = 3.1415926355 (0.0000005755% err) [8]
97958 / 31181 = 3.1415926365 (0.0000005427% err) [8]
98313 / 31294 = 3.1415926375 (0.0000005100% err) [8]
98668 / 31407 = 3.1415926385 (0.0000004777% err) [8]
99023 / 31520 = 3.1415926395 (0.0000004455% err) [8]
99378 / 31633 = 3.1415926406 (0.0000004136% err) [8]
99733 / 31746 = 3.1415926415 (0.0000003819% err) [8]
100088 / 31859 = 3.1415926425 (0.0000003504% err) [8]
100443 / 31972 = 3.1415926435 (0.0000003192% err) [8]
100798 / 32085 = 3.1415926445 (0.0000002881% err) [8]
101153 / 32198 = 3.1415926455 (0.0000002573% err) [8]
101508 / 32311 = 3.1415926464 (0.0000002267% err) [8]
101863 / 32424 = 3.1415926474 (0.0000001963% err) [8]
102218 / 32537 = 3.1415926483 (0.0000001661% err) [8]
102573 / 32650 = 3.1415926493 (0.0000001362% err) [8]
102928 / 32763 = 3.14159265025 (0.00000010644% err) [9]
103283 / 32876 = 3.14159265117 (0.00000007689% err) [9]
103638 / 32989 = 3.14159265210 (0.00000004754% err) [9]
103993 / 33102 = 3.14159265301 (0.00000001839% err) [10]
104348 / 33215 = 3.14159265392 (0.00000001055% err) [10] <
208341 / 66317 = 3.14159265347 (0.000000003894% err) [10]
312689 / 99532 = 3.14159265362 (0.0000000009276% err) [10] <
833719 / 265381 = 3.141592653581 (0.0000000002774% err) [12]
1146408 / 364913 = 3.1415926535914 (0.00000000005127% err) [11] <
3126535 / 995207 = 3.1415926535886 (0.00000000003637% err) [12]
4272943 / 1360120 = 3.1415926535894 (0.000000000012863% err) [13]
5419351 / 1725033 = 3.14159265358981 (0.0000000000007068% err) [13] <<
The entries with the '<' signs are particularly interesting because of the ratio of added precision over increase of denominator.
Aside from some mathematical trivia, generally a good use of approximation of pi would be for the memorization of a smaller number of digits than the approximation can give. For this, only 355/113 is useful.
Another use is integer math. For example, if you use integer math with 32 bit numbers to calculate the circumference of an object, and the maximum diameter of that object is 130000 units, then the max denominator would be, 2^32/130000 = 33038. Then the best approximate fraction you can use, would be 103638/32989.
Currently the article mentions 125648/39995 as a fraction that produces 8 correct digits. This is not wrong, but it's not useful. There are at least 45 better fractions that do the same, and use smaller denominators. And half of then are more accurate. So I am replacing 125648/39995 with 99733/31746 which is more accurate and needs less digits. Dhrm77 (talk) 16:15, 18 August 2022 (UTC)Reply

...if I may..I find it difficult to memorize any of those fractions after 355/311.
however, I'd like to go the other way and suggest the following approximation:
( 355 -3015E-8 ) / 113
which yields Pi accurately to 10 decimal places..if you need that much accuracy, but
trying to find it is always fun.
my calculator shows the result to be 3.1415926535 (39623)
qed Criticatlarge (talk) 02:58, 15 February 2023 (UTC)Reply

22/7 is definitely ancient

edit

"Approximations" of pi are mostly best geometry, rational exhaustion.

Here that's "at least as mucn precision, ..., as 7 digits of pi". 97.113.48.144 (talk) 05:24, 14 October 2022 (UTC)Reply

approximations based on and

edit

Based on a recent addition, this approximation:   is accurate to 8 digits. But I don't think it's worth adding to the article. Dhrm77 (talk) 11:12, 30 May 2023 (UTC)Reply

Babylonian and Egypt Pi?

edit

"one Old Babylonian mathematical tablet excavated near Susa in 1936 (dated to between the 19th and 17th centuries BCE) gives a better approximation of π as 258 = 3.125, about 0.528% below the exact value.

At about the same time, the Egyptian Rhind Mathematical Papyrus (dated to the Second Intermediate Period, c. 1600 BCE, although stated to be a copy of an older, Middle Kingdom text) implies an approximation of π as 25681 ≈ 3.16 (accurate to 0.6 percent) by calculating the area of a circle via approximation with the octagon."

The problem is that neither of those cultures had yet a concept of pi as either circumference/diameter or as area/(radius^2).

For the babylonians, they have a tablet that basically says that the circumference of a circle is 25/24 multiplied by the perimeter of the inscribed regular hexagon. So if the circle has diameter=1, the side of the hexagon is 0.5 and the perimeter of the hexagon is 3 so the circumference of the circle would be 25/24*3=25/8=3 1/8. So this is a formula for circumference of a circle, basically 25/8 * diameter, so it is not totally wrong to say 'by implication treats pi as 25/8".

But for Egypt, this is much more of a stretch. They have a formula for the area of a circle which is A=(D-D/9)^2. It is a great formula, but to say "treats pi as 256/81" is really not accurate. While it is true that this formula could be written as A=(2r-2r/9)^2=(16r/9)^2=256/81*r^2 it is not accurate to say that it treated pi as 256/81.

I think it would be better to just say that these cultures had formulas for circumference and area which are equivalent to the formulas C=(25/8)D and A=(256/81)r^2 so it is like they had values for pi, but it wasn't like they were using the formulas C=pi*D and A=pi*r^2 and they were trying to use the best approximation of pi they could think of.

Might there be a simple way to edit this so that it is more accurate and does not claim that these cultures were aware there there was this constant pi, but not to make it too complicated to explain? Nymathteacher (talk) 20:59, 22 August 2023 (UTC)Reply

Borwein's approximation

edit

Ramanujan's approximation in his 1914 paper:

 

is valid when n is odd. For example,

 

is a simple approximation, but

 

is complicated. The Borwein's brothers mention the following approximation in their book.

 

where

 

is valid when n is even. I added this approximation to the article. Nei.jp (talk) 21:59, 21 October 2023 (UTC)Reply

Miscellaneous approximations

edit

This section has become a magnet for the insertion of ad hoc approximations of a few decimal places that anyone can dream up. I recommend removing the section altogether per WP:SPAMBAIT.—Anita5192 (talk) 22:14, 21 March 2024 (UTC)Reply

Ferguson calculation

edit

[1] I changed the claimed date of this calculation from 1944 to 1946, to match Chronology of computation of π. The cited Nature note was from 1946 and didn't say what in year the calculation was supposedly done (it just says "recently"). 1944 is hard to believe because it was the height of WW2 and it's implausible that anyone with the necessary skills would be spending their time calculating pi, as well as tying up a scarce desk calculator for however long it was. By 1946 there would have been plenty of people with time on their hands, plus surplus calculators. I have not looked at the Penguin book about curious numbers cited in the Chronology article, but Nature article is online. 2601:644:8501:AAF0:0:0:0:2EE5 (talk) 10:32, 21 May 2024 (UTC)Reply

Added: from Bryan Hayes' bibliography:[2]

Ferguson, D. F. 1946. Evaluation of π. Are Shanks' figures correct? The Mathematical Gazette 30(289):89–90.

A fuller account of Ferguson's confrontation with Shanks. Working with a desk calculator, it took him a year to get up to 530 decimal places. "Up to this point, whenever I had disagreed with Shanks' figures (and this has occurred from time to time, owing to copying errors, etc.), I had never had any real difficulty in finding where I had gone wrong. But at this point I not only found my figures differing completely from those of Shanks, but all my efforts to find my mistake failed." He spent another four months checking his work by means of a different series summation before venturing the opinion that Shanks might have erred.

This and a few others from Hayes' list look like better references about the Ferguson calculation. The mathematical Gazette article is at doi:10.2307/3608485 and indicates the calculation really was done in 1944-1945, wow. I'll change my earlier edit in a minute, and expand the article a little bit when I get a chance. I haven't yet looked Hayes' other references.

Ferguson correction

edit

Regarding the above, here is the contents of Ferguson's note in Nature (Ferguson, D. F. (16 March 1946). "Value of π". Nature. 157 (3985): 342. doi:10.1038/157342c0):

Value of π

In 1853 there appeared, in a paper by W. Rutherford, the value of the constant π to 530 decimals, calculated by W. Shanks. This was eventually extended by Shanks to 607, and in 1873 to 707 decimals.

For more than seventy years this has been accepted as the value of π, apparently without any doubts having been expressed in print.

Recently I decided to test numerically a series found by a colleague, R. W. Morris, namely

 

The value so obtained agrees with Shanks's value only to the 527th decimal place; from that last point it seems that Shanks's value is incorrect.

The values from the 521st to 540th decimals are given below:

86021 39501 60924 48077 (Shanks).
86021 39494 63952 24737 (D. F. F.).

It is of interest to note that the discrepancy occurs at about the point to which Shanks's first published value extends, that is, in the 530th decimal.

D. F. Ferguson
Royal Naval College, Eaton, Chester.

2601:644:8501:AAF0:0:0:0:98EB (talk) 18:06, 21 May 2024 (UTC)Reply

Digit extraction methods

edit

It's quite frustrating that the section titled "digit extraction methods" doesn't actually state a way of extracting a digit of π, in any base. It states that the formula can compute any particular digit of π—returning the hexadecimal value of the digit—without having to compute the intervening digits (digit extraction). But then, bizarrely, doesn't give a formula for extracting any particular digit of π, instead giving a series sum to return the value of π.

It is tempting to look at the version of the BBP formula given and think that the 16-n factor at the end implies that the rest returns the value of one digit but this is obviously not the case, as the n factor only appears in denominators and so all the terms in the first part of the sum will become infinitesimally small as n→∞.

Likewise, Plouffe's formula for digits of π in base 10 is only given as a sum with no obvious way to factor it into individual digits.

Could someone better at this stuff than me please add a formula that actually returns arbitrary digits of π? Or, if this is actually not possible, the article text needs to be updated to say so. GoldenRing (talk) 12:24, 21 August 2024 (UTC)Reply