epvector::const_iterator i = seq.begin(), end = seq.end();
while (i != end) {
ex restcoeff = i->rest.coeff(s, n);
- if (!restcoeff.is_zero()) {
- if (do_clifford) {
- if (clifford_max_label(restcoeff) == -1) {
- coeffseq_cliff->push_back(combine_ex_with_coeff_to_pair(ncmul(restcoeff, dirac_ONE(rl)), i->coeff));
+ if (!restcoeff.is_zero()) {
+ if (do_clifford) {
+ if (clifford_max_label(restcoeff) == -1) {
+ coeffseq_cliff->push_back(combine_ex_with_coeff_to_pair(ncmul(restcoeff, dirac_ONE(rl)), i->coeff));
} else {
- coeffseq_cliff->push_back(combine_ex_with_coeff_to_pair(restcoeff, i->coeff));
+ coeffseq_cliff->push_back(combine_ex_with_coeff_to_pair(restcoeff, i->coeff));
nonscalar = true;
- }
+ }
}
coeffseq->push_back(combine_ex_with_coeff_to_pair(restcoeff, i->coeff));
}
ex add::eval(int level) const
{
std::auto_ptr<epvector> evaled_seqp = evalchildren(level);
- if (evaled_seqp.get()) {
+ if (unlikely(evaled_seqp.get() != 0)) {
// do more evaluation later
return (new add(evaled_seqp, overall_coeff))->
setflag(status_flags::dynallocated);
}
expair add::combine_ex_with_coeff_to_pair(const ex & e,
- const ex & c) const
+ const ex & c) const
{
GINAC_ASSERT(is_exactly_a<numeric>(c));
if (is_exactly_a<mul>(e)) {
}
expair add::combine_pair_with_coeff_to_pair(const expair & p,
- const ex & c) const
+ const ex & c) const
{
GINAC_ASSERT(is_exactly_a<numeric>(p.coeff));
GINAC_ASSERT(is_exactly_a<numeric>(c));