#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):

 Looking at the related methods for types ``IntegerMod_int``, note that
 {{{
     def __rshift__(IntegerMod_int self, int right):
         ...
         return self._new_c(self.ivalue >> right)
 }}}
 Here, the code ignores right shifts with negative values of ``right``, in
 which case one has to take the modulus.

 The patch (to be attached) will address this, too.

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


Reply via email to