Re: [math-fun] Machinoid arcsin π formulæ
CGreathouse> Naively we want to minimize -sum 1/log x and by that metric this is worse than Machin: -1/log(1/7) - 1/log(239/4802) = 0.847... -1/log(1/5) - 1/log(1/239) = 0.803... It only gets worse if you expand the model to make unit fractions less costly. (Exercise: what's the right discount here? Depends on the relative speed of "divide by a small integer" and "add two multiprecision numbers".) But I guess it beats it in the sense that 1/7 < 1/5? Charles Greathouse Analyst/Programmer Case Western Reserve University Ouch. That's the sense I was using. Non sense. On Thu, Sep 25, 2014 at 5:38 AM, Bill Gosper <billgosper@gmail.com> wrote: Doesn't this, in some sense, beat Machin? In[628]:= TrigExpand[Sin[4*ArcSin[1/7] - ArcSin[239/4802]]] Out[628]= 1/2 Is it trying to tell us something? Anyway, here it is demonstrated. The product matrix for a arcsin x: 1 2 a x asinmat[a_, x_] := {{(1 - ---) x , --------}, {0, 1}} 2 k -1 + 2 k For 22 digits, we'll need In[698]:= Ceiling[22/Log[10, 49]] Out[698]= 14 terms of In[696]:= asinmat[24, 1/7] Out[696]= 1 1 24 {{-- (1 - ---), ------------}, {0, 1}} 49 2 k 7 (-1 + 2 k) and In[699]:= Ceiling[22/Log[10, (4802/239)^2]] Out[699]= 9 terms of In[697]:= asinmat[6, 239/4802] Out[697]= 1 57121 (1 - ---) 2 k 717 {{---------------, ---------------}, {0, 1}} 23059204 2401 (-1 + 2 k) In[702]:= Dot @@ Table[%696, {k, 14}] Out[702]= 5014575 8094675459628407766349207262854411849 {{--------------------------------, -------------------------------------}, {0, 1}} 15434586961405991978278722732032 2352869649110314767878447007714508800 In[703]:= Dot @@ Table[%697, {k, 9}] Out[703]= 78689571474191869819784797472677868659791566555 {{------------------------------------------------------------------------, 120803282051429183719400505971423044572368826431183593390793372660137984 13702798156207017640945057262283907448445615550593235749465375823985275 -----------------------------------------------------------------------}, {0, 1}} 45867260308260778678966466579008135363717505787308514504324035131736064 In[706]:= N[%702[[1, 2]] - %703[[1, 2]], 27] Out[706]= 3.14159265358979323846264335 We got four freebies because convergence is a little faster early on. If we were certain never to desire more digits, these exact fractions are silly. But this way they provide the luxury of continuing the calculation without starting over. --rwg
participants (1)
-
Bill Gosper