[SCM] an open source computer algebra system branch, cleanedupstream, updated. 6125e540ca6d66c307958938a9d53b245507c323

Bernhard R. Link brlink at debian.org
Tue Apr 24 15:55:33 UTC 2012


The following commit has been merged in the cleanedupstream branch:
commit 502761079651b837338f506aff840451897c4d15
Author: Martin Lee <martinlee84 at web.de>
Date:   Wed Apr 4 13:20:40 2012 +0200

    chg: better debug output

diff --git a/factory/facBivar.cc b/factory/facBivar.cc
index 807298e..e48a89d 100644
--- a/factory/facBivar.cc
+++ b/factory/facBivar.cc
@@ -499,8 +499,8 @@ CFList biFactorize (const CanonicalForm& F, const Variable& v)
       bufUniFactors= conv (factorize (bufAeval, true));
     TIMING_END_AND_PRINT (fac_uni_factorizer,
                           "time for univariate factorization: ");
-    DEBOUTLN (cerr, "Lc (bufAeval)*prod (bufUniFactors)== bufAeval " <<
-              (prod (bufUniFactors)*Lc (bufAeval) == bufAeval));
+    DEBOUTLN (cerr, "prod (bufUniFactors)== bufAeval " <<
+              (prod (bufUniFactors) == bufAeval));
 
     TIMING_START (fac_uni_factorizer);
     if (extension)
@@ -509,8 +509,8 @@ CFList biFactorize (const CanonicalForm& F, const Variable& v)
       bufUniFactors2= conv (factorize (bufAeval2, true));
     TIMING_END_AND_PRINT (fac_uni_factorizer,
                           "time for univariate factorization in y: ");
-    DEBOUTLN (cerr, "Lc (Aeval2)*prod (uniFactors2)== Aeval2 " <<
-              (prod (bufUniFactors2)*Lc (bufAeval2) == bufAeval2));
+    DEBOUTLN (cerr, "prod (bufuniFactors2)== bufAeval2 " <<
+              (prod (bufUniFactors2) == bufAeval2));
 
     if (bufUniFactors.getFirst().inCoeffDomain())
       bufUniFactors.removeFirst();
diff --git a/factory/facFqBivar.cc b/factory/facFqBivar.cc
index a4be0d5..b91fc91 100644
--- a/factory/facFqBivar.cc
+++ b/factory/facFqBivar.cc
@@ -268,7 +268,7 @@ extFactorRecombination (CFList& factors, CanonicalForm& F,
   }
 
   DEBOUTLN (cerr, "LC (F, 1)*prodMod (factors, M) == F " <<
-            (LC (F, 1)*prodMod (factors, M) == F));
+            (mod (LC (F, 1)*prodMod (factors, M), M)/Lc (mod (LC (F, 1)*prodMod (factors, M), M)) == F/Lc (F)));
   int degMipoBeta= 1;
   if (!k && beta.level() != 1)
     degMipoBeta= degree (getMipo (beta));
@@ -463,8 +463,14 @@ factorRecombination (CFList& factors, CanonicalForm& F,
     F= 1;
     return result;
   }
-  DEBOUTLN (cerr, "LC (F, 1)*prodMod (factors, N) == F " <<
-            (LC (F, 1)*prodMod (factors, N) == F));
+#ifdef DEBUGOUTPUT
+  if (b.getp() == 0)
+    DEBOUTLN (cerr, "LC (F, 1)*prodMod (factors, N) == F " <<
+              (mod (LC (F, 1)*prodMod (factors, N),N)/Lc (mod (LC (F, 1)*prodMod (factors, N),N)) == F/Lc(F)));
+  else
+    DEBOUTLN (cerr, "LC (F, 1)*prodMod (factors, N) == F " <<
+              (mod (b(LC (F, 1)*prodMod (factors, N)),N)/Lc (mod (b(LC (F, 1)*prodMod (factors, N)),N)) == F/Lc(F)));
+#endif
   CFList T, S;
 
   CanonicalForm M= N;
@@ -5816,7 +5822,7 @@ biFactorize (const CanonicalForm& F, const ExtensionInfo& info)
       bufUniFactors2= uniFactorizer (bufAeval2, alpha, GF);
       TIMING_END_AND_PRINT (fac_uni_factorizer,
                             "time for univariate factorization in y: ");
-      DEBOUTLN (cerr, "Lc (Aeval2)*prod (uniFactors2)== Aeval2 " <<
+      DEBOUTLN (cerr, "Lc (bufAeval2)*prod (bufUniFactors2)== bufAeval2 " <<
                 (prod (bufUniFactors2)*Lc (bufAeval2) == bufAeval2));
     }
 
diff --git a/factory/facHensel.cc b/factory/facHensel.cc
index c70cd67..be9f375 100644
--- a/factory/facHensel.cc
+++ b/factory/facHensel.cc
@@ -435,8 +435,6 @@ diophantineHensel (const CanonicalForm & F, const CFList& factors,
         k.getItem() += g.mapinto()*modulus;
         e -= mulNTL (g.mapinto()*modulus, l.getItem(), b);
         e= b(e);
-        DEBOUTLN (cerr, "mod (e, power (y, i + 1))= " <<
-                  mod (e, power (y, i + 1)));
       }
     }
     modulus *= p;
@@ -633,8 +631,6 @@ diophantineHenselQa (const CanonicalForm & F, const CanonicalForm& G,
           e -= mulNTL (g.mapinto()*modulus, l.getItem(), b);
         }
         e= b(e);
-        DEBOUTLN (cerr, "mod (e, power (y, i + 1))= " <<
-                  mod (e, power (y, i + 1)));
       }
     }
     modulus *= p;
@@ -1198,7 +1194,7 @@ multiRecDiophantine (const CanonicalForm& F, const CFList& factors,
     j= p;
     for (CFListIterator i= result; i.hasItem(); i++, j++)
       test += mod (i.getItem()*j.getItem(), power (y, d));
-    DEBOUTLN (cerr, "test= " << test);
+    DEBOUTLN (cerr, "test in multiRecDiophantine= " << test);
 #endif
   return result;
 }
@@ -1228,7 +1224,7 @@ henselStep (const CanonicalForm& F, const CFList& factors, CFArray& bufFactors,
     CanonicalForm test2= mod (F-test, xToJ);
 
     test2= mod (test2, MOD);
-    DEBOUTLN (cerr, "test= " << test2);
+    DEBOUTLN (cerr, "test in henselStep= " << test2);
 #endif
   }
   else
@@ -1245,7 +1241,7 @@ henselStep (const CanonicalForm& F, const CFList& factors, CFArray& bufFactors,
     test= mod (test, power (x, j));
     test= mod (test, MOD);
     CanonicalForm test2= mod (F, power (x, j - 1)) - mod (test, power (x, j-1));
-    DEBOUTLN (cerr, "test= " << test2);
+    DEBOUTLN (cerr, "test in henselStep= " << test2);
 #endif
 
     if (degree (Pi [factors.length() - 2], x) > 0)
@@ -1980,7 +1976,7 @@ nonMonicHenselStep (const CanonicalForm& F, const CFList& factors,
     test= mod (test, power (x, j));
     test= mod (test, MOD);
     CanonicalForm test2= mod (F, power (x, j - 1)) - mod (test, power (x, j-1));
-    DEBOUTLN (cerr, "test= " << test2);
+    DEBOUTLN (cerr, "test in nonMonicHenselStep= " << test2);
 #endif
 
   if (degree (Pi [factors.length() - 2], x) > 0)

-- 
an open source computer algebra system



More information about the debian-science-commits mailing list