#15625: Refactor Lucas sequence code
------------------------------------+------------------------
       Reporter:  jpflori           |        Owner:
           Type:  enhancement       |       Status:  new
       Priority:  major             |    Milestone:  sage-6.3
      Component:  basic arithmetic  |   Resolution:
       Keywords:  lucas sequence    |    Merged in:
        Authors:                    |    Reviewers:
Report Upstream:  N/A               |  Work issues:
         Branch:                    |       Commit:
   Dependencies:                    |     Stopgaps:
------------------------------------+------------------------

Comment (by rws):

 Actually, both `lucas_number1` and `lucas_number2` are broken:
 {{{
 sage: lucas_number1(100000,1,-1)
   File "<string>", line 1
     <integer 259Ellipsis875 (Integer(20899) digits)>
     ^
 SyntaxError: invalid syntax
 }}}
 Both are 2.5x slower than the general `CFiniteSequence` (#15714), so could
 now easily replaced by that. Using `lucas` fails at the moment with
 {{{
 sage: lucas(10,1,-1)[0]
 ---------------------------------------------------------------------------
 ValueError                                Traceback (most recent call
 last)
 <ipython-input-60-18e5b8011bbf> in <module>()
 ----> 1 lucas(Integer(10),Integer(1),-Integer(1))[Integer(0)]

 /home/ralf/sage/local/lib/python2.7/site-
 packages/sage/rings/finite_rings/integer_mod.so in
 sage.rings.finite_rings.integer_mod.lucas
 (sage/rings/finite_rings/integer_mod.c:34263)()

 ValueError:
 }}}
 which is a bit odd because there is no reason why it shouldn't work.

--
Ticket URL: <http://trac.sagemath.org/ticket/15625#comment:7>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.

Reply via email to