-
-
Notifications
You must be signed in to change notification settings - Fork 660
Closed
Milestone
Description
sage: R.<x> = PowerSeriesRing(SR)
sage: var('y')
y
sage: ex=1/(1-y)
sage: ex.series(y,20)
1 + 1*y + 1*y^2 + 1*y^3 + 1*y^4 + 1*y^5 + 1*y^6 + 1*y^7 + 1*y^8 + 1*y^9 + 1*y^10 + 1*y^11 + 1*y^12 + 1*y^13 + 1*y^14 + 1*y^15 + 1*y^16 + 1*y^17 + 1*y^18 + 1*y^19 + Order(y^20)
sage: s=R(_); s
1 + y + y^2 + y^3 + y^4 + y^5 + y^6 + y^7 + y^8 + y^9 + y^10 + y^11 + y^12 + y^13 + y^14 + y^15 + y^16 + y^17 + y^18 + y^19 + Order(y^20)
sage: type(s)
<type 'sage.rings.power_series_poly.PowerSeries_poly'>
sage: s.list()
[1 + 1*y + 1*y^2 + 1*y^3 + 1*y^4 + 1*y^5 + 1*y^6 + 1*y^7 + 1*y^8 + 1*y^9 + 1*y^10 + 1*y^11 + 1*y^12 + 1*y^13 + 1*y^14 + 1*y^15 + 1*y^16 + 1*y^17 + 1*y^18 + 1*y^19 + Order(y^20)]
The correct result would be 1 + x + x^2...
. Obviously Order(20)
is not recognized as a marker for the existence of a power series. The whole symbolic expression is taken as a constant.
Also reported in http://ask.sagemath.org/question/24777/how-to-convert-a-taylor-polynomial-to-a-power-series/ and http://ask.sagemath.org/question/24968/coefficients-in-polynomial-ring-over-symbolic-ring/
Depends on #17399
Depends on #17438
Depends on #17659
CC: @kcrisman
Component: algebra
Keywords: series conversion days71
Author: Ralf Stephan
Branch/Commit: aa9c05c
Reviewer: Maurizio Monge, Marc Mezzarobba
Issue created by migration from https://trac.sagemath.org/ticket/16203