#11403: NTL error while inverting q-adic number with fixed modulus precision
---------------------------------------------+------------------------------
       Reporter:  jdemeyer                   |         Owner:  was         
           Type:  defect                     |        Status:  needs_review
       Priority:  major                      |     Milestone:  sage-5.4    
      Component:  padics                     |    Resolution:              
       Keywords:                             |   Work issues:              
Report Upstream:  N/A                        |     Reviewers:              
        Authors:  Jeroen Demeyer, David Roe  |     Merged in:              
   Dependencies:                             |      Stopgaps:              
---------------------------------------------+------------------------------
Changes (by saraedum):

  * status:  needs_work => needs_review


Old description:

> {{{
> sage: R.<t> = Zq(8,2,'fixed-mod')
> sage: 1/(t+t^2)
> ...
> Unhandled SIGABRT: An abort() occurred in Sage.
> }}}
>
> Note that {{{t + t^2}}} is invertible:
> {{{
> sage: R.<t> = Zq(8,2,'fixed-mod')
> sage: u = (t+1) + 2*t^2; u
> (t + 1) + t^2*2 + O(2^2)
> sage: u * (t + t^2)
> 1 + O(2^2)
> }}}
>
> Part of the issue is a missing {{{sig_on()}}}/{{{sig_off()}}}.
> After applying [attachment:11403_sig.patch], the error becomes more
> descriptive:
> {{{
> sage: R.<t> = Zq(8,2,'fixed-mod')
> sage: 1/(t+t^2)
> ---------------------------------------------------------------------------
> RuntimeError                              Traceback (most recent call
> last)
>
> /usr/local/src/sage-4.7/devel/sage-main/<ipython console> in <module>()
>
> /usr/local/src/sage-4.7/local/lib/python2.6/site-
> packages/sage/structure/element.so in
> sage.structure.element.RingElement.__div__
> (sage/structure/element.c:12757)()
>
> /usr/local/src/sage-4.7/local/lib/python2.6/site-
> packages/sage/structure/coerce.so in
> sage.structure.coerce.CoercionModel_cache_maps.bin_op
> (sage/structure/coerce.c:6436)()
>
> /usr/local/src/sage-4.7/local/lib/python2.6/site-
> packages/sage/structure/element.so in
> sage.structure.element.RingElement.__div__
> (sage/structure/element.c:12731)()
>
> /usr/local/src/sage-4.7/local/lib/python2.6/site-
> packages/sage/rings/padics/padic_ZZ_pX_FM_element.so in
> sage.rings.padics.padic_ZZ_pX_FM_element.pAdicZZpXFMElement._div_
> (sage/rings/padics/padic_ZZ_pX_FM_element.cpp:6781)()
>
> RuntimeError: ZZ_p: division by non-invertible element
> }}}
>
> -----
>
> Apply
>
> 1. [[attachment:11403_sig.patch]]
> 1. [[attachment:11403_fix.patch]]
>
> to the sage repository.

New description:

 {{{
 sage: R.<t> = Zq(8,2,'fixed-mod')
 sage: 1/(t+t^2)
 ...
 Unhandled SIGABRT: An abort() occurred in Sage.
 }}}

 Note that {{{t + t^2}}} is invertible:
 {{{
 sage: R.<t> = Zq(8,2,'fixed-mod')
 sage: u = (t+1) + 2*t^2; u
 (t + 1) + t^2*2 + O(2^2)
 sage: u * (t + t^2)
 1 + O(2^2)
 }}}

 Part of the issue is a missing {{{sig_on()}}}/{{{sig_off()}}}.
 After applying [attachment:11403_sig.patch], the error becomes more
 descriptive:
 {{{
 sage: R.<t> = Zq(8,2,'fixed-mod')
 sage: 1/(t+t^2)
 ---------------------------------------------------------------------------
 RuntimeError                              Traceback (most recent call
 last)

 /usr/local/src/sage-4.7/devel/sage-main/<ipython console> in <module>()

 /usr/local/src/sage-4.7/local/lib/python2.6/site-
 packages/sage/structure/element.so in
 sage.structure.element.RingElement.__div__
 (sage/structure/element.c:12757)()

 /usr/local/src/sage-4.7/local/lib/python2.6/site-
 packages/sage/structure/coerce.so in
 sage.structure.coerce.CoercionModel_cache_maps.bin_op
 (sage/structure/coerce.c:6436)()

 /usr/local/src/sage-4.7/local/lib/python2.6/site-
 packages/sage/structure/element.so in
 sage.structure.element.RingElement.__div__
 (sage/structure/element.c:12731)()

 /usr/local/src/sage-4.7/local/lib/python2.6/site-
 packages/sage/rings/padics/padic_ZZ_pX_FM_element.so in
 sage.rings.padics.padic_ZZ_pX_FM_element.pAdicZZpXFMElement._div_
 (sage/rings/padics/padic_ZZ_pX_FM_element.cpp:6781)()

 RuntimeError: ZZ_p: division by non-invertible element
 }}}

 -----

 Apply

 1. [[attachment:trac_11403.patch]]

 to the sage repository.

--

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