-
-
Notifications
You must be signed in to change notification settings - Fork 488
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
Some special functions don't work with arbitrary precision #9263
Comments
comment:1
one solution would be to use mpmath:
|
comment:3
There appear to be two different problems related to numerical evaluation with Maxima. First, that some functions are locked to float precision. In Maxima:
I think it's returning unevaluated because Other functions do know how to operate on
But, the interface is losing precision:
This is because Maxima truncates to float precision:
One way of avoiding this is converting to an exact rational and passing it to |
comment:4
I believe the "correct" solution (for Sage) for now is to use #12455 and mpmath for (at least default) evaluation. I've cc:ed you on that ticket. |
comment:5
Oh, thank you. I guess there's not much use working on the Maxima problems when mpmath works well. I'll change this ticket to apply to all Maxima-evaluated functions. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
comment:8
That is a good change. However, we don't have that many of those left, and so probably it will have to wait until we reliably have a keyword for evaluation algorithm. |
comment:9
Maybe there is a way to sense whether we are passing in something other than regular precision and then ask Maxima to use a bfloat. |
comment:10
Do you mean #12289? What would be the problem with changing the backend before that's implemented though? Actually, this ticket applies to many more functions than I thought initially. I added them to the description. I also changed it again to apply to all special functions that don't work with arbitrary precision. |
This comment has been minimized.
This comment has been minimized.
comment:11
No problem at all, I just meant that it would make more sense to switch them to mpmath first, and then worry about getting Maxima to have the right precision after that ticket. Though I guess even spherical Bessel hasn't been implemented in mpmath yet... |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
comment:15
about Paul |
This comment has been minimized.
This comment has been minimized.
comment:16
Paul |
comment:20
Works for me. |
Reviewer: Jeroen Demeyer |
comment:22
The others work properly. |
comment:23
And the issue with |
comment:24
with Sage 6.0 I get:
Maybe a regression? |
comment:25
is the issue with
|
comment:26
Well, Sage 6.0 is ancient. With 6.7.beta4:
and
|
comment:27
Note that Maxima functions we didn't usually have a good precision interface with, if that is what is going on with the hgu. |
Clearly the last digits are wrong. This is due to Maxima; currently we are not giving it bigfloats, and in any case some of the functions don't work with arbitrary precision.
The following functions should be changed to a different default backend (mpmath probably):
airy_ai
andairy_bi
(will be fixed with Make Airy functions symbolic #12455)spherical_bessel_J
(it also has a SciPy option, but it also truncates the precision)spherical_bessel_Y
(same asspherical_bessel_J
)spherical_harmonic
spherical_hankel1
andspherical_hankel2
hypergeometric_U
(PARI is implemented and works with arbitrary precision, but it's not the default)bessel_K
andbessel_Y
(now fixed with make bessel_J symbolic #4102)inverse_jacobi
CC: @eviatarbach
Component: numerical
Reviewer: Jeroen Demeyer
Issue created by migration from https://trac.sagemath.org/ticket/9263
The text was updated successfully, but these errors were encountered: