You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Disclaimer: I'm no Mathematician; Just a random programmer that stumbled on this repo while looking for an EllipticE implementation to use with Ellipses.
I noticed that if the m is passed into EllipticE is 1, as in the case when solving for the Perimeter of an Ellipse with a SemiMinor axis of 0 (or very close to it), the function can fail to converge in time despite the result being trivial.
In my implementation I added a check for the same epsilon you used to verify an-gn in the while loop:
I'm not sure if any similar checks could be added to avoid unnecessarily iterations in cases where we know what the answer should be, or if my approach here was even valid, but it resolved an edge case for me at least.
The text was updated successfully, but these errors were encountered:
Disclaimer: I'm no Mathematician; Just a random programmer that stumbled on this repo while looking for an EllipticE implementation to use with Ellipses.
I noticed that if the
m
is passed intoEllipticE
is 1, as in the case when solving for the Perimeter of an Ellipse with a SemiMinor axis of 0 (or very close to it), the function can fail to converge in time despite the result being trivial.In my implementation I added a check for the same epsilon you used to verify
an-gn
in the while loop:I'm not sure if any similar checks could be added to avoid unnecessarily iterations in cases where we know what the answer should be, or if my approach here was even valid, but it resolved an edge case for me at least.
The text was updated successfully, but these errors were encountered: