[SciPy-Dev] New pull request, fixing ellipj
Adam
Former at physicist.net
Sun Mar 11 23:57:57 EDT 2018
Hello everybody,
I've submitted a pull request (8548) to fix issue 8480. The problem
here was that whenever m was near 1.0 and u>K, ellipj was producing
wildly inaccurate values. (Note that K=ellipk(m), the quarter-period).
This was caused by the underlying formula used by the implementation
(16.15.4 from Abramowitz and Stegun) that was only valid when phi<pi/2
or u<K. As the original poster (vasilevgmaslov) noted, this method can
still be easily applied if we use the periodic properties of the
elliptic functions to 'unwind' the phi and only apply 16.15.4 to the
principal part or remainder part of phi that is between 0 and pi/2.
It was relatively easy for me implement this method and the results
agree well with what mpmath returns.
I am pinging the dev list just to see if anyone thinks there is any
major problem with this fix and to request that this fix gets merged
into the main repo.
Thank you!
Adam
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/scipy-dev/attachments/20180311/8fac2ff9/attachment.html>
More information about the SciPy-Dev
mailing list