id summary reporter owner description type status priority milestone component resolution keywords cc merged author reviewer upstream work_issues branch commit dependencies stopgaps
14685 error in the computing of the approximate order in LazyPowerSeries MatthieuDien sage-combinat "Hi,
I found a bug in the LazyPowerSeries class of package combinat. There is mistake in the computing of the approximate order of a serie. A demonstration of the bug :
{{{
sage: R = LazyPowerSeriesRing(QQ)
sage: B = R([0,0,0,1,0])
sage: B.aorder
0
sage: B.coefficients(10)
[0, 0, 0, 1, 0, 0, 0, 0, 0, 0]
sage: B.aorder
1
}}}
The good result should be 3 and not 1 (the order of the series B = x^3^ is 3 not 1 )
The bug is that the aorder is computed one time and never updated. This is because the order was assigned the first time then the condition self.order != unk becomes false and the update never comes.
After the patch, we obtain :
{{{
sage: R = LazyPowerSeriesRing(QQ)
sage: B = R([0,0,0,1,0])
sage: B.aorder
0
sage: B.coefficients(10)
[0, 0, 0, 1, 0, 0, 0, 0, 0, 0]
sage: B.aorder
3
}}}
What we expected.
PS : Thanks you for the commments, I tried to answer them.
PS 2 : I modified the patch as you asked" defect needs_work major sage-6.6 combinatorics LazyPowerSeries aorder approximate order mantepse Matthieu Dien Mike Hansen N/A wrongAnswerMarker