#15653: Trac 12555 broke conversion of zero p-adics to PARI
------------------------+----------------------------
   Reporter:  jdemeyer  |            Owner:
       Type:  defect    |           Status:  new
   Priority:  blocker   |        Milestone:  sage-6.1
  Component:  padics    |         Keywords:
  Merged in:            |          Authors:
  Reviewers:            |  Report Upstream:  N/A
Work issues:            |           Branch:
     Commit:            |     Dependencies:
   Stopgaps:            |
------------------------+----------------------------
 Zero p-adics should have `precp=0`, so this is wrong:
 {{{
 sage: ZpFM(3,10)(0)._pari_().debug()
 [&=00000000040368d0] PADIC(lg=5):0e00000000000005
 (precp=10,valp=0):0002a00000000000 00000000040368b8 00000000040368a0
 0000000004036890
     p : [&=00000000040368b8] INT(lg=3):0200000000000003
 (+,lgefint=3):4000000000000003 0000000000000003
   p^l : [&=00000000040368a0] INT(lg=3):0200000000000003
 (+,lgefint=3):4000000000000003 000000000000e6a9
     I : [&=0000000004036890] INT(lg=2):0200000000000002
 (0,lgefint=2):0000000000000002
 }}}

 This causes for example the following discriminant to be wrong:
 {{{
 sage: x = polygen(ZpFM(3,10))
 sage: (x^3+x+1)._pari_().poldisc()
 2 + 3 + 2*3^2 + 2*3^3 + 2*3^4 + 2*3^5 + 2*3^6 + 2*3^7 + 2*3^8 + 2*3^9 +
 O(3^10)
 sage: (x^3+x+1).discriminant()
 2 + 3 + 2*3^2 + 3^3 + 2*3^4 + 2*3^5 + 2*3^6 + 2*3^7 + 2*3^8 + 2*3^9 +
 O(3^10)
 }}}

 Blocker because this is a serious regression caused by #12555.

--
Ticket URL: <http://trac.sagemath.org/ticket/15653>
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/groups/opt_out.

Reply via email to