#7949: Bit-shifts in Z/(n)
--------------------------------+-------------------------------------------
Reporter: spancratz | Owner: spancratz
Type: defect | Status: new
Priority: minor | Milestone: sage-4.3.1
Component: basic arithmetic | Keywords: bit shift, integer mod ring
Work_issues: | Author: spancratz
Upstream: N/A | Reviewer:
Merged: |
--------------------------------+-------------------------------------------
Comment(by spancratz):
For each of the three types for moduli (32-bit, 64-bit, mpz_t), the patch
provides a method ``shift``, which in turns is called by the methods
``__lshift__`` and ``__rshift__``.
Finally, in the previous code the doctests with modulus `2^{31}-1` did not
test any of the 64-bit code because of code in the method ``def
__init__(NativeIntStruct self, sage.rings.integer.Integer z)`` in the file
``integer_mod.pyx``. There, a comparisons were carried out with ``<``
rather than ``<=``, which this patch changes, too.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/7949#comment:2>
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 post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sage-trac?hl=en.