[GiNaC-list] Weird: symbol * ddq_i, my_ex.subs((*ddq_i)==0) my_ex.subs(*ddq_i==0) my_ex.subs(symbol(*ddq_i)==0) ??

Javier Ros jros at unavarra.es
Wed Jul 27 19:23:17 CEST 2011


Hello,

Being

symbol * ddq_i

the following trivial simplifications

my_ex.subs((*ddq_i)==0)

my_ex.subs(*ddq_i==0)

my_ex.subs(symbol(*ddq_i)==0)

go wrong no correct substitution, in different ways

but

my_ex.subs(lst(symbol(*ddq_i)==0,*ddq_i==0))

and

my_ex.subs(lst(symbol(*ddq_i)==0,(*ddq_i)==0))

go OK.

Interestingly  until now I was simplifying correctly using

my_ex.subs((*ddq_i)==0)

I think this is not correct behavior. What's your opinion?.

I suppose that my current expresion is more complex than it used to
be, that's why.
I have not experienced this before.

I'm using Ubuntu 10.04 LTS provided GiNaC, Synaptic tells 1.5.5 -1.


Thank you,

Javier


More information about the GiNaC-list mailing list