#19904: Segfault in SR(QQbar)
-----------------------------+------------------------
Reporter: vbraun | Owner:
Type: defect | Status: new
Priority: major | Milestone: sage-7.0
Component: symbolics | Resolution:
Keywords: | Merged in:
Authors: | Reviewers:
Report Upstream: N/A | Work issues:
Branch: | Commit:
Dependencies: | Stopgaps:
-----------------------------+------------------------
Comment (by vbraun):
This is obviously so because QQbar and !NumberField don't interoperate
{{{
sage: K.<a> = NumberField(x^2+1, embedding=CC.gen())
sage: QQbar.gen() + a
---------------------------------------------------------------------------
TypeError Traceback (most recent call
last)
<ipython-input-22-662328c835b1> in <module>()
----> 1 QQbar.gen() + a
/home/vbraun/Code/sage/src/sage/structure/element.pyx in
sage.structure.element.RingElement.__add__
(/home/vbraun/Code/sage/src/build/cythonized/sage/structure/element.c:15852)()
1649 elif PyInt_CheckExact(left):
1650 return
(<RingElement>right)._add_long(PyInt_AS_LONG(left))
-> 1651 return coercion_model.bin_op(left, right, add)
1652
1653 cdef RingElement _add_long(self, long n):
/home/vbraun/Code/sage/src/sage/structure/coerce.pyx in
sage.structure.coerce.CoercionModel_cache_maps.bin_op
(/home/vbraun/Code/sage/src/build/cythonized/sage/structure/coerce.c:9736)()
1067 # We should really include the underlying error.
1068 # This causes so much headache.
-> 1069 raise TypeError(arith_error_message(x,y,op))
1070
1071 cpdef canonical_coercion(self, x, y):
TypeError: unsupported operand parent(s) for '+': 'Algebraic Field' and
'Number Field in a with defining polynomial x^2 + 1'
}}}
Still, pynac should just raise that exception and not crash.
--
Ticket URL: <http://trac.sagemath.org/ticket/19904#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 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.