Weird: symbol * ddq_i, my_ex.subs((*ddq_i)==0) my_ex.subs(*ddq_i==0) my_ex.subs(symbol(*ddq_i)==0) ??
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
Hi Javier, your information is a bit confusing. First you write: On 27.07.2011 19:23, Javier Ros wrote:
the following trivial simplifications
my_ex.subs((*ddq_i)==0) ... go wrong no correct substitution, in different ways
then you write:
Interestingly until now I was simplifying correctly using
my_ex.subs((*ddq_i)==0)
So, once it goes wrong, then it goes well?!? Did you upgrade GiNaC to a newer version, maybe? Anyway, could you, if possible, send a complete code example to explain your problem? It is hard to guess what the problem might be, otherwise. Regards, Jens
Jens, On Wed, Jul 27, 2011 at 8:41 PM, Jens Vollinga <jens.vollinga@googlemail.com> wrote:
Hi Javier,
your information is a bit confusing. First you write:
I'm sorry.
On 27.07.2011 19:23, Javier Ros wrote:
the following trivial simplifications
my_ex.subs((*ddq_i)==0)
...
go wrong no correct substitution, in different ways
then you write:
Interestingly until now I was simplifying correctly using
my_ex.subs((*ddq_i)==0)
You can disregard this sentence.
So, once it goes wrong, then it goes well?!? Did you upgrade GiNaC to a newer version, maybe?
Disregard the my_ex.subs((*ddq_i)==0) goes OK thing,
Anyway, could you, if possible, send a complete code example to explain your problem? It is hard to guess what the problem might be, otherwise.
It's going to take some time to isolate, as I'm using a library that I've build on top of GiNaC to generate the offending my, but I'll try if I can reproduce it using plain GiNaC, writing and reading it back in a plain GiNaC program. In any case I suppose that the trivial simplifications my_ex.subs((*ddq_i)==0) my_ex.subs(*ddq_i==0) my_ex.subs(symbol(*ddq_i)==0) should coincident with these my_ex.subs(lst(symbol(*ddq_i)==0,*ddq_i==0)) my_ex.subs(lst(symbol(*ddq_i)==0,(*ddq_i)==0)) But unfortunately only the last two are working. Do you agree that this is not normal behavior?. Thank you, Javier
participants (2)
-
Javier Ros
-
Jens Vollinga