Hi, I have been working a lot with PowerSeries recently, and discovered the following issue. Suppose we create a power series over a quotient ring like this:
sage: R=PolynomialRing(QQ,1,'x') sage: quotient_of_R=R.quotient(R.irrelevant_ideal()**2, 'x') sage: x=quotient_of_R.gen() sage: P=PowerSeriesRing(quotient_of_R,3,'t') sage: t=P.gens() Now, let's construct a power series of moderately large degree: sage: f=((x+t[0])**10)*((t[1]+t[2])**10) Strangely, computing the coefficients of f via: sage: f.coefficients() takes much longer than the equivalent alternative of first turning f into a polynomial, and only then computing the coefficients: sage:f.polynomial().dict() I have not conducted a rigorous study of this, but on my computer the first version takes about 100 times longer than the second one. Based on this I have two questions: 1) If we are just reading the coefficients of the power series, why should it matter if we first cast it to a polynomial? 2) If the issue lies in the details of the PowerSeries implementation, then would it make sense to simply cast powerseries to polynomials before calling methods that do not distinguish between the two? Thanks, Daniel -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+unsubscr...@googlegroups.com. To post to this group, send email to sage-devel@googlegroups.com. Visit this group at https://groups.google.com/group/sage-devel. For more options, visit https://groups.google.com/d/optout.