#10272: laurent series truncate behaviour different from power series truncate
-----------------------------------+----------------------------------------
Reporter: tkluck | Owner: malb
Type: defect | Status: new
Priority: minor | Milestone:
Component: commutative algebra | Keywords: laurent series, truncate
Author: Timo Kluck | Upstream: N/A
Reviewer: | Merged:
Work_issues: |
-----------------------------------+----------------------------------------
There is the following difference in behaviour between truncate() for
power series and laurent series:
sage: P.<p> = PowerSeriesRing(QQ)
sage: L.<l> = LaurentSeriesRing(QQ)
sage: f = p^2 + p^3 + p^5 +p^6 + O(p^7)
sage: g = l^2 + l^3 + l^5 +l^6 + O(l^7)
sage: f.truncate(6)
p^5 + p^3 + p^2
sage: g.truncate(6)
l^2 + l^3 + l^5 + O(l^6)
sage: f.truncate_powerseries(6)
p^2 + p^3 + p^5 + O(p^6)
The problem is simply that g.truncate() calls truncate_powerseries() on
its underlying power series.
The attached patch changes LaurentSeries.truncate() such that is calls
truncate() on the underlying powerseries. For the current behaviour, it
also adds a method truncate_laurentseries() which calls
truncate_powerseries() on the underlying powerseries.
In my opinion, the methods truncate_powerseries and truncate_laurentseries
are superfluous since they are equivalent to add_bigoh().
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/10272>
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.