24 May
2002
24 May
'02
7:09 p.m.
Hi, Below I provide a small example program which I think illustrates a small inconsistency in GiNaC. The program prints out x==4 x==4 and then exits. I think that if the "==" operator were handled consistently with other operators it should print out y==4 x==4 If I change the "==" operator to "+" it behaves as I expect. Cheers, Ben. ------------------------------------------------------------- #include <ginac/ginac.h> using namespace GiNaC; int main(int argc, char *argv[]) { symbol x("x"), y("y"); // change the "==" to a "+" and it works as expected ex b = (x == 4); cout << b.subs(x == y) << std::endl; cout << b << std::endl; return 0; } -------------------------------------------------------------