* Deleted bogus try -- catch block in the ex::series() [Sheplyakov].
authorJens Vollinga <vollinga@thep.physik.uni-mainz.de>
Wed, 21 Nov 2007 04:14:32 +0000 (04:14 +0000)
committerJens Vollinga <vollinga@thep.physik.uni-mainz.de>
Wed, 21 Nov 2007 04:14:32 +0000 (04:14 +0000)
ginac/mul.cpp
ginac/power.cpp
ginac/pseries.cpp

index c4cb2e3b90f72026c02a4b19cfd25c07efe66946..bc80ef6eace60710c50771aeaacec263c48700c6 100644 (file)
@@ -469,8 +469,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 25b1f43a40bcc6a92750a61471a634f5e4883cc8..642d16d796be75f92c31c39c75c7cf61036118e3 100644 (file)
@@ -506,8 +506,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 0da6ae8d4854908fc1e59e116e036ae56e433e66..f4571ed0cc47c0518043a2b2fd13e3e6ee6128e4 100644 (file)
@@ -1280,11 +1280,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;
 }