I get different results depending on the names on the variables.
sage: function('P')
P
sage: var('zeta tau')
(zeta, tau)
sage: expr = zeta*diff(P(tau), tau)^2
sage: expr.poly(zeta).coefficients()
[[zeta*diff(P(tau), tau)^2, 0]]
in this first version, it is erroneously reported
as a constant polynomial
If we rename everything:
sage: function('f')
f
sage: var('a b')
(a, b)
sage: expr = a * diff(f(b), b)^2
sage: expr.poly(a).coefficients()
[[diff(f(b), b)^2, 1]]
we get the correct result.
(Both in 8.2.beta2; in 8.1, the first version simply crashes).
Is that expected behaviour, i.e., am I not supposed to use poly().coefficients()
in that way?
--
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 [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.