- I'm fired. Fixed a really stupid bug in sr_gcd() which called
authorChristian Bauer <Christian.Bauer@uni-mainz.de>
Mon, 31 Jul 2000 21:09:44 +0000 (21:09 +0000)
committerChristian Bauer <Christian.Bauer@uni-mainz.de>
Mon, 31 Jul 2000 21:09:44 +0000 (21:09 +0000)
  divide_in_z(r, foo) with "var+1" as its last parameter, while the main
  variable x=*var usually appears in r. This should never have worked...

ginac/normal.cpp

index a15ec62d4ef1434ef1c38294ab8be41b732cb184..9cc65cad0f30e60330d8470171a824c7b617caea 100644 (file)
@@ -1140,7 +1140,7 @@ static ex sr_gcd(const ex &a, const ex &b, sym_desc_vec::const_iterator var)
         c = d;
         cdeg = ddeg;
 //std::clog << " dividing...\n";
-        if (!divide_in_z(r, ri * pow(psi, delta), d, var+1))
+        if (!divide_in_z(r, ri * pow(psi, delta), d, var))
             throw(std::runtime_error("invalid expression in sr_gcd(), division failed"));
         ddeg = d.degree(x);
         if (ddeg == 0) {