JacobiElliptic is an implementation of Toshio Fukushima's & Billie C. Carlson's for calculating Elliptic Integrals and Jacobi Elliptic Functions.
The defaul algorithms are set to the Carlson algorithms.
For the specific value of phi=1.57079632 and m=0 in JacobiElliptic.E(phi, m), ForwardDiff outputs NaNs in the partial derivatives.
Here's a minimum working example:
using JacobiElliptic
using ForwardDiff
phi =1.57079632
m =0.0func(x) = JacobiElliptic.E(x[1], x[2])
x = [phi, m]
ForwardDiff.gradient(func, x)
EllipticFunctions.ellipticE() reports this gradient to be [1.0, 0.0]
Is this fixable?
This issue is used to trigger TagBot; feel free to unsubscribe.
If you haven't already, you should update your TagBot.yml to include issue comment triggers.
Please see this post on Discourse for instructions and more details.
If you'd like for me to do this for you, comment TagBot fix on this issue.
I'll open a PR within a few hours, please be patient!