#include #include #include #include using std::cout; using std::endl; int main() { GiNaC::symbol x("x"); GiNaC::ex ex1 = pow(x,4)/(x-1)/4; GiNaC::ex ex2 = GiNaC::sqrfree_parfrac(ex1,x); cout << "the input is ex1 = " << ex1 << endl; cout << "the result after partial fractioning: "<< ex2 << endl; cout << "this is what you get after x=4, in ex1 = "<< ex1.subs(x==4)<< endl; cout << "insert number:, say x = 4, which gives wrong result " << ex2.subs(x==4) << endl; }