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

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


The following commit has been merged in the cleanedupstream branch:
commit f7c0d98de82c119005ae83aab20c3cf58ea5c250
Author: Martin Lee <martinlee84 at web.de>
Date:   Tue Feb 21 12:45:56 2012 +0100

    fix: Q(a) check

diff --git a/factory/facMul.cc b/factory/facMul.cc
index aaf69df..4a31705 100644
--- a/factory/facMul.cc
+++ b/factory/facMul.cc
@@ -2624,16 +2624,20 @@ uniFdivides (const CanonicalForm& A, const CanonicalForm& B)
 #endif
   }
 #ifdef HAVE_FLINT
-  fmpq_poly_t FLINTA,FLINTB;
-  fmpq_poly_init (FLINTA);
-  fmpq_poly_init (FLINTB);
-  convertFacCF2Fmpq_poly_t (FLINTA, A);
-  convertFacCF2Fmpq_poly_t (FLINTB, B);
-  fmpq_poly_rem (FLINTA, FLINTB, FLINTA);
-  bool result= fmpq_poly_is_zero (FLINTA);
-  fmpq_poly_clear (FLINTA);
-  fmpq_poly_clear (FLINTB);
-  return result;
+  Variable alpha;
+  if (!hasFirstAlgVar (A, alpha) && !hasFirstAlgVar (B, alpha))
+  {
+    fmpq_poly_t FLINTA,FLINTB;
+    fmpq_poly_init (FLINTA);
+    fmpq_poly_init (FLINTB);
+    convertFacCF2Fmpq_poly_t (FLINTA, A);
+    convertFacCF2Fmpq_poly_t (FLINTB, B);
+    fmpq_poly_rem (FLINTA, FLINTB, FLINTA);
+    bool result= fmpq_poly_is_zero (FLINTA);
+    fmpq_poly_clear (FLINTA);
+    fmpq_poly_clear (FLINTB);
+    return result;
+  }
 #else
   return fdivides (A, B); //maybe NTL?
 #endif

-- 
an open source computer algebra system



More information about the debian-science-commits mailing list