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

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


The following commit has been merged in the cleanedupstream branch:
commit 9a77e1ff63bb632acb7d8169980c2cd64f496136
Author: Martin Lee <martinlee84 at web.de>
Date:   Fri Jan 27 10:29:46 2012 +0100

    chg: computation of G*oldQ

diff --git a/factory/facFqBivarUtil.cc b/factory/facFqBivarUtil.cc
index 6714672..11ee282 100644
--- a/factory/facFqBivarUtil.cc
+++ b/factory/facFqBivarUtil.cc
@@ -479,10 +479,33 @@ logarithmicDerivative (const CanonicalForm& F, const CanonicalForm& G, int l,
   CanonicalForm q,r;
   CanonicalForm logDeriv;
 
-  CanonicalForm bufF= F;
-  CanonicalForm oldF= mulMod2 (G, oldQ, xToL);
-  bufF -= oldF;
-  bufF= div (bufF, xToOldL);
+  CanonicalForm bufF;
+  if ((oldL > 100 && l - oldL < 50) || (oldL < 100 && l - oldL < 30))
+  {
+    bufF= F;
+    CanonicalForm oldF= mulMod2 (G, oldQ, xToL);
+    bufF -= oldF;
+    bufF= div (bufF, xToOldL);
+  }
+  else
+  {
+    //middle product style computation of [G*oldQ]^{l}_{oldL}
+    CanonicalForm G3= div (G, xToOldL);
+    CanonicalForm Up= mulMod2 (G3, oldQ, xToLOldL);
+    CanonicalForm xToOldL2= power (x, oldL/2);
+    CanonicalForm G2= mod (G, xToOldL);
+    CanonicalForm G1= div (G2, xToOldL2);
+    CanonicalForm G0= mod (G2, xToOldL2);
+    CanonicalForm oldQ1= div (oldQ, xToOldL2);
+    CanonicalForm oldQ0= mod (oldQ, xToOldL2);
+    CanonicalForm Mid= mulMod2 (G1, oldQ1, xToLOldL);
+    //computation of Low might be faster using a real middle product?
+    CanonicalForm Low= mulMod2 (G0, oldQ1, xToOldL)+mulMod2 (G1, oldQ0, xToOldL);
+    Low= div (Low, xToOldL2);
+    Up += Mid + Low;
+    bufF= div (F, xToOldL);
+    bufF -= Up;
+  }
 
   q= newtonDiv (bufF, G, xToLOldL);
   q *= xToOldL;

-- 
an open source computer algebra system



More information about the debian-science-commits mailing list