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

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


The following commit has been merged in the cleanedupstream branch:
commit f165c2a4a418a4db0b981f19158c7aa9b169a51d
Author: Martin Lee <martinlee84 at web.de>
Date:   Tue Mar 27 22:16:43 2012 +0200

    chg: clear denominators of factors

diff --git a/factory/facBivar.h b/factory/facBivar.h
index bf73faa..fee7673 100644
--- a/factory/facBivar.h
+++ b/factory/facBivar.h
@@ -178,6 +178,15 @@ ratBiFactorize (const CanonicalForm & G,         ///< [in] a bivariate poly
     if (isOn (SW_RATIONAL))
     {
       normalize (result);
+      if (v.level() == 1)
+      {
+        for (CFFListIterator i= result; i.hasItem(); i++)
+        {
+          LcF /= bCommonDen (i.getItem().factor());
+          i.getItem()= CFFactor (i.getItem().factor()*
+                       bCommonDen(i.getItem().factor()), i.getItem().exp());
+        }
+      }
       result.insert (CFFactor (LcF, 1));
     }
     return result;
@@ -201,6 +210,15 @@ ratBiFactorize (const CanonicalForm & G,         ///< [in] a bivariate poly
   if (isOn (SW_RATIONAL))
   {
     normalize (result);
+    if (v.level() == 1)
+    {
+      for (CFFListIterator i= result; i.hasItem(); i++)
+      {
+        LcF /= bCommonDen (i.getItem().factor());
+        i.getItem()= CFFactor (i.getItem().factor()*
+                     bCommonDen(i.getItem().factor()), i.getItem().exp());
+      }
+    }
     result.insert (CFFactor (LcF, 1));
   }
   return result;
diff --git a/factory/facFactorize.h b/factory/facFactorize.h
index 31ffe48..5ccfe16 100644
--- a/factory/facFactorize.h
+++ b/factory/facFactorize.h
@@ -132,6 +132,15 @@ ratFactorize (const CanonicalForm& G,          ///<[in] a multivariate poly
   if (isOn (SW_RATIONAL))
   {
     normalize (result);
+    if (v.level() == 1)
+    {
+      for (CFFListIterator i= result; i.hasItem(); i++)
+      {
+        LcF /= bCommonDen (i.getItem().factor());
+        i.getItem()= CFFactor (i.getItem().factor()*
+                     bCommonDen(i.getItem().factor()), i.getItem().exp());
+      }
+    }
     result.insert (CFFactor (LcF, 1));
   }
   return result;

-- 
an open source computer algebra system



More information about the debian-science-commits mailing list