moiseevigor / elliptic

Elliptic functions for Matlab and Octave
http://moiseevigor.github.io/elliptic
15 stars 5 forks source link

elliptic12 sometimes gives incorrect results #28

Open cffk opened 10 months ago

cffk commented 10 months ago

The function elliptic12 returns incorrect results for phase equal to some odd multiples of pi/2. For example

m = 0.5;
n = 17;
elliptic12(n*pi/2, m) - n*ellipke(m)
==>
ans = -1.8541

The correct answer is ans = 0 (for any integer n).