]> www.ginac.de Git - ginac.git/commitdiff
Synced to HEAD:
authorJens Vollinga <vollinga@thep.physik.uni-mainz.de>
Wed, 21 Nov 2007 04:16:42 +0000 (04:16 +0000)
committerJens Vollinga <vollinga@thep.physik.uni-mainz.de>
Wed, 21 Nov 2007 04:16:42 +0000 (04:16 +0000)
* Deleted bogus try -- catch block in the ex::series() [Sheplyakov].

ginac/mul.cpp
ginac/power.cpp
ginac/pseries.cpp

index 99d811f4762f2e6b703795f73278eeb2cdfebf7c..ab1a042b95fc019165395f5994a4a42f446da68f 100644 (file)
@@ -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<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 
index e839220d28243208105abacfbe7dbc6f13d57a55..099f935bc282a4f5e09ae65297ce61308efd7400 100644 (file)
@@ -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<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();
index 2b948a74af55c792849a21aa5a5de47015e28423..6ff1d96bf6c1893580321444c6bc8b9d091b2c59 100644 (file)
@@ -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;
 }