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
special values of Bessel functions #17678
Comments
Author: Ralf Stephan |
New commits:
|
Commit: |
This comment has been minimized.
This comment has been minimized.
comment:3
I like the general idea of this ticket! What happens in the following scenario
for
should it instead return
|
comment:5
I guess I didn't internalize that it would fix all future problems with this, very nice. |
comment:6
These identities are also available (or derivable) from Wikipedia and Mathworld, so we are in good shape. Question: W|A claims that one has the complex infinity, not positive infinity, for some of the negative ones like Otherwise looks good. |
comment:7
Replying to @kcrisman:
I got those values from mpmath and just tried to post about that to the mpmath group, but not yet approved.
Ah, I missed that. It should be easily derived from |
comment:8
Yes, I figured - but should it be included? Sorry for not being clear. Did you hear back from Fredrik/mpmath? |
comment:9
Replying to @kcrisman:
Of course!
https://groups.google.com/forum/?hl=en#!topic/mpmath/FJqtBMNhYFo |
Dependencies: #17777 |
comment:11
This uncovered a bug so we depend on #17777 as soon as it is resolved. |
comment:13
There is a doctest fail in french_book that is not from #17777. |
Changed branch from u/rws/17678-1 to u/arminstraub/17678-1 |
comment:27
We stumpled across the issue that This is my first attempt at using git and I haven't used the trac server in many years, so please let me know if I messed something up or didn't follow best practices. The branch I pushed is supposed to be a merge with the most recent version of Sage, with the following additional changes:
Doctesting the 5 involved files didn't reveal any troubles. New commits:
|
Changed author from Ralf Stephan to Ralf Stephan, Armin Straub |
comment:28
Replying to @kcrisman:
Indeed, the behaviour for values of Bessel functions at zero is not consistent between symbolic and numeric input. The symbolic evaluations as provided by this ticket seem appropriate to me (and, as far as I have tested, also agree with the values that Mathematica produces). On the other hand, the numerical evaluation of Bessel functions is currently outsourced to I would suggest that resolving this inconsistency is better suited for a different ticket (or, if desired, changing the behaviour within |
comment:29
By the way, what is the preferred approach of Sage to the following? When the index of the Bessel functions is a half-integer, they can be written in terms of elementary functions. This is currently implemented for indices 1/2 and -1/2 only. Would it be desirable to likewise implement the case of general half-integer indices? Or, would it be better to leave, say, |
Changed reviewer from Karl-Dieter Crisman to Karl-Dieter Crisman, Ralf Stephan |
Changed dependencies from #17777 to none |
comment:30
Replying to @arminstraub:
Indeed, but the discussion focused a bit on the dependency on #17777, which I agree however does not exist, i.e. both issues are mutually independent. Your additions look fine, consider them reviewed. There is one failing doctest due to simplification in
This was not formalized up to now, the general behaviour was to give such conversions if the result is both more elementary and not very complicated. Full implementation can be done in a |
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:32
Thanks for your swift and helpful feedback! I have fixed the failing doctest (the entire example needed to be replaced). You also mentioned to use Since there was some choices to be made, I haven't set the ticket to positive review myself. Could you please have a quick look! |
comment:33
On the other hand, wouldn't it be convenient to have a global function
One place for such a function could be Do you think it would be a good idea to have something like that? If so, should a ticket be opened for that? |
comment:34
Replying to @arminstraub:
No, that calls
Well that misses the
Try opening a ticket, but see also #17158 |
Changed branch from u/arminstraub/17678-1 to public/17678 |
comment:36
No, that actually works. What's odd is that I get now an error in New commits:
|
Changed reviewer from Karl-Dieter Crisman, Ralf Stephan to Karl-Dieter Crisman, Ralf Stephan, Armin Straub |
comment:37
Looks good! Set to positive review. Replying to @rwst:
Yes, I was initially worried about that, too, when following the hypergeometric implementation.
Your solution seems fine. I am seeing the same spurious behavior when running the test versus running the code in a notebook.
Oops, you are right! Definitely not a brief and convenient substitute for |
Changed branch from public/17678 to |
At the moment everything Bessel is sent to mpmath and returns floating point but In(0) and Jn(0) are in (0,1). Also all I/J/K/Yn(x) with n in (-1/2,1/2) is a simple expression.
For the latter see p.10 of
http://www.math.psu.edu/papikian/Kreh.pdf
This allows exact computation of series:
CC: @fchapoton @fredrik-johansson
Component: symbolics
Author: Ralf Stephan, Armin Straub
Branch/Commit:
362c02d
Reviewer: Karl-Dieter Crisman, Ralf Stephan, Armin Straub
Issue created by migration from https://trac.sagemath.org/ticket/17678
The text was updated successfully, but these errors were encountered: