// XXX: What is the best way to check if the polynomial is a primitive?
numeric c = i->rest.integer_content();
- const numeric& lead_coeff =
- ex_to<numeric>(ex_to<add>(i->rest).seq.begin()->coeff).div_dyn(c);
+ const numeric lead_coeff =
+ ex_to<numeric>(ex_to<add>(i->rest).seq.begin()->coeff).div(c);
const bool canonicalizable = lead_coeff.is_integer();
// XXX: The main variable is chosen in a random way, so this code
// (2*x + 6*y)^(-4) -> 1/16*(x + 3*y)^(-4)
if (num_exponent->is_integer() && is_exactly_a<add>(ebasis)) {
numeric icont = ebasis.integer_content();
- const numeric& lead_coeff =
- ex_to<numeric>(ex_to<add>(ebasis).seq.begin()->coeff).div_dyn(icont);
+ const numeric lead_coeff =
+ ex_to<numeric>(ex_to<add>(ebasis).seq.begin()->coeff).div(icont);
const bool canonicalizable = lead_coeff.is_integer();
const bool unit_normal = lead_coeff.is_pos_integer();
else
throw (std::logic_error("ex::series(): expansion point has unknown type"));
- try {
- e = bp->series(rel_, order, options);
- } catch (std::exception &x) {
- throw (std::logic_error(std::string("unable to compute series (") + x.what() + ")"));
- }
+ e = bp->series(rel_, order, options);
return e;
}