- Sponsor
-
Notifications
You must be signed in to change notification settings - Fork 580
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
Refactor Lucas sequence code #15625
Comments
comment:1
However something else that might be useful is a class attribute in +1 for 3) with perhaps a minor variation: call the argument something like Overall I think what's best is one function which has the Best, Travis |
comment:2
Travis,
I proposed Paul |
comment:4
A more general handling for |
comment:7
Actually, both
Both are 2.5x slower than the general
which is a bit odd because there is no reason why it shouldn't work. |
comment:8
Actually that's something with the interface between gap and Sage and not handling "large" numbers:
|
comment:9
Also for the second one, it's in |
As pointed by Paul Zimmerman in #11802 comment:16, the Lucas sequence which has been finally sped up and generalized in #11802, needs serious refactoring:
it makes no sense to have a
slow_lucas
and afast_lucas
function. The philosophy in Sage is to usealgorithm='recurrence'
oralgorithm='matrix_exponentiation'
instead (for example).I don't see why the case Q<>1 could not be implemented either by the recurrence or the matrix
exponentiation.
instead of separate functions for ZZ and IntegerModRing(n), it would be nicer to have a single function with an option
ring=ZZ
(default) andring=IntegerModRing(15)
.CC: @tscrim @zimmermann6 @rwst
Component: basic arithmetic
Keywords: lucas sequence
Issue created by migration from https://trac.sagemath.org/ticket/15625
The text was updated successfully, but these errors were encountered: