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

Bernhard R. Link brlink at debian.org
Tue Apr 24 15:53:21 UTC 2012


The following commit has been merged in the cleanedupstream branch:
commit 337239693e299f527ae292640e246dca2c92481d
Author: Martin Lee <martinlee84 at web.de>
Date:   Tue Feb 21 15:37:28 2012 +0100

    fix: compilation errors with --enable-assertions

diff --git a/factory/algext.cc b/factory/algext.cc
index 96528a4..131943a 100644
--- a/factory/algext.cc
+++ b/factory/algext.cc
@@ -13,6 +13,8 @@
 #endif
 #endif
 
+#include "assert.h"
+
 #include "templates/ftmpl_functions.h"
 #include "cf_defs.h"
 #include "canonicalform.h"
diff --git a/factory/cf_gcd_smallp.cc b/factory/cf_gcd_smallp.cc
index 492b2df..d4e6bc9 100755
--- a/factory/cf_gcd_smallp.cc
+++ b/factory/cf_gcd_smallp.cc
@@ -1470,7 +1470,6 @@ CFArray
 solveGeneralVandermonde (const CFArray& M, const CFArray& A)
 {
   int r= M.size();
-  ASSERT (c == r, "number of columns and rows not equal");
   ASSERT (A.size() == r, "vector does not have right size");
   if (r == 1)
   {
@@ -1965,8 +1964,8 @@ monicSparseInterpol (const CanonicalForm& F, const CanonicalForm& G,
   B= M(B);
 
   Variable x= Variable (1);
-  ASSERT (degree (A, y) == 0, "expected degree (F, 1) == 0");
-  ASSERT (degree (B, y) == 0, "expected degree (G, 1) == 0");
+  ASSERT (degree (A, x) == 0, "expected degree (F, 1) == 0");
+  ASSERT (degree (B, x) == 0, "expected degree (G, 1) == 0");
 
   //univariate case
   if (A.isUnivariate() && B.isUnivariate())
@@ -2223,8 +2222,8 @@ nonMonicSparseInterpol (const CanonicalForm& F, const CanonicalForm& G,
   B= M(B);
 
   Variable x= Variable (1);
-  ASSERT (degree (A, y) == 0, "expected degree (F, 1) == 0");
-  ASSERT (degree (B, y) == 0, "expected degree (G, 1) == 0");
+  ASSERT (degree (A, x) == 0, "expected degree (F, 1) == 0");
+  ASSERT (degree (B, x) == 0, "expected degree (G, 1) == 0");
 
   //univariate case
   if (A.isUnivariate() && B.isUnivariate())
diff --git a/factory/cf_gcd_smallp.h b/factory/cf_gcd_smallp.h
index 9ec5126..ee3a4ef 100644
--- a/factory/cf_gcd_smallp.h
+++ b/factory/cf_gcd_smallp.h
@@ -20,8 +20,11 @@
 //*****************************************************************************
 
 #include <config.h>
+
 #include "assert.h"
 
+#include "cf_factory.h"
+
 CanonicalForm GCD_Fp_extension (const CanonicalForm& F, const CanonicalForm& G,
                   Variable & alpha, CFList& l, bool& top_level);
 
diff --git a/factory/facAlgExt.cc b/factory/facAlgExt.cc
index 1b18274..aeadea7 100755
--- a/factory/facAlgExt.cc
+++ b/factory/facAlgExt.cc
@@ -163,7 +163,6 @@ AlgExtFactorize (const CanonicalForm& F, const Variable& alpha)
   }
 
   factors.insert (CFFactor (Lc(F), 1));
-  ASSERT (degree (buf) <= 0, "bug in AlgExtFactorize");
   if (save_rat) Off(SW_RATIONAL);
   return factors;
 }
diff --git a/factory/facSparseHensel.h b/factory/facSparseHensel.h
index dc8bcde..83f3d4c 100644
--- a/factory/facSparseHensel.h
+++ b/factory/facSparseHensel.h
@@ -13,6 +13,8 @@
 #ifndef FAC_SPARSE_HENSEL_H
 #define FAC_SPARSE_HENSEL_H
 
+#include "assert.h"
+
 #include "canonicalform.h"
 #include "cf_map_ext.h"
 #include "cf_iter.h"
diff --git a/factory/gfops.cc b/factory/gfops.cc
index dbc974b..3b153e4 100644
--- a/factory/gfops.cc
+++ b/factory/gfops.cc
@@ -211,7 +211,7 @@ static void gf_get_table ( int p, int n )
 
 void gf_setcharacteristic ( int p, int n, char name )
 {
-    ASSERT( gf_valid_combination( p, n ), "illegal immediate GF(q)" );
+    //ASSERT( gf_valid_combination( p, n ), "illegal immediate GF(q)" );
     gf_name = name;
     gf_get_table( p, n );
 }
diff --git a/factory/templates/ftmpl_array.cc b/factory/templates/ftmpl_array.cc
index b12764d..009411b 100644
--- a/factory/templates/ftmpl_array.cc
+++ b/factory/templates/ftmpl_array.cc
@@ -1,6 +1,8 @@
 /* emacs edit mode for this file is -*- C++ -*- */
 /* $Id$ */
 
+#include <factory/assert.h>
+
 #include <factory/templates/ftmpl_array.h>
 
 template <class T>
diff --git a/factory/templates/ftmpl_list.cc b/factory/templates/ftmpl_list.cc
index 910a5a6..bae5dea 100644
--- a/factory/templates/ftmpl_list.cc
+++ b/factory/templates/ftmpl_list.cc
@@ -1,6 +1,8 @@
 /* emacs edit mode for this file is -*- C++ -*- */
 /* $Id$ */
 
+#include <factory/assert.h>
+
 #include <factory/templates/ftmpl_list.h>
 
 template <class T>
diff --git a/factory/templates/ftmpl_matrix.cc b/factory/templates/ftmpl_matrix.cc
index 9c23f6e..bc5de33 100644
--- a/factory/templates/ftmpl_matrix.cc
+++ b/factory/templates/ftmpl_matrix.cc
@@ -1,6 +1,8 @@
 /* emacs edit mode for this file is -*- C++ -*- */
 /* $Id$ */
 
+#include <factory/assert.h>
+
 #include <factory/templates/ftmpl_matrix.h>
 
 template <class T>
diff --git a/factory/variable.cc b/factory/variable.cc
index 1736a78..31d53cd 100644
--- a/factory/variable.cc
+++ b/factory/variable.cc
@@ -168,7 +168,7 @@ static CanonicalForm conv2mipo ( const CanonicalForm & mipo, const Variable alph
 
 Variable rootOf( const CanonicalForm & mipo, char name )
 {
-    ASSERT( legal_mipo( mipo ), "not a legal extension" );
+    //ASSERT( legal_mipo( mipo ), "not a legal extension" );
 
     int l;
     if ( var_names_ext == 0 ) {

-- 
an open source computer algebra system



More information about the debian-science-commits mailing list