From 4747bd4b81abb236bd33fa3e85ac32920a2cf880 Mon Sep 17 00:00:00 2001 From: Jens Vollinga Date: Wed, 21 Nov 2007 04:16:42 +0000 Subject: [PATCH] Synced to HEAD: * Deleted bogus try -- catch block in the ex::series() [Sheplyakov]. --- ginac/mul.cpp | 4 ++-- ginac/power.cpp | 4 ++-- ginac/pseries.cpp | 6 +----- 3 files changed, 5 insertions(+), 9 deletions(-) diff --git a/ginac/mul.cpp b/ginac/mul.cpp index 99d811f4..ab1a042b 100644 --- a/ginac/mul.cpp +++ b/ginac/mul.cpp @@ -461,8 +461,8 @@ ex mul::eval(int level) const // 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(ex_to(i->rest).seq.begin()->coeff).div_dyn(c); + const numeric lead_coeff = + ex_to(ex_to(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 diff --git a/ginac/power.cpp b/ginac/power.cpp index e839220d..099f935b 100644 --- a/ginac/power.cpp +++ b/ginac/power.cpp @@ -491,8 +491,8 @@ ex power::eval(int level) const // (2*x + 6*y)^(-4) -> 1/16*(x + 3*y)^(-4) if (num_exponent->is_integer() && is_exactly_a(ebasis)) { numeric icont = ebasis.integer_content(); - const numeric& lead_coeff = - ex_to(ex_to(ebasis).seq.begin()->coeff).div_dyn(icont); + const numeric lead_coeff = + ex_to(ex_to(ebasis).seq.begin()->coeff).div(icont); const bool canonicalizable = lead_coeff.is_integer(); const bool unit_normal = lead_coeff.is_pos_integer(); diff --git a/ginac/pseries.cpp b/ginac/pseries.cpp index 2b948a74..6ff1d96b 100644 --- a/ginac/pseries.cpp +++ b/ginac/pseries.cpp @@ -1215,11 +1215,7 @@ ex ex::series(const ex & r, int order, unsigned options) const 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; } -- 2.49.0