Dear all, I got a problem with the function subs, and I am not sure it is a possible bug or not, but it seems counterintuitive. Here is the code to reproduce the case: //------------------------------------------------ #include "ginac/ginac.h" using namespace std; using namespace GiNaC; int main() { symbol s("s"); ex t = subs(1/s,s==1/s, subs_options::no_pattern); cout << t << endl; return 0; } //------------------------------------------------ The output is 1/s instead of s. PS: if I remove the subs_options::no_pattern, the output is s as expected. and I have a look at the source code of basic::subs, it seems it comes from the following code: that is, the final substitutions on the new object as a whole, //------------------------------------------------ // Perform substitutions on the new object as a whole return copy->subs_one_level(m, options); //------------------------------------------------ Thanks very much in advance. Best regards! Feng