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

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


The following commit has been merged in the cleanedupstream branch:
commit 193cb6c49eb1de68f2731102ec43522ce19531e4
Author: Martin Lee <martinlee84 at web.de>
Date:   Mon Mar 5 21:45:49 2012 +0100

    chg: faster reversion of Kronecker substitution

diff --git a/factory/facMul.cc b/factory/facMul.cc
index e04e881..ee19acf 100644
--- a/factory/facMul.cc
+++ b/factory/facMul.cc
@@ -61,7 +61,7 @@ reverseSubstQa (const fmpz_poly_t F, int d, const Variable& alpha,
   int k= 0;
   int degfSubK;
   int repLength, j;
-  CanonicalForm coeff;
+  CanonicalForm coeff, ff;
   fmpz* tmp;
   while (degf >= k)
   {
@@ -77,14 +77,15 @@ reverseSubstQa (const fmpz_poly_t F, int d, const Variable& alpha,
       tmp= fmpz_poly_get_coeff_ptr (F, j+k);
       if (!fmpz_is_zero (tmp))
       {
-        CanonicalForm ff= convertFmpz2CF (tmp)/den;
-        coeff += ff*power (alpha, j);
+        ff= convertFmpz2CF (tmp);
+        coeff += ff*power (alpha, j); //TODO faster reduction mod alpha
       }
     }
     result += coeff*power (x, i);
     i++;
     k= d*i;
   }
+  result /= den;
   return result;
 }
 

-- 
an open source computer algebra system



More information about the debian-science-commits mailing list