#10085: The gen() method for power series over power series works incorrectly
-------------------------+--------------------------------------------------
Reporter: schilly | Owner: burcin
Type: defect | Status: new
Priority: major | Milestone: sage-4.6
Component: symbolics | Keywords:
Author: | Upstream: N/A
Reviewer: | Merged:
Work_issues: |
-------------------------+--------------------------------------------------
Description changed by schilly:
Old description:
> If I type the following:
> {{{
> S1 = LazyPowerSeriesRing(ZZ)
> S2 = LazyPowerSeriesRing(S1)
> y = S2.gen()
> y.coefficient(1) == 1
> }}}
> I get True, and
> {{{
> y.coefficient(1).coefficient(0)
> }}}
> gets me the "'int' object has no attribute 'coefficient'" error message.
>
> I solved the problem by changing the following line in the gen() method:
> {{{
> res = self._new_initial(1, Stream([0,1,0]))
> }}}
> by
> {{{
> res = self.term(1, 1)}}}
>
> The coefficient of order 1 in the series y should not be the
> integer 1, but the power series [1, 0, ...] in S1.
New description:
If I type the following:
{{{
S1 = LazyPowerSeriesRing(ZZ)
S2 = LazyPowerSeriesRing(S1)
y = S2.gen()
y.coefficient(1) == 1
}}}
I get True, and
{{{
y.coefficient(1).coefficient(0)
}}}
gets me the "'int' object has no attribute 'coefficient'" error message.
I solved the problem by changing the following line in the gen() method:
{{{
res = self._new_initial(1, Stream([0,1,0]))
}}}
by
{{{
res = self.term(1, 1)
}}}
The coefficient of order 1 in the series y should not be the integer 1,
but the power series [1, 0, ...] in S1.
--
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/10085#comment:1>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sage-trac?hl=en.