collect

Christian Bauer cbauer at student.physik.uni-mainz.de
Fri Jan 25 16:33:14 CET 2002


Hi!

On Thu, Jan 24, 2002 at 11:36:41PM +0100, tatiana wrote:
> If it is able to collect with 'sin($1)' the polynomial 'a'
> why not the polynomials 'b' or 'c' with '2^$1' or '$1^n'?
> [...]

Because degree()/coeff() (which are used by collect()) were only implemented
for functions, constants, symbols and indexed objects in this "treat the
entire expression as the object" mode. I've changed GiNaC in CVS now to make
this mode the default for all classes (except for add/mul/numeric) so your
examples will work.

Bye,
Christian

-- 
  / Coding on PowerPC and proud of it
\/ http://www.uni-mainz.de/~bauec002/



More information about the GiNaC-list mailing list