void pseries::print(ostream &os, unsigned upper_precedence) const
{
debugmsg("pseries print", LOGLEVEL_PRINT);
+ // This could be made better, since series expansion at x==1 might print
+ // -1+2*x+Order((-1+x)^2) instead of 1+2*(-1+x)+Order((-1+x)^2), which is
+ // correct but can be rather confusing.
convert_to_poly().print(os, upper_precedence);
}
ex a_coeff = coeff(*s, i);
ex b_coeff = other.coeff(*s, cdeg-i);
if (!is_order_function(a_coeff) && !is_order_function(b_coeff))
- co += coeff(*s, i) * other.coeff(*s, cdeg-i);
+ co += a_coeff * b_coeff;
}
if (!co.is_zero())
new_seq.push_back(expair(co, numeric(cdeg)));