#11239: Incorrect coercion of polynomials over finite fields
-------------------------------------+-------------------------------------
Reporter: johanbosman | Owner: robertwb
Type: defect | Status: needs_info
Priority: major | Milestone: sage-6.1
Component: coercion | Resolution:
Keywords: finite fields, | Merged in:
polynomials, coercion, sd53 | Reviewers: Jean-Pierre Flori
Authors: Peter Bruin | Work issues:
Report Upstream: N/A | Commit:
Branch: | 236effb6198c6192dce0cedc0e53423c68743e3e
u/jpflori/ticket/11239 | Stopgaps:
Dependencies: #8335 |
-------------------------------------+-------------------------------------
Comment (by nbruin):
Replying to [comment:27 SimonKing]:
> No!! It is just the other way around! Ideally, you have a fast cheap
stupid conversion, and then a potentially expensive tests tells you
whether this conversion qualifies as a coercion. This, by the way, is
exactly what happens when `R._coerce_map_from_(S)` returns True: The
return value asserts that the conversion qualifies as a coercion.
Actually, that is something I wondered about before. From an efficiency
point of view this is a really bad idea: we have just established that
between two very specific parents S and R there exists a coercion and to
actually perform it we boot back to completely generic code that has to
figure out exactly what conversion to apply, doing all kinds of type
checks again. It would seem much better to refactor such code to
immediately call the special case that the conversion code is going to
arrive at anyway.
--
Ticket URL: <http://trac.sagemath.org/ticket/11239#comment:29>
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.