-
-
Notifications
You must be signed in to change notification settings - Fork 557
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve support for Jacobi elliptic functions #14996
Comments
comment:1
Attachment: trac14996.patch.gz The patch rewrites the Jacobi functions as standard symbolic functions. I wrote a new numerical routine for the inverse Jacobi functions, since it didn't seem to be available elsewhere. I've also added the Jacobi amplitude function. |
comment:4
I hope you don't mind me CC'ing you. In this patch I add the functions |
comment:5
Sure, they could be added to a future version. I never even tried to implement them because it seemed like too much work to figure out all the case distinctions and writing test code for branch cuts. You seem to restrict the code to real arguments, which makes things easier and probably makes a good enough start. |
comment:6
Ah, good. Should I submit a pull request on GitHub or something? The reason I used real numbers for the inverse Jacobi is because it was a pain to get continuity otherwise. For the amplitude function, it's defined in the DLMF for real numbers (http://dlmf.nist.gov/22.16). |
comment:7
Sure, you're very welcome to supply a patch if you have time. Better put this code in Sage now though, and then perhaps replace it with calls to mpmath in the future (can't guarantee when the next release of mpmath will happen, regrettably). |
comment:8
Thanks, I will do so when I have time. New patch fixes two bugs. |
Attachment: trac14996_2.patch.gz |
comment:9
New patch rebases to Sage 5.11, gets coverage to 100%, adds tons of new tests, and makes all Python Please don't be worried about the length of the patch, much of it derives from identities and tests. Since there are 12 Jacobi elliptic functions and all their inverses, this adds up to a lot. Patchbot apply trac14996_3.patch |
comment:10
Attachment: trac14996_3.patch.gz I did some tests, and the doctest for plot/line.py failed (it tries to plot a Jacobi elliptic function at line 413 and this goes awry in trying to convert a complex number which is very close into a real number to a real number). A small issue is that perhaps I'm new to sage, apologies for the inanity of my comments. |
comment:11
No, they're not inane at all! Thanks for the comments, they bring up important issues to fix. You're right about the doctest and the need to raise an error; the As for the |
comment:12
New patch fixes doctests, adds errors when an invalid Jacobi function name is given, and updates LaTeX conversions to follow the convention of using | as the parameter delimiter. Patchbot apply trac14996_4.patch |
Attachment: trac14996_4.patch.gz |
Branch: u/rws/ticket/14996 |
Commit: |
comment:15
I think this is fine. It tests --long OK in functions/ and builds all docs. The docs look good too. The branch is on top of 6.2.beta2. Author copied from patch header. New commits:
|
Reviewer: Ralf Stephan |
Author: Eviatar Bach |
comment:17
Fails with
Possibly due to the pynac update which I merged first #15198 |
comment:18
Presumably due to the simultaneously-merged and related #14778, but same difference - I am sure Eviatar can update for this very easily. |
comment:19
I've fixed the failing doctests and doc did not build, so I fixed that as well. I also did some formatting cleanup of the doc (while I was reading it over trying to find the docbuild issues). New commits:
|
Changed reviewer from Ralf Stephan to Ralf Stephan, Travis Scrimshaw |
Changed branch from u/rws/ticket/14996 to u/tscrim/14996 |
Changed branch from u/tscrim/14996 to |
Currently, all evaluation (numeric and symbolic) of the Jacobi elliptic functions is done through Maxima. No derivatives or arbitrary-precision numeric evaluation are defined. Worse still, the Maxima numerical evaluation is wrong for some of the inverse Jacobi functions; see https://sourceforge.net/p/maxima/bugs/2615/.
CC: @burcin @kcrisman @benjaminfjones @fredrik-johansson
Component: symbolics
Author: Eviatar Bach
Branch/Commit:
6df0d14
Reviewer: Ralf Stephan, Travis Scrimshaw
Issue created by migration from https://trac.sagemath.org/ticket/14996
The text was updated successfully, but these errors were encountered: