Jump to content
Science Forums

Recommended Posts

  • 3 weeks later...
  • 4 years later...
Posted

The formula may work. Maybe not. But that's not the important thing.

Other infinite series formulas for pi are notable for their simplicity and elegance.

Many of them can be easily memorized in a few seconds.

 

This formula, however, lacks simplicity and elegance.

I cannot comment on how fast it converges. I simply don't know, and don't have the time to research it.

 

I do know (from reading the Wiki article on Pi that the FASTEST formulas for calculating pi, or K*pi, or K*/pi, where K is some numeric constant, tend to be very inelegant looking, very much like the one presented here. So, who knows? Maybe it works and maybe it's fast as hell. :rolleyes:

Posted

Having a nice, moderate precision calculator at my fingertips almost always when I read hypography, and being able to transcribe graphics as well as the next ape-with-a-keyboard, :rolleyes: I whipped out the following:

 >s B=(1258728277/375408055) + (296/55*$zln(25/26)) - (171362/6825601*$zln(57121/57122)) w B
3.141881918536209519
>f K=3:1 s A=(12/55*(5**-(2*K+4)))-(3/6825601*(239**-(2*K+4)))*(-1**(K+1))/(K-1)/(K-2)/(2*K-1)/(2*K-3),B=B-A w K,"  ",B,"  ",A,! r R
3  3.141881917791482246  .0000000007447272727272727273
4  3.14188191779573783  -.000000000004255584415584415586
5  3.141881917795690546  .00000000000004728427128427128427 
...
17  3.141881917795691255  .00000000000000000000000000000000244270778409313072

From this, the formula in Cindy’s 4.5-year-old post appears not to work (I’m no Pi-memorization competitor, but even I know it as far as 3.1415...). :phones:

 

I’d say this would have been more helpful info for Cindy 4.5 years ago, but that was just a bit before I joined hypography.

Posted

I get it a bit closer than that. I get:

 

3.141592653589797528486075294206477377389

54845368371478281342993902550089481394037

54518961775912648218308854462219630190122

12227573982270980255546349253895081413993

98632298093985561989350184629989444453683

86402243338568045096250188214926929085527

30177715328573893251368367347503914403525

91279579257691

 

at 2<k<100 using:

 

use Math::BigFloat;

my $x = Math::BigFloat->new(6825601 ,300);
$fx = (1258728277/375408055)+(296/55)*log(25/26)-(171362/$x)*log(57121/57122);
for($k = 3;$k < 100;$k++){
$sumk = (((12/55)*5**(-2*$k+4)-(3/$x)*239**(-2*$k+4))*(-1)**($k+1))/(($k-1)*($k-2)*(2*$k-1)*(2*$k-3));
$fx = $fx - $sumk;
print $fx;
print "n n";
}

 

~modest

Posted
>f K=3:1 s A=(12/55*(5**-(2*K+4)))-(3/6825601*(239**-(2*K+4)))*(-1**(K+1))/(K-1)/(K-2)/(2*K-1)/(2*K-3),B=B-A w K,"  ",B,"  ",A,! r R
3  3.141881917791482246  .0000000007447272727272727273

 

at k=3 the summed part looks like ~ 0.000290909090652...

 

google calc

 

~modest

Posted

Numerical approximations of π - Wikipedia, the free encyclopedia

Stu's pi page

 

PiFAst (4.3 or later) by Xavier Gourdan will calculate pi and other constants faster than you can download the digits. 2 million digits fly out within seconds. Uncle Al needed the Golden Ratio as a cover background for a Mensa newletter. A very large number of small digits burped right out. Parse the lines with Wordstar. Display the block in Microcrap Word, screen capture a gif. Piece of cake.

 

--

Uncle Al

UNDER SATAN'S LEFT FOOT

Vote a 10 for doing the experiments!

 

The problem is elegantly solved - why reinvent the wheel unless you can do better?

Posted
Having a nice, moderate precision calculator at my fingertips almost always when I read hypography, and being able to transcribe graphics as well as the next ape-with-a-keyboard, :evil: I whipped out the following…
I get it a bit closer than that. I get…

Clearly I can’t transcribe graphics as well as the next ape-with-a-keyboard! :)

 

When I fix my mistake to match Modest’s correct transcription (replacing "**-(2*K+4)" with "**(-2*K+4)"), I get a value that reaches the limit of my calculator’s precision at K=10:

s B=(1258728277/375408055) + (296/55*$zln(25/26)) - (171362/6825601*$zln(57121/57122)) w B
  3.141881918536209519
f K=3:1 s A=(12/55*(5**(-2*K+4)))-(3/6825601*(239**(-2*K+4)))*(-1**(K+1))/(K-1)/(K-2)/(2*K-1)/(2*K-3),B=B-A w K,"  ",B,"  ",A,! r R
3  3.141591009445556914  .000290909090652605124
4  3.141592671783219251  -.000001662337662337020877
5  3.141592653312800781  .0000000184704184704184673
...
10  3.141592653589793238  -.00000000000000006148419176282953371

So I guess the formula does work.

 

Having logarithms constants in it is slightly sneaky, as these must be approximated with some infinite series of their own, such as its Taylor series.

Posted

I'm having a similar oops moment myself.

 

So I guess the formula does work.

 

I think you're right. Perl's bignum is somehow failing me.

 

Where you get:

 

B=3.141881918536209519

 

I get:

 

B=3.141881918536213812

0157696003619314987793

7488581591569738694072

5073147404895187984178

9755949695858284127654

1069423776749

 

Our two diverge after about 14 significant digits and I'm pretty sure yours is closer as verified here:

 

ttmath.org / Big online calculator

 

I'd love to check this formula to a few hundred digits. I'll see if I can figure out what I'm doing wrong....

 

~modest

Posted

Alrighty. I took Perl out to the shed and had a talkin' with it.

 

I've checked Cindy's formula to 500 digits successfully. Pi it be. The first few and last few iterations shown...

 

k = 3   A = 0.0002909090906526051240100189656167638776691581351265643426118008723679895096
981384417404068356537892382977329852977632330261774281984835735308087856062621505755547518
780072868832371847468437491753328480954385169711416939465473338545630694294752841627426617
916982220149422400515159940829481594022377508496333904362461615019659896910210584638218373
504626740261897114027605535404561840118044804833100498304613323026753233238902147249020895
5150220928135999439594737788902396673041147996881585950012192991593

PI = 3.14159100944555691677693780456289832358188312631552723832299778537285470380940480838
474863121589238099732056697204485619568660972954447112576823556526608832531327090796609967
291601667365945096728434228421136276608971998238848057095115855922346518887789066719994452
138422372950729062962510049716388857896791600467708280049324455533899925442828584027690982
753955495650846542838238654163268297072599642241689644366728820745406285291598029280206199
96493928443367787508460681227963435914498453158206426359

k = 4   A = -0.000001662337662337020877841253872474808978673970234407022551527943486018867
645193986591430118491957762862845328125016517771584742061954648407404204584763142102685261
453931278277612940497247518830780257235058102866093253978427069267784109284020165947139733
259171566915354705985184916566026257868578691489326336861871210899027178265206123440316626
118629206373577504324227978648671513448899688187387429421423725273702493346558823020796812
4905469675160526389889447157676804057696691790351354067872903434066324

PI = 3.14159267178321925379781564581677079839086180028576164534554931331634072267705000237
134006133438433876018341230016987271345819447160642577417563976985085146741595616942003095
119362961415669848611512254144642086895581323636690764021894266850748535482503040045911608
829957843549247554619112675503246727045724234153895401139227173360420537786860246639553903
391313246083269340703105805508158265891338385183832016894099070080062167593677710529260896
71654454833257234666137485285660127704849807226079329793

k = 5   A = 0.0000000184704184704184672990697841260254623334939437382809872210759284396245
865058965822714776861192260046879824898090202754995965265513787879878807509878227135226387
455027275652904013687014505307718314679485546828935230086970601409290075787583996808563322
035995028332334897335832508484100966613325481187996756062185177297007535365058966412926242
507589414598110775773142927646059433204498425998948656467200629510261207166784025337527842
62869548367180922463776873741523942970764869616086846743268354524168771

PI = 3.14159265331280078337934834674698667236539946679181790706456209224041228305246349647
475778985669821953417872431768006369318269487507987439538765188909986364470243353067452822
362833921278799703558435070997847231427291971335821058007801366092872695514417406825551658
546634494575889229534271665837113472233844266593273549366257098006769948122730984214478009
245332138325537911426645211176113281631348898619160010598996458008394327340302432102973941
87982645608619465928722245855952479008688938758646646248




<SNIP>



k = 347   A = 0.00000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000001960690699831673496913477436231
150251961859926132870009703706673255590432752790660041691302494074343204695354196078665450
283809707156818246889892081500109326351587495550381171207650547680112988198437564669058390
784335297859612576076088188537248906450072722985782301696839072527956733514400940801066259
089384642731266247655855126387088706434063136543289962872490918446168510982207438001752707
305101024277734766649086893519751605546655264819423521442167617709856484208571252580322827
7231793719931895955

PI = 3.14159265358979323846264338327950288419716939937510582097494459230781640628620899862
803482534211706798214808651328230664709384460955058223172535940812848111745028410270193852
110555964462294895493038196442881097566593344612847564823378678316527120190914564856692346
034861045432664821339360726024914127372458700660631558817488152092096282925409171536436789
259036001133053054882046652138414695194151160943305727036575959195309218611738193261179310
51185480744623799627495673518857527248912279381830112035

k = 348   A = -0.0000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000007752681514919193138252871741
924824320551449788990036629914210642021296311091601673553608493074448664578746484167672314
805554849420731029560132122368821654267502941156498382755541605992813228052521162245421685
154496408903999209505088367610662201448023802571620186541380680458529259975305962511679061
071641637085048331509297245999295917934531934259718244532979287583239265103569810580845940
939323692222050307129066142599144008193631661009792075473542272704976945021921130242927225
1033950589245755633466

PI = 3.14159265358979323846264338327950288419716939937510582097494459230781640628620899862
803482534211706798214808651328230664709384460955058223172535940812848111745028410270193852
110555964462294895493038196442881097566593344612847564823378678316527120190914564856692346
034861045432664821339360726024914127372458700660631558817488152092096282925409171536436789
259036001133053054882046652138414695194151160943305727036575959195309218611738193261179310
51185480744623799627495673518857527248912279381830119788

k = 349   A = 0.00000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000003065555943014057442081823711
695856669689779725101754651375467272419700830951899051899498898814962568471384215572084190
536529841660324287679330727811064362237097116088033887795574226490781131278512870002610070
784437144303473214361567767623063311299335825678223494926564054154892443639174315340169498
022124521276700999080849412178992359060186015819731066207603535048622082336456343345790791
448653764530448685734911890928507317067650542412648500590206004493236962884391571047326974
6876463339415506182953

PI = 3.14159265358979323846264338327950288419716939937510582097494459230781640628620899862
803482534211706798214808651328230664709384460955058223172535940812848111745028410270193852
110555964462294895493038196442881097566593344612847564823378678316527120190914564856692346
034861045432664821339360726024914127372458700660631558817488152092096282925409171536436789
259036001133053054882046652138414695194151160943305727036575959195309218611738193261179310
51185480744623799627495673518857527248912279381830119481

k = 350   A = -0.0000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000012122185176481919123424999
535663002385655082002601582457115807104756236308053908118455634974772974045204182386601271
301380067624465767417853352435080083080928703321591150559747156737732564843346123709993883
324450054050296118773712876613398855728724281915625494778114700413120087823706260253231378
055273487875412613130396400071951280253374649179633048318423891790236579386625535358215176
592343783548712416137589270405544940863052333346630206486463872352621821466671820049626828
499994609214555612477279

PI = 3.14159265358979323846264338327950288419716939937510582097494459230781640628620899862
803482534211706798214808651328230664709384460955058223172535940812848111745028410270193852
110555964462294895493038196442881097566593344612847564823378678316527120190914564856692346
034861045432664821339360726024914127372458700660631558817488152092096282925409171536436789
259036001133053054882046652138414695194151160943305727036575959195309218611738193261179310
51185480744623799627495673518857527248912279381830119493

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...