#8671: FieldElement.quo_rem broken
--------------------------------+-------------------------------------------
Reporter: burcin | Owner: burcin
Type: defect | Status: needs_review
Priority: major | Milestone: sage-4.4.2
Component: basic arithmetic | Keywords:
Author: Burcin Erocal | Upstream: N/A
Reviewer: | Merged:
Work_issues: |
--------------------------------+-------------------------------------------
Comment(by burcin):
`_parent` is a cdef'd attribute. At the point this code is used, Cython
doesn't know that `right` is an `Element`, so it generates code to look
for a python attribute `_parent` which fails.
One solution would be to use a type cast by writing
`(<Element>right)._parent`, but we'd have to handle python types like
`int` manually before this. The function `parent()`, which in turn calls
`sage.structure.parent.parent_c` is used exactly for this purpose.
Calling parent_c directly would be faster, but that is not exported in
`sage/structure/parent.pxd`.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/8671#comment:3>
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.