content() inconsistencies

Ralf Stephan ralf at ark.in-berlin.de
Fri Jul 2 11:31:36 CEST 2004


Hello,

this
  symbol x("x"), a("a");
  cout << (a*x/2+a*a/3).content(x) << endl;
  cout << (x/2+ex(1)/3).content(x) << endl;
  cout << (10*x/2+ex(15)/3).content(x) << endl;
gives
  a
  1
  5
while Pari says
  1/6*a
  1/6
  5
but I'm of the opinion it should be
  1/6*a
  1/6
  5/6

I would fix it in ginac but what's the official definition of content?

Regards,
ralf




More information about the GiNaC-devel mailing list