#15820: Implement sequences of bounded integers
-------------------------------------+-------------------------------------
       Reporter:  SimonKing          |        Owner:
           Type:  enhancement        |       Status:  needs_review
       Priority:  major              |    Milestone:  sage-6.4
      Component:  algebra            |   Resolution:
       Keywords:  sequence bounded   |    Merged in:
  integer                            |    Reviewers:  Simon King
        Authors:  Simon King,        |  Work issues:
  Jeroen Demeyer                     |       Commit:
Report Upstream:  N/A                |  e9c779ae629dbec356bb8546e3974e2a67050051
         Branch:                     |     Stopgaps:
  u/SimonKing/ticket/15820           |
   Dependencies:  #17195, #17196     |
-------------------------------------+-------------------------------------

Comment (by jdemeyer):

 Replying to [comment:290 SimonKing]:
 > But you did `item_limb = item` without testing whether `item > bound`,
 which means that item_limb could end up ''below'' the bound.
 Not true because the assignment `item_limb = item` is a Python -> C
 conversion which is always checked:
 {{{
 sage: BoundedIntegerSequence(100, [2^256])
 ---------------------------------------------------------------------------
 OverflowError                             Traceback (most recent call
 last)
 <ipython-input-6-ba7f864a5712> in <module>()
 ----> 1 BoundedIntegerSequence(Integer(100), [Integer(2)**Integer(256)])

 /usr/local/src/sage-config/local/lib/python2.7/site-
 packages/sage/data_structures/bounded_integer_sequences.so in
 sage.data_structures.bounded_integer_sequences.BoundedIntegerSequence.__init__
 (build/cythonized/sage/data_structures/bounded_integer_sequences.c:7798)()

 /usr/local/src/sage-config/local/lib/python2.7/site-
 packages/sage/data_structures/bounded_integer_sequences.so in
 sage.data_structures.bounded_integer_sequences.biseq_init_list
 (build/cythonized/sage/data_structures/bounded_integer_sequences.c:5706)()

 OverflowError: long int too large to convert
 }}}
 (perhaps add this as doctest)

--
Ticket URL: <http://trac.sagemath.org/ticket/15820#comment:291>
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