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

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 9ff790951490f9b71ac25bcc460753381a0020d7..a454b914ae24e266443f93a746c1bc1706a9db6f 100644 (file)
@@ -505,8 +505,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;
 }