Same problem again plus a few others.
Hello, Whoever reads this, have a look at my previous post. After this you are probably convinced that it is a good idea to change the line if (overall_coeff.info(info_flags::positive)) in add.cpp into if (overall_coeff.info(info_flags::positive) || is_a<print_csrc_cl_N>(c)) After this have a look at the file mul.cpp. This contains the lines if (is_a<print_csrc_cl_N>(c)) c.s << "recip("; else c.s << "1.0/"; Question: Who closes the opening parenthesis of after the recip? Answer: I don't see anyone doing this. Furthermore it is not closed in my output. Next, try the following program #include <ginac/ginac.h> #include <iostream> using namespace std; using namespace GiNaC; int main() { symbol a("a"),b("b"); numeric half=numeric(1)/2; (power(a,-half)*b).print(print_csrc(cout)); cout << endl; return 0; } The result at my place is b*pow(a,(1.000000e+00/2.000000e+00)) I would have expected a minus sign in the exponent. A patch is attached to this mail that should fix these two problems in mul.cpp. Also mul.cpp seems to be written before the info_flag negint existed. The path also patches mul.cpp to use this flag. Have a nice day, Chris Dams
participants (1)
-
Chris Dams