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

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


The following commit has been merged in the cleanedupstream branch:
commit 26726bc01d7b99ab8c1ff26cd530c8183b403889
Author: Martin Lee <martinlee84 at web.de>
Date:   Mon Apr 23 16:58:13 2012 +0200

    chg: more trivial checks

diff --git a/factory/facBivar.cc b/factory/facBivar.cc
index e48a89d..cc4b4b1 100644
--- a/factory/facBivar.cc
+++ b/factory/facBivar.cc
@@ -423,7 +423,8 @@ CFList biFactorize (const CanonicalForm& F, const Variable& v)
   }
 
   //check trivial case
-  if (degree (A) == 1 || degree (A, 1) == 1)
+  if (degree (A) == 1 || degree (A, 1) == 1 ||
+      (size (A) == 2 && gcd (degree (A), degree (A,1)).isOne()))
   {
     CFList factors;
     factors.append (A);
diff --git a/factory/facFqBivar.cc b/factory/facFqBivar.cc
index 6d735fd..f3d8b35 100644
--- a/factory/facFqBivar.cc
+++ b/factory/facFqBivar.cc
@@ -5681,8 +5681,10 @@ biFactorize (const CanonicalForm& F, const ExtensionInfo& info)
     return factors;
   }
 
+  
   //check trivial case
-  if (degree (A) == 1 || degree (A, 1) == 1)
+  if (degree (A) == 1 || degree (A, 1) == 1 || 
+      (size (A) == 2 && gcd (degree (A), degree (A,1)).isOne()))
   {
     factors.append (A);
 
@@ -5959,12 +5961,10 @@ biFactorize (const CanonicalForm& F, const ExtensionInfo& info)
     return factors;
   }
 
-  A= A (y + evaluation, y);
-
   int liftBound= degree (A, y) + 1;
 
   int boundsLength;
-  int * bounds= computeBounds (A (y - evaluation, y), boundsLength);
+  int * bounds= computeBounds (A, boundsLength);
   int minBound= bounds[0];
   for (int i= 1; i < boundsLength; i++)
   {
@@ -5972,6 +5972,8 @@ biFactorize (const CanonicalForm& F, const ExtensionInfo& info)
       minBound= tmin (minBound, bounds[i]);
   }
 
+  A= A (y + evaluation, y);
+
   int degMipo= 1;
   if (extension && alpha.level() != 1 && k==1)
     degMipo= degree (getMipo (alpha));
diff --git a/factory/facFqBivar.h b/factory/facFqBivar.h
index bd2a0cf..0318522 100644
--- a/factory/facFqBivar.h
+++ b/factory/facFqBivar.h
@@ -395,7 +395,6 @@ FqBiFactorize (const CanonicalForm & G, ///< [in] a bivariate poly
   }
   mat_ZZ M;
   vec_ZZ S;
-  CanonicalForm oldF= F;
   F= compress (F, M, S);
   CanonicalForm pthRoot, A, tmp;
   CanonicalForm sqrfP= sqrfPart (F/Lc(F), pthRoot, alpha);

-- 
an open source computer algebra system



More information about the debian-science-commits mailing list