#16276: fixes PolynomialElement.mod()
-------------------------------------+-------------------------------------
Reporter: Bouillaguet | Owner:
Type: defect | Status: needs_review
Priority: major | Milestone: sage-6.2
Component: basic arithmetic | Resolution:
Keywords: | Merged in:
Authors: Charles | Reviewers:
Bouillaguet | Work issues:
Report Upstream: N/A | Commit:
Branch: | 07221cbd32a822e7d4ba40762bcf843a10a6c715
u/Bouillaguet/ticket/16276 | Stopgaps:
Dependencies: |
-------------------------------------+-------------------------------------
Comment (by Bouillaguet):
It turns out that {{{quo_rem}}} does not always have the same
specification (which seems bad in my opinion). Examples :
{{{
sage: R.<X> = ZZ[]
sage: (2*X^2 + 3*X + 1).quo_rem(2*X + 1)
(X + 1, 0)
}}}
So, here, Sage "silently" performs a partial reduction.
{{{
sage: RR.<Y> = R[]
RR.random_element().quo_rem((3*X+1)*Y + X + 2)
---------------------------------------------------------------------------
Traceback (most recent call last)
...
ArithmeticError: Nonunit leading coefficient
}}}
And indeed, the "generic polynomial" quo_rem (as in
src/sage/ring/polynomial/polynomial_element.pyx) advertises that an
arithmetic exception shall be raised when a division by a non-monic
polynomial is attempted).
--
Ticket URL: <http://trac.sagemath.org/ticket/16276#comment:8>
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/d/optout.