20 Jul
2015
20 Jul
'15
1:18 a.m.
Hello Consider this short programme: #include <iostream> #include <ginac/ginac.h> using namespace std; using namespace GiNaC; int main() { possymbol x("x"); cout << pow(4,x + 1) * pow(4,-1) << endl; } The result produced is: 1/4*4^(1+x), the expected output is 4^x. I can see that the documentation says these types of situations will only be handled if it is "safe", but having specified x as a positive value, I'm confused why this expression is not considered safe? All the best Jonathan