Opened 12 years ago

Last modified 10 years ago

#10272 closed defect

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

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


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 = p2 + p3 + p5 +p6 + O(p7) sage: g = l2 + l3 + l5 +l6 + O(l7) sage: f.truncate(6) p5 + p3 + p2 sage: g.truncate(6) l2 + l3 + l5 + O(l6) sage: f.truncate_powerseries(6) p2 + p3 + p5 + O(p6)

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

Note: See TracTickets for help on using tickets.