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

Comment (by SimonKing):

 Replying to [comment:197 jdemeyer]:
 > Replying to [comment:196 SimonKing]:
 > > One more reason for using "int" as return type: If I use `mp_limb_t`,
 then `6` is printed as `6L`.
 > That's not one more reason to use `int`, it's one less reason to use
 `mp_limb_t`. With `mp_limb_signed_t` (which isn't declared but should be
 in `src/sage/libs/gmp/types.pxd`), you shouldn't have this problem.

 There may be a problem with either `int` or `mp_limb_signed_t`: If the
 bound for the integer sequence is very large, then a single item would
 fill a whole `mp_limb_t`. However, this would not fit into a ''signed''
 int/limb.

 So, at the moment, it seems to me that `ctypedef mp_limb_t biseq_item_t`
 is preferred. Since the `__repr__` method is not time-critical, I suggest
 to do the transformation from `mp_limb_t` to a nicely printed type there.
 I would accept that `__getitem__` returns something that is not so nicely
 printed.

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