#13048: __floordiv__ does not work when dividing polynomials over QQbar by a
constant
------------------------------------+---------------------------------------
Reporter: saraedum | Owner: AlexGhitza
Type: defect | Status: needs_review
Priority: trivial | Milestone: sage-5.1
Component: basic arithmetic | Resolution:
Keywords: sd40.5 | Work issues:
Report Upstream: N/A | Reviewers:
Authors: | Merged in:
Dependencies: #12404 | Stopgaps:
------------------------------------+---------------------------------------
Comment (by dsm):
Could you add some doctests to confirm that the floor division works as
you would expect it would by analogy with the integers, i.e. `(x//y)*y +
(x % y) == x?` [Possible typo there, haven't finished this coffee.] It
seems to:
{{{
sage: R.<x> = QQbar[]
sage: left = x*3+4
sage: y = x
sage: (left//y)*y + (left % y) == left
True
sage: y = 17
sage: (left//y)*y + (left % y) == left
True
sage: y = (2*x+7)
sage: (left//y)*y + (left % y) == left
True
}}}
If floor division wasn't working then there must not have been anything
testing stuff like this.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/13048#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.