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

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


The following commit has been merged in the cleanedupstream branch:
commit dc62b0cd98a206f1fa1e8aa1f085bcd0656cf436
Author: Martin Lee <martinlee84 at web.de>
Date:   Tue Mar 6 12:13:07 2012 +0100

    chg: added divisibility test over Q(a)

diff --git a/factory/facMul.cc b/factory/facMul.cc
index 38e29a0..026afb8 100644
--- a/factory/facMul.cc
+++ b/factory/facMul.cc
@@ -2841,9 +2841,16 @@ uniFdivides (const CanonicalForm& A, const CanonicalForm& B)
     fmpq_poly_clear (FLINTB);
     return result;
   }
-  else
-    return true;
-    //return fdivides (A, B);
+  bool isRat= isOn (SW_RATIONAL);
+  if (!isRat)
+    On (SW_RATIONAL);
+  CanonicalForm Q, R;
+  Variable x= Variable (1);
+  Variable y= Variable (2);
+  newtonDivrem (swapvar (B, y, x), swapvar (A, y, x), Q, R);
+  if (!isRat)
+    Off (SW_RATIONAL);
+  return R.isZero();
 #else
   return fdivides (A, B); //maybe NTL?
 #endif

-- 
an open source computer algebra system



More information about the debian-science-commits mailing list