#17438: coefficients of symbolic expressions revamp
-------------------------------------+-------------------------------------
Reporter: rws | Owner:
Type: enhancement | Status: needs_review
Priority: major | Milestone: sage-6.5
Component: symbolics | Resolution:
Keywords: list, polynomial, | Merged in:
coeff | Reviewers:
Authors: Ralf Stephan | Work issues:
Report Upstream: N/A | Commit:
Branch: | 0fec129b1055535de50cf4e5c663662e0d877742
u/rws/coefficients_of_symbolic_expressions_revamp| Stopgaps:
Dependencies: |
-------------------------------------+-------------------------------------
Comment (by bruno):
{{{
#!diff
+ val = l[0][1]
+ if val < 0:
+ raise ValueError("Cannot return dense coefficient list with negative
valuation.")
}}}
I can understand the rationale behind this `ValueError`. Yet, couldn't
this be useful in some cases to have a dense list of coefficients, even if
the first one is not the constant coefficient? In some sense, since the
user has to specify `sparse=dense`, she knows what she is doing. I feel
like it is better not to raise exceptions when a meaningful (and not too
misleading) answer exists.
Yet, I just checked the situation for Laurent polynomials and it appears
that only the list of nonzero coefficients can be computed. That is the
implementation you propose is consistent with the case of Laurent
polynomials.
--
Ticket URL: <http://trac.sagemath.org/ticket/17438#comment:13>
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 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 http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.