for (epvector::const_iterator cit1=cit0+1; cit1!=last; ++cit1) {
const ex & r1 = cit1->rest;
const ex & c1 = cit1->coeff;
- sum.push_back(a.combine_ex_with_coeff_to_pair((new mul(r,r1))->setflag(status_flags::dynallocated),
+ sum.push_back(a.combine_ex_with_coeff_to_pair(mul(r,r1).expand(options),
_num2_p->mul(ex_to<numeric>(c)).mul_dyn(ex_to<numeric>(c1))));
}
}
GINAC_ASSERT(sum.size()==(a.seq.size()*(a.seq.size()+1))/2);
- // second part: add terms coming from overall_factor (if != 0)
+ // second part: add terms coming from overall_coeff (if != 0)
if (!a.overall_coeff.is_zero()) {
epvector::const_iterator i = a.seq.begin(), end = a.seq.end();
while (i != end) {