Menu ▾ ▴

#5887 elliptic_e and elliptic_ec inaccurate for m near 1 and m > 1

None
open
5
3 days ago
3 days ago
Raymond Toy
No

As for elliptic_f (fixed already), elliptic_e has numerical issues for m near 1 and for m > 1. For example, elliptic_e(1.570796326794, 0.9999999999999999) is 0.9999999999999929. The correct answer is 1.0000000000000010688.

And realpart(elliptic_ec(1e16)) is 7.85398152234539e-9. The correct answer is 7.8539816339744831943e-9.

The expected values were obtained by Claude using mpmath with 120 digits. Maxima can also compute these values via

fpprec : 60$
bfloat(elliptic_e(rationalize(1.570796326794), rationalize(0.9999999999999999)));
realpart(bfloat(elliptic_ec(rationalize(1e16))));

Discussion


Log in to post a comment.