#20062: Make _floordiv_() for power series a deprecated alias for _div_()
-------------------------------------+-------------------------------------
Reporter: pbruin | Owner:
Type: task | Status: needs_review
Priority: minor | Milestone: sage-7.1
Component: algebra | Resolution:
Keywords: | Merged in:
Authors: Peter Bruin | Reviewers:
Report Upstream: N/A | Work issues:
Branch: | Commit:
u/pbruin/20062-PowerSeries_floordiv| e9719f7399ffab100407a360c16fe0596e7f2689
Dependencies: | Stopgaps:
-------------------------------------+-------------------------------------
Comment (by bruno):
Replying to [comment:7 pbruin]:
> After thinking about this a bit more, it still seems meaningful to me to
have an operator `//` that is different from `/`, and that returns the
"Euclidean" quotient in the case of power series over a field. (I am not
sure what to do for power series over '''Z''', for example).
>
> However, both to warn users and because the "correct" `//` seems to be
non-trivial to implement, it is probably good to start by deprecating the
current behaviour where `//` behaves identically to `/`. Hence I am
setting this ticket back to "needs review" and propose to do the
"meaningful" reimplementation of `//` at a later time.
Note that there exists a method `quo_rem` for `DiscreteValuationRing`s
which works. Thus it should be possible to use it to get a method
`__floordiv__`. I am not sure to understand the subtleties described in
comment:5 and comment:6, but at least there is some working code. For
instance:
{{{#!python
sage: R.<x> = QQ[[]]
sage: R(1).quo_rem(1+t)
(1 - t + t^2 - t^3 + t^4 - t^5 + t^6 - t^7 + t^8 - t^9 + t^10 - t^11 +
t^12 - t^13 + t^14 - t^15 + t^16 - t^17 + t^18 - t^19 + O(t^20),
0)
}}}
--
Ticket URL: <http://trac.sagemath.org/ticket/20062#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 https://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.