MathGroup Archive 2003

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: bug in CoefficientArrays?

  • To: mathgroup at
  • Subject: [mg43927] Re: [mg43923] bug in CoefficientArrays?
  • From: Andrzej Kozlowski <akoz at>
  • Date: Mon, 13 Oct 2003 04:04:31 -0400 (EDT)
  • Sender: owner-wri-mathgroup at

On Sunday, October 12, 2003, at 05:03 PM, Mark Fisher wrote:

> FYI: This looks like a bug to me:
> In[77]:=
> poly=a+(1-b)(c-d)x-e y;
> {m0,m1}=CoefficientArrays[poly,{x,y}];
> m0+m1.{x,y}-poly//Simplify
> Out[79]=
> (d-b d+c (-1+b+b d)) x
> --Mark
According to the documentation, the first argument in CoefficientArrays 
ought to be a list of polynomials rather than a single polynomial and :

poly=a+(1-b)(c-d)x-e y;




Of course it is trivial to modify CoefficientArrays to work properly 
with just a single polynomial, and since this sort of thing is the 
usual approach in Mathematica (e.g. Solve with a single equation vs. 
Solve with a system of equations) it seems like an oversight that it 
was not done here. But as the documentation clearly says "The first 
element a has the same length as the list polys", the word "bug" is not 
strictly appropriate.

Andrzej Kozlowski
Yokohama, Japan

  • Prev by Date: Re: Bizarre phenomenon
  • Next by Date: Re: negative pattern matching anyone?
  • Previous by thread: bug in CoefficientArrays?
  • Next by thread: Bizarre phenomenon