#16649: Make `quo_rem` give answers more often
------------------------------------+------------------------
Reporter: bruno | Owner:
Type: defect | Status: new
Priority: major | Milestone: sage-6.3
Component: basic arithmetic | Resolution:
Keywords: quo_rem | Merged in:
Authors: | Reviewers:
Report Upstream: N/A | Work issues:
Branch: | Commit:
Dependencies: | Stopgaps:
------------------------------------+------------------------
Comment (by bruno):
My proposition is as follows (say for the method `quo_rem` of the `class
Polynomial_generic_dense`):
- Remove the test
{{{#!python
if not other.leading_coefficient().is_unit():
raise ArithmeticError("Nonunit leading coefficient")
}}}
on lines 7484-7485 of `sage/rings/polynomial/polynomial_element.pyx`.
- Change the line 7999 (`q = x[n+k-1]/y[n-1]`) by the following:
{{{#!python
try:
q = R(x[n+k-1]/y[n-1])
except TypeError:
raise ArithmeticError("Division not exact (consider
coercing to polynomial over the fraction field first")
}}}
Does the change make sense?
--
Ticket URL: <http://trac.sagemath.org/ticket/16649#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 http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.