-
-
Notifications
You must be signed in to change notification settings - Fork 482
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
fast implementation of exp #34611
Comments
Last 10 new commits:
|
Author: Martin Rubey |
This comment has been minimized.
This comment has been minimized.
Commit: |
Changed keywords from none to LazyPowerSeries |
comment:3
Here is a comparison:
|
Branch pushed to git repo; I updated commit sha1. New commits:
|
Dependencies: #34552 |
comment:6
There is a slight problem:
|
comment:7
This is not a problem if we use dense series (of course) - so there are at least three solutions:
|
comment:8
There is also another solution: Tell the user to compute some earlier coefficients:
However, I like option (2) the best because there is not a reasonable situation where we would not essentially end up computing all of the coefficients (ultimately in order):
|
comment:9
A similar technique works for computing the Cauchy inverse. |
comment:10
We might be able to limit the number of recursion calls by being careful about the order of multiplication too. |
comment:11
You mean All of this may also be affected by #34616. |
comment:12
Yes, that's right. Although since #34616 might only apply to the dense case, it might not be relevant to the issue we have with the sparse case. |
comment:13
What do you think about making This could be done either here or in #34636, which is ready for review. I could then make #34636 a dependency for this ticket. I could even do a doctest there, because the problem arises already with, for example, the implicit definition of the Catalan numbers:
|
comment:14
Replying to Martin Rubey:
+1
That would probably be better. |
Branch pushed to git repo; I updated commit sha1. Last 10 new commits:
|
comment:16
A fast algorithm for inversion can be found in van der Hoeven's paper, but is not completely trivial to implement, so it should be left for another ticket. |
comment:17
As an aside, it should be very easy to get rid of the duplicated cache in |
Reviewer: Travis Scrimshaw |
comment:18
Or on a separate ticket altogether. I think this is good to go for now as it greatly improves the performance (asymptotically; I didn't check for small values, but there is likely at worst a negligible difference). |
Changed branch from u/mantepse/fast_implementation_of_exp to |
Using the recursive definition
we can make the computation of the exponential almost the same as a single multiplication.
The drawback is that we do not benefit from the error handling in
compose
.Depends on #34552
Depends on #34636
CC: @tscrim
Component: combinatorics
Keywords: LazyPowerSeries
Author: Martin Rubey
Branch/Commit:
5020b9d
Reviewer: Travis Scrimshaw
Issue created by migration from https://trac.sagemath.org/ticket/34611
The text was updated successfully, but these errors were encountered: