bug-gsl
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

## Re: [Bug-gsl] bug in ellint.c

 From: tim Subject: Re: [Bug-gsl] bug in ellint.c Date: Tue, 22 Sep 2009 15:12:33 +1200 User-agent: Thunderbird 1.5.0.12 (X11/20080430)

brian hi

thanks for replying.


i was checking the results against the keisan casio library and found errors between the two. when i changed the equation to match wikipedia i got the same results as keisan.


after your comments i have checked further. am i correct that there are two different definitions of the third elliptic integral - one with 1 + n and the other with 1 - n. In that case the result for -n from the first type should match the result for n for the other type. which seems to be the case. your result for -n matches keisan result for n and vice versa.

pity there is no standard definition. thanks for your help.

tim

Brian Gough wrote:

At Fri, 11 Sep 2009 19:28:59 +1200,
tim wrote:

should be

const int rjstatus = gsl_sf_ellint_RJ_e(0.0, y, 1.0, 1.0 - n, mode, &rj);
result->val = rf.val + (n/3.0) * rj.val;

From Wikipedia


K(k)=R_F\left(0,1-k^2,1\right)
    E(k)=R_F\left(0,1-k^2,1\right)-\frac{1}{3}k^2 R_D\left(0,1-k^2,1\right)

\Pi(n,k)=R_F\left(0,1-k^2,1\right)+\frac{1}{3}n R_J

\left(0,1-k^2,1,1-n\right)

Thanks for your email. Wikipedia is using a different sign convention
for n -- we use the sign in the original Carlson paper, equation 4.3.

For reference, the paper is available at
http://resolver.sub.uni-goettingen.de/purl?GDZPPN001175246






reply via email to

 [Prev in Thread] Current Thread [Next in Thread]