#20935: Weird crash in arithmetic mod prime powers
---------------------------------+--------------------------------
       Reporter:  davidloeffler  |         Type:  defect
         Status:  new            |     Priority:  major
      Milestone:  sage-7.3       |    Component:  basic arithmetic
       Keywords:                 |    Merged in:
        Authors:                 |    Reviewers:
Report Upstream:  N/A            |  Work issues:
         Branch:                 |       Commit:
   Dependencies:                 |     Stopgaps:
---------------------------------+--------------------------------
 The following code crashes in Sage v7.2 with a !ZeroDivisionError:
 {{{
 V = FreeModule(Zmod(3^10), 1)
 v = V.gen(0)
 x = v * v
 x.valuation(3)
 }}}
 The variable x is just 1 (mod 3^10^), and if you just do {{{
 Zmod(3^10)(1).valuation(3)}}} it returns 0 (as it should), but creating it
 via linear algebra in this way seems to somehow return a broken object.

 Oddly enough, only powers of 3 between 3^10^ and 3^19^ (inclusive) seem to
 raise this error -- larger or smaller powers work fine. Similarly powers
 of 2 between 2^16^ and 2^30^, or powers of 5 between 5^7^ and 5^13^. This
 strongly suggests there is an overflow error occurring somewhere when the
 modulus is too large for a 16-bit integer but large enough for a 32-bit.

--
Ticket URL: <https://trac.sagemath.org/ticket/20935>
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 https://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.

Reply via email to