Dear all, I found that the program #include <iostream> #include <ginac/ginac.h> using namespace std; using namespace GiNaC; int main(int argc, char** argv) { symbol x("x"),y("y"); ex e=sin(x)*sin(x); if(e.info(info_flags::polynomial)) cout << e << " is polynomial" << endl; else cout << e << " is not polynomial" << endl; e=sin(x)*sin(y); if(e.info(info_flags::polynomial)) cout << e << " is polynomial" << endl; else cout << e << " is not polynomial" << endl; return 0; } gives the output sin(x)^2 is polynomial sin(x)*sin(y) is not polynomial which I find very awkward. The attached patch unpolynomializes sin(x)^2. Best, Chris
Dear Chris, On Tue, 21 Sep 2004, Chris Dams wrote:
Dear all,
I found that the program
[...]
gives the output
sin(x)^2 is polynomial sin(x)*sin(y) is not polynomial
which I find very awkward. The attached patch unpolynomializes sin(x)^2.
Thanks for your patch wich aligns power::info() with mul::info() in the obvious way. I've applied it to CVS. One minor nitpick: could you please use unified or context diffs with some lines of copied context in future patches? It makes life easier for the person that's going to apply them. (Use diff -u, for instance.) Best wishes -richy. -- Richard B. Kreckel <http://www.ginac.de/~kreckel/>
participants (2)
-
Chris Dams
-
Richard B. Kreckel