Index: normal.cpp =================================================================== RCS file: /home/cvs/GiNaC/ginac/normal.cpp,v retrieving revision 1.94.2.6 diff -r1.94.2.6 normal.cpp 716a717,743 > if (is_exactly_a(b)) { > const ex& bb(b.op(0)); > ex qbar = a; > int exp_b = ex_to(b.op(1)).to_int(); > for (int i=exp_b; i>0; i--) > { > if (!divide_in_z(qbar, bb, q, var)) > return false; > qbar = q; > } > return true; > } > > if (is_exactly_a(b)) { > ex qbar = a; > for (const_iterator itrb = b.begin(); itrb != b.end(); ++itrb) > { > sym_desc_vec sym_stats; > get_symbol_stats(a, *itrb, sym_stats); > if (!divide_in_z(qbar, *itrb, q, sym_stats.begin())) > return false; > > qbar = q; > } > return true; > } > 1480a1508,1527 > if (is_a(aex)) { > if (! bex.subs(aex==_ex0, subs_options::no_pattern).is_zero()) { > if (ca) > *ca = a; > if (cb) > *cb = b; > return _ex1; > } > } > > if (is_a(bex)) { > if (! aex.subs(bex==_ex0, subs_options::no_pattern).is_zero()) { > if (ca) > *ca = a; > if (cb) > *cb = b; > return _ex1; > } > } > 2462,2463c2509,2518 < < return e.to_polynomial(repl); --- > const ex e_exp(e.op(1)); > if (e_exp.info(info_flags::posint)) { > ex eb = e.op(0).to_polynomial(repl); > ex factor_local(_ex1); > ex pre_res = find_common_factor(eb, factor_local, repl); > factor *= power(factor_local, e_exp); > return power(pre_res, e_exp); > > } else > return e.to_polynomial(repl); 2474c2529 < if (is_exactly_a(e) || is_exactly_a(e)) { --- > if (is_exactly_a(e) || is_exactly_a(e) || is_exactly_a(e)) {