[GiNaC-list] Relations using possymbol

Michael Boyer mwb7w at cs.virginia.edu
Tue Mar 22 21:32:20 CET 2011


I am confused by the behavior of possymbols in relations. Consider the
following program:

------------------------------------------------
#include <ginac/ginac.h>
using namespace GiNaC;

int main() {
       possymbol x("x");

       if (x.info(info_flags::positive)) std::cout << "x is positive\n";
       else                              std::cout << "x is _not_ positive\n";

       if (x > 0) std::cout << "x is greater than zero\n";
       else       std::cout << "x is _not_ greater than zero\n";
}
------------------------------------------------

I would expect the output to be:
x is positive
x is greater than zero

But the output I get is:
x is positive
x is _not_ greater than zero


Am I misunderstanding the use of possymbol?

Thanks,
Michael Boyer


More information about the GiNaC-list mailing list