X-Git-Url: https://www.ginac.de/ginac.git//ginac.git?p=ginac.git;a=blobdiff_plain;f=check%2Fcheck_lsolve.cpp;h=d09b6e9dda94fe7b30703256480bb9f1ad8dd753;hp=a964c4b305352012393dad56dbe6b9bead9e752b;hb=HEAD;hpb=0c8c12f5393a7ca5f78233af5ee81593184c35fb diff --git a/check/check_lsolve.cpp b/check/check_lsolve.cpp index a964c4b3..8496b45c 100644 --- a/check/check_lsolve.cpp +++ b/check/check_lsolve.cpp @@ -1,10 +1,11 @@ /** @file check_lsolve.cpp * * These test routines do some simple checks on solving linear systems of - * symbolic equations. */ + * symbolic equations. They are a well-tried resource for cross-checking + * the underlying symbolic manipulations. */ /* - * GiNaC Copyright (C) 1999-2001 Johannes Gutenberg University Mainz, Germany + * GiNaC Copyright (C) 1999-2024 Johannes Gutenberg University Mainz, Germany * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -18,11 +19,19 @@ * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#include "checks.h" +#include "ginac.h" +using namespace GiNaC; + +#include // for rand() +#include #include +using namespace std; + +extern const ex +dense_univariate_poly(const symbol & x, unsigned degree); static unsigned check_matrix_solve(unsigned m, unsigned n, unsigned p, unsigned degree) @@ -96,7 +105,7 @@ static unsigned check_inifcns_lsolve(unsigned n) { unsigned result = 0; - for (int repetition=0; repetition<100; ++repetition) { + for (int repetition=0; repetition<200; ++repetition) { // create two size n vectors of symbols, one for the coefficients // a[0],..,a[n], one for indeterminates x[0]..x[n]: vector a; @@ -109,7 +118,6 @@ static unsigned check_inifcns_lsolve(unsigned n) } lst eqns; // equation list lst vars; // variable list - ex sol; // solution // Create a random linear system... for (unsigned i=0; i