numeric expairs (see exam_paranoia15())
// the terms have not changed, so it is safe to declare this expanded
return (options == 0) ? setflag(status_flags::expanded) : *this;
}
// the terms have not changed, so it is safe to declare this expanded
return (options == 0) ? setflag(status_flags::expanded) : *this;
}
return (new add(vp, overall_coeff))->setflag(status_flags::dynallocated | (options == 0 ? status_flags::expanded : 0));
}
return (new add(vp, overall_coeff))->setflag(status_flags::dynallocated | (options == 0 ? status_flags::expanded : 0));
}
}
} else {
if (is_ex_exactly_of_type(r,mul)) {
}
} else {
if (is_ex_exactly_of_type(r,mul)) {
- sum.push_back(expair(expand_mul(ex_to<mul>(r),_num2),
+ sum.push_back(a.combine_ex_with_coeff_to_pair(expand_mul(ex_to<mul>(r),_num2),
ex_to<numeric>(c).power_dyn(_num2)));
} else {
ex_to<numeric>(c).power_dyn(_num2)));
} else {
- sum.push_back(expair((new power(r,_ex2))->setflag(status_flags::dynallocated),
+ sum.push_back(a.combine_ex_with_coeff_to_pair((new power(r,_ex2))->setflag(status_flags::dynallocated),
ex_to<numeric>(c).power_dyn(_num2)));
}
}
ex_to<numeric>(c).power_dyn(_num2)));
}
}
epvector::const_iterator last = m.seq.end();
epvector::const_iterator cit = m.seq.begin();
while (cit!=last) {
epvector::const_iterator last = m.seq.end();
epvector::const_iterator cit = m.seq.begin();
while (cit!=last) {
- if (is_ex_exactly_of_type((*cit).rest,numeric)) {
- distrseq.push_back(m.combine_pair_with_coeff_to_pair(*cit,n));
+ if (is_ex_exactly_of_type(cit->rest,numeric)) {
+ distrseq.push_back(m.combine_pair_with_coeff_to_pair(*cit, n));
} else {
// it is safe not to call mul::combine_pair_with_coeff_to_pair()
// since n is an integer
} else {
// it is safe not to call mul::combine_pair_with_coeff_to_pair()
// since n is an integer
- distrseq.push_back(expair((*cit).rest, ex_to<numeric>((*cit).coeff).mul(n)));
+ distrseq.push_back(expair(cit->rest, ex_to<numeric>(cit->coeff).mul(n)));
- return (new mul(distrseq,ex_to<numeric>(m.overall_coeff).power_dyn(n)))->setflag(status_flags::dynallocated);
+ return (new mul(distrseq, ex_to<numeric>(m.overall_coeff).power_dyn(n)))->setflag(status_flags::dynallocated);