Behavior of the function 'has'
Tatiana Zolo
zolo at cs.unipr.it
Tue Mar 12 12:59:07 CET 2002
I do not understand the behavior of the function 'has' in some case.
I show you the problem with ginsh:
> has(2^x*3^x, $0^x);
1
> has(2^x*3^x*4^x, $0^x);
1
> has(2^x*3^x, $0^x*$1^x);
1
> has(2^x*3^x*4^x, $0^x*$1^x);
0
> has(2^x*3^x*4^x, $0^x*$1^x*$2^x);
1
I would expect that also
has(2^x*3^x*4^x, $0^x*$1^x);
answers 'true' because I see $0^x*$1^x as a subexpression of
2^x*3^x*4^x.
Same thing without to use wildcard.
> has(2^x*3^x*4^x, 2^x);
1
> has(2^x*3^x*4^x, 2^x*3^x);
0
> has(2^x*3^x*4^x, 2^x*3^x*4^x);
1
Regards
Tatiana Zolo
More information about the GiNaC-list
mailing list