On 5/14/07, Martin Albrecht <[EMAIL PROTECTED]> wrote:
>
> Hi there,
>
> I am having trouble re-implementing MPolynomial.coeffient. The docstring
> states:
>
>         If f is this polynomial, then the coefficient is the sum T/mon
>         where the sum is over terms T in f that are exactly divisible
>         by mon.
>
> So e.g.
>
>          sage: f = y^2 - x^9 - 7*x + 5*x*y
>          sage: f.coefficient(y)
>          5*x + y


But y^2 isn't *exactly* divisible by y, so why is y there in the output?


>
> However, the doctest requires the result to be
>
>          sage: f = y^2 - x^9 - 7*x + 5*x*y
>          sage: f.coefficient(y)
>          5*x
>
> which is somewhat consistent with the docstring of the "inner"
> PolyDict.coeffient function:
>
>         Return a polydict that defines a polynomial in _1_less_number
>         of_variables_ that gives the coefficient of mon in this
>         polynomial.
>
>         The coefficient is defined as follows.  If f is this
>         polynomial, then the coefficient is the sum T/mon where the
>         sum is over terms T in f that are exactly divisible by mon.
>
> So, what is it supposed to do?
>
> Martin
>
>
> --
> name: Martin Albrecht
> _pgp: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x8EF0DC99
> _www: http://www.informatik.uni-bremen.de/~malb
> _jab: [EMAIL PROTECTED]
>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~----------~----~----~----~------~----~------~--~---

Reply via email to