#11403: Segfault while inverting q-adic number with fixed modulus precision
-----------------------------+----------------------------------------------
Reporter: jdemeyer | Owner: was
Type: defect | Status: new
Priority: major | Milestone: sage-4.7.1
Component: number theory | Keywords:
Work_issues: | Upstream: N/A
Reviewer: | Author:
Merged: | Dependencies:
-----------------------------+----------------------------------------------
Changes (by jdemeyer):
* owner: tbd => was
* component: packages => number theory
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)
> }}}
>
> There seem to be two issues:
>
> * There is a missing {{{sig_on()}}}/{{{sig_off()}}}.
>
> * NTL does not want to invert the invertible `t + t^2`.
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
}}}
--
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/11403#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.