#16649: Make `quo_rem` give answers more often
--------------------------------+----------------------------
Reporter: bruno | Owner:
Type: defect | Status: new
Priority: major | Milestone: sage-6.3
Component: basic arithmetic | Keywords: quo_rem
Merged in: | Authors:
Reviewers: | Report Upstream: N/A
Work issues: | Branch:
Commit: | Dependencies:
Stopgaps: |
--------------------------------+----------------------------
In generic implementations of `f.quo_rem(g)`, an exception
{{{#!python
ArithmeticError: Nonunit leading coefficient
}}}
is raised as soon as the leading coefficient of `g` is not invertible.
This was introduced by ticket #11593, and I mimicked the behavior in
#16544.
The change I propose is to try to compute the Euclidean division, and
raise an exception
{{{#!python
ArithmeticError: division not exact (consider coercing to polynomials over
the fraction field first)
}}}
when the computation is not possible. Then, `quo_rem` would produce less
exceptions, and in particular give an answer each time the answer is not
controversial (see below).
'''Note on the controverse.''' There is a debate to know whether one
should raise an exception when the division is not exact (as it is done
for dense integer polynomials with the `NTL` implementation), or if one
should silently return a result that has a mathematical meaning though it
is not a Euclidean division (as it is done with the `flint`
implementation). See #16276 as well as https://groups.google.com/d/msg
/sage-devel/UVrx5CG4qA0/WUz2RItJtF8J for this debate. My proposition is to
already implement a more capable algorithm, and not to wait for the debate
to be closed.
--
Ticket URL: <http://trac.sagemath.org/ticket/16649>
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.