Opened 12 years ago

Last modified 10 years ago

#10272 closed defect

laurent series truncate behaviour different from power series truncate — at Version 1

Reported by: tkluck Owned by: malb
Priority: minor Milestone: sage-5.1
Component: commutative algebra Keywords: laurent series, truncate sd40.5
Cc: Merged in:
Authors: Timo Kluck Reviewers:
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Status badges

Description (last modified by tkluck)

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().

Change History (1)

comment:1 Changed 12 years ago by tkluck

  • Description modified (diff)
Note: See TracTickets for help on using tickets.