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

Bernhard R. Link brlink at debian.org
Tue Apr 24 15:52:57 UTC 2012


The following commit has been merged in the cleanedupstream branch:
commit 8143c647a205f4de0554bb36ef99774d99bbd86d
Author: Martin Lee <martinlee84 at web.de>
Date:   Wed Feb 1 11:58:50 2012 +0100

    chg: lower precision during factor recombination

diff --git a/factory/facFqBivar.cc b/factory/facFqBivar.cc
index ac01415..aa2548d 100644
--- a/factory/facFqBivar.cc
+++ b/factory/facFqBivar.cc
@@ -237,7 +237,7 @@ uniFactorizer (const CanonicalForm& A, const Variable& alpha, const bool& GF)
 /// multivariate polynomials over a finite field" by L Bernardin.
 CFList
 extFactorRecombination (CFList& factors, CanonicalForm& F,
-                        const CanonicalForm& M, const ExtensionInfo& info,
+                        const CanonicalForm& N, const ExtensionInfo& info,
                         DegreePattern& degs, const CanonicalForm& eval, int s,
                         int thres)
 {
@@ -253,6 +253,8 @@ extFactorRecombination (CFList& factors, CanonicalForm& F,
   CanonicalForm delta= info.getDelta();
   int k= info.getGFDegree();
 
+  CanonicalForm M= N;
+  int l= degree (N);
   Variable y= F.mvar();
   Variable x= Variable (1);
   CFList source, dest;
@@ -358,6 +360,9 @@ extFactorRecombination (CFList& factors, CanonicalForm& F,
           if (trueFactor)
           {
             T= Difference (T, S);
+            l -= degree (g);
+            M= power (y, l);
+
             // compute new possible degree pattern
             bufDegs2= DegreePattern (T);
             bufDegs1.intersect (bufDegs2);
@@ -432,7 +437,7 @@ extFactorRecombination (CFList& factors, CanonicalForm& F,
 /// multivariate polynomials over a finite field" by L Bernardin.
 CFList
 factorRecombination (CFList& factors, CanonicalForm& F,
-                     const CanonicalForm& M, DegreePattern& degs, int s,
+                     const CanonicalForm& N, DegreePattern& degs, int s,
                      int thres
                     )
 {
@@ -451,6 +456,8 @@ factorRecombination (CFList& factors, CanonicalForm& F,
             (LC (F, 1)*prodMod (factors, M) == F));
   CFList T, S;
 
+  CanonicalForm M= N;
+  int l= degree (N);
   T= factors;
   CFList result;
   Variable y= Variable (2);
@@ -510,6 +517,8 @@ factorRecombination (CFList& factors, CanonicalForm& F,
           buf= quot;
           LCBuf= LC (buf, x);
           T= Difference (T, S);
+          l -= degree (g);
+          M= power (y, l);
 
           // compute new possible degree pattern
           bufDegs2= DegreePattern (T);

-- 
an open source computer algebra system



More information about the debian-science-commits mailing list