[GiNaC-list] Relations using possymbol

Richard B. Kreckel kreckel at ginac.de
Wed Mar 23 22:41:02 CET 2011


Hi!

On 03/23/2011 03:39 PM, Michael Boyer wrote:
> ------------------------------------------------
> #include<ginac/ginac.h>
> using namespace GiNaC;
>
> int main() {
> 	possymbol x("x");
> 	ex a = x;
>
> 	if (a.info(info_flags::positive)) std::cout<<  a<<  " is positive\n";
> 	else                              std::cout<<  a<<  " is _not_ positive\n";
>
> 	a *= -1;
> 	
> 	if (a.info(info_flags::negative)) std::cout<<  a<<  " is negative\n";
> 	else                              std::cout<<  a<<  " is _not_ negative\n";
> }
> ------------------------------------------------
>
> The output I see is:
> x is positive
> -x is _not_ negative
>
> Any idea why it cannot determine that -x is in fact negative?

It can and does determine that since 1.5.7. You must be using an older 
release.

   -richy.
-- 
Richard B. Kreckel
<http://www.ginac.de/~kreckel/>


More information about the GiNaC-list mailing list