On Mon, Sep 26, 2011 at 2:30 PM, Bill Gosper <billgosper@gmail.com> wrote:
David Cantrell to the rescue.
On Mon, Sep 26, 2011 at 3:33 AM, Bill Gosper <billgosper@gmail.com> wrote:
The Wikipedia ellipse article borrows (with the Goldwynism "For computational purposes a much faster series where the denominators vanish at a rate ...") a series from http://www.iamned.com/math/ which offers "A Rapidly converging formula for the circumference of an elipse that gives log (1024/27((a+b)/(a-b))^8) digits per term : ", a formula satisfyingly symmetrical in a and b, but which unfortunately vanishes (instead of 4a) for b=0,
This is an unrelated, 0^0 problem.
and generally fails for b<a.
No, I was using in Mma the formula based [on] Maple's notion of elliptic E. (The old modulus vs parameter confusion.)
Does anybody know what this should be? The Wikipedia article actually
corrects an obvious asymmetry in the iamned.com source, but the Wikigrapher must not have tested it.
Apologies: The Wikipedia formula is correct! (Except possibly at b=0.)
--rwg
This means that EllipticE[1-r^2]==(2 \[Pi] Sum[-1/(n!)^2*432^n (((-1+r)^8 r (1+r)^2)/(1+60 r+134 r^2+60 r^3+r^4)^3)^n (-r (15+68 r+90 r^2+68 r^3+15 r^4)+n (1-126 r-1041 r^2-1764 r^3-1041 r^4-126 r^5+r^6)) Pochhammer[1/12,n] Pochhammer[5/12,n],{n,0,\[Infinity]}])/(1+60 r+134 r^2+60 r^3+r^4)^(5/4) is an impressive acceleration formula for E'(r^2). You might be tempted to object that the k-fold speedup is cancelled by the general term being k times more complicated, but this is not the case. Once r is fixed, this is just a matrix product over n of quadratic/quadratic linear ( ). 1 0 However, it does cost a factor of 2 if you are computing megadigits of E'(nonsquare rational). A correct formula for a>=b is
elliplen[a_, b_] := 4*a*EllipticE[Sqrt[1 - b^2/a^2]]
No, elliplen[a_, b_] := 4*a*EllipticE[1 - b^2/a^2] --rwg
Which is, in fact, (nonobviously) symmetrical in a and b. --rwg