From: Richard Kreckel Date: Sat, 25 Mar 2000 20:58:05 +0000 (+0000) Subject: - Two more tests from the Lewis-Wester paper. X-Git-Tag: release_0-6-0~50 X-Git-Url: https://www.ginac.de/ginac.git//ginac.git?p=ginac.git;a=commitdiff_plain;h=b6415364be14b7f3129ffe3d54e7c3c8bc74ed3c - Two more tests from the Lewis-Wester paper. --- diff --git a/check/Makefile.am b/check/Makefile.am index 323fde13..1fcec8ad 100644 --- a/check/Makefile.am +++ b/check/Makefile.am @@ -12,7 +12,7 @@ checks_LDADD = ../ginac/libginac.la times_SOURCES = time_dennyfliegner.cpp time_gammaseries.cpp \ time_vandermonde.cpp time_toeplitz.cpp time_lw_A.cpp time_lw_B.cpp \ time_lw_C.cpp time_lw_D.cpp time_lw_E.cpp time_lw_F.cpp time_lw_G.cpp \ - time_lw_H.cpp timer.cpp times.cpp times.h + time_lw_H.cpp time_lw_P.cpp time_lw_Pprime.cpp timer.cpp times.cpp times.h times_LDADD = ../ginac/libginac.la INCLUDES = -I$(srcdir)/../ginac CLEANFILES = exams.out checks.out times.out diff --git a/check/Makefile.in b/check/Makefile.in index 8d5903b7..7ffe01e9 100644 --- a/check/Makefile.in +++ b/check/Makefile.in @@ -111,7 +111,7 @@ exams_LDADD = ../ginac/libginac.la checks_SOURCES = check_numeric.cpp check_inifcns.cpp check_matrices.cpp check_lsolve.cpp genex.cpp checks.cpp checks.h checks_LDADD = ../ginac/libginac.la -times_SOURCES = time_dennyfliegner.cpp time_gammaseries.cpp time_vandermonde.cpp time_toeplitz.cpp time_lw_A.cpp time_lw_B.cpp time_lw_C.cpp time_lw_D.cpp time_lw_E.cpp time_lw_F.cpp time_lw_G.cpp time_lw_H.cpp timer.cpp times.cpp times.h +times_SOURCES = time_dennyfliegner.cpp time_gammaseries.cpp time_vandermonde.cpp time_toeplitz.cpp time_lw_A.cpp time_lw_B.cpp time_lw_C.cpp time_lw_D.cpp time_lw_E.cpp time_lw_F.cpp time_lw_G.cpp time_lw_H.cpp time_lw_P.cpp time_lw_Pprime.cpp timer.cpp times.cpp times.h times_LDADD = ../ginac/libginac.la INCLUDES = -I$(srcdir)/../ginac @@ -137,8 +137,8 @@ checks_DEPENDENCIES = ../ginac/libginac.la checks_LDFLAGS = times_OBJECTS = time_dennyfliegner.o time_gammaseries.o \ time_vandermonde.o time_toeplitz.o time_lw_A.o time_lw_B.o time_lw_C.o \ -time_lw_D.o time_lw_E.o time_lw_F.o time_lw_G.o time_lw_H.o timer.o \ -times.o +time_lw_D.o time_lw_E.o time_lw_F.o time_lw_G.o time_lw_H.o time_lw_P.o \ +time_lw_Pprime.o timer.o times.o times_DEPENDENCIES = ../ginac/libginac.la times_LDFLAGS = CXXFLAGS = @CXXFLAGS@ @@ -167,8 +167,9 @@ DEP_FILES = .deps/check_inifcns.P .deps/check_lsolve.P \ .deps/exams.P .deps/genex.P .deps/time_dennyfliegner.P \ .deps/time_gammaseries.P .deps/time_lw_A.P .deps/time_lw_B.P \ .deps/time_lw_C.P .deps/time_lw_D.P .deps/time_lw_E.P .deps/time_lw_F.P \ -.deps/time_lw_G.P .deps/time_lw_H.P .deps/time_toeplitz.P \ -.deps/time_vandermonde.P .deps/timer.P .deps/times.P +.deps/time_lw_G.P .deps/time_lw_H.P .deps/time_lw_P.P \ +.deps/time_lw_Pprime.P .deps/time_toeplitz.P .deps/time_vandermonde.P \ +.deps/timer.P .deps/times.P SOURCES = $(exams_SOURCES) $(checks_SOURCES) $(times_SOURCES) OBJECTS = $(exams_OBJECTS) $(checks_OBJECTS) $(times_OBJECTS) @@ -282,7 +283,7 @@ distdir: $(DISTFILES) @for file in $(DISTFILES); do \ d=$(srcdir); \ if test -d $$d/$$file; then \ - cp -pr $$/$$file $(distdir)/$$file; \ + cp -pr $$d/$$file $(distdir)/$$file; \ else \ test -f $(distdir)/$$file \ || ln $$d/$$file $(distdir)/$$file 2> /dev/null \ diff --git a/check/time_lw_P.cpp b/check/time_lw_P.cpp new file mode 100644 index 00000000..37772ef1 --- /dev/null +++ b/check/time_lw_P.cpp @@ -0,0 +1,73 @@ +/** @file time_lw_P.cpp + * + * Test P from the paper "Comparison of Polynomial-Oriented CAS" by Robert H. + * Lewis and Michael Wester. */ + +/* + * GiNaC Copyright (C) 1999-2000 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 + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * 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 + */ + +#include "times.h" +#include "time_lw_w101n.h" + +static unsigned test(void) +{ + matrix m(101,101); + for (unsigned r=0; r<101; ++r) { + for (unsigned c=0; c<10; ++c) { + m.set(r, + unsigned(ex_to_numeric(w101_numeric[r][2*c+1]).to_int()-1), + w101_numeric[r][2*c+2]); + } + } + ex det = m.determinant(); + + if (det!=numeric("75810815066186520")) { + clog << "det of sparse rank 101 matrix erroneously returned " << det << endl; + return 1; + } + return 0; +} + +unsigned time_lw_P(void) +{ + unsigned result = 0; + unsigned count = 1; + timer rolex; + double time = .0; + + cout << "timing Lewis-Wester test P (det of sparse rank 101)" << flush; + clog << "-------Lewis-Wester test P (det of sparse rank 101)" << endl; + + rolex.start(); + // correct for very small times: + do { + result = test(); + ++count; + } while ((time=rolex.read())<0.1 && !result); + cout << '.' << flush; + + if (!result) { + cout << " passed "; + clog << "(no output)" << endl; + } else { + cout << " failed "; + } + cout << int(1000*(time/count))*0.001 << 's' << endl; + + return result; +} diff --git a/check/time_lw_Pprime.cpp b/check/time_lw_Pprime.cpp new file mode 100644 index 00000000..88854b29 --- /dev/null +++ b/check/time_lw_Pprime.cpp @@ -0,0 +1,88 @@ +/** @file time_lw_Pprime.cpp + * + * Test P' from the paper "Comparison of Polynomial-Oriented CAS" by Robert H. + * Lewis and Michael Wester. */ + +/* + * GiNaC Copyright (C) 1999-2000 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 + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * 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 + */ + +#include "times.h" +#include "time_lw_w101n.h" + +static unsigned test(void) +{ + matrix m(101,101); + for (unsigned r=0; r<101; ++r) { + for (unsigned c=0; c<10; ++c) { + m.set(r, + unsigned(ex_to_numeric(w101_numeric[r][2*c+1]).to_int()-1), + w101_numeric[r][2*c+2]); + } + } + matrix m2(m); + ex a; + for (unsigned r=0; r<101; ++r) { + a = m2(r,0); + for (unsigned c=0; c<100; ++c) { + m2.set(r,c,m2(r,c+1)); + } + m2.set(r,100,a); + } + for (unsigned r=0; r<101; ++r) { + for (unsigned c=0; c<101; ++c) { + if (!m(r,c).is_zero()) + m2.set(r,c,m(r,c)); + } + } + ex det = m2.determinant(); + + if (det!=numeric("140816284877507872414776")) { + clog << "det of less sparse rank 101 matrix erroneously returned " << det << endl; + return 1; + } + return 0; +} + +unsigned time_lw_Pprime(void) +{ + unsigned result = 0; + unsigned count = 1; + timer rolex; + double time = .0; + + cout << "timing Lewis-Wester test P' (det of less sparse rank 101)" << flush; + clog << "-------Lewis-Wester test P' (det of less sparse rank 101)" << endl; + + rolex.start(); + // correct for very small times: + do { + result = test(); + ++count; + } while ((time=rolex.read())<0.1 && !result); + cout << '.' << flush; + + if (!result) { + cout << " passed "; + clog << "(no output)" << endl; + } else { + cout << " failed "; + } + cout << int(1000*(time/count))*0.001 << 's' << endl; + + return result; +} diff --git a/check/time_lw_w101n.h b/check/time_lw_w101n.h new file mode 100644 index 00000000..247fe46d --- /dev/null +++ b/check/time_lw_w101n.h @@ -0,0 +1,103 @@ +static ex w101_numeric[101][21] = { + { 1, 1, 1, 12, 9, 22, 8, 32, 7, 42, 6, 52, 5, 62, 4, 72, 3, 82, 2, 92, 1 }, + { 2, 2, 1, 13, 9, 23, 8, 33, 7, 43, 6, 53, 5, 63, 4, 73, 3, 83, 2, 93, 1 }, + { 3, 3, 1, 14, 9, 24, 8, 34, 7, 44, 6, 54, 5, 64, 4, 74, 3, 84, 2, 94, 1 }, + { 4, 4, 1, 15, 9, 25, 8, 35, 7, 45, 6, 55, 5, 65, 4, 75, 3, 85, 2, 95, 1 }, + { 5, 5, 1, 16, 9, 26, 8, 36, 7, 46, 6, 56, 5, 66, 4, 76, 3, 86, 2, 96, 1 }, + { 6, 6, 1, 17, 9, 27, 8, 37, 7, 47, 6, 57, 5, 67, 4, 77, 3, 87, 2, 97, 1 }, + { 7, 7, 1, 18, 9, 28, 8, 38, 7, 48, 6, 58, 5, 68, 4, 78, 3, 88, 2, 98, 1 }, + { 8, 8, 1, 19, 9, 29, 8, 39, 7, 49, 6, 59, 5, 69, 4, 79, 3, 89, 2, 99, 1 }, + { 9, 9, 1, 20, 9, 30, 8, 40, 7, 50, 6, 60, 5, 70, 4, 80, 3, 90, 2, 100, 1 }, + { 10, 10, 1, 101, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0 }, + { 11, 2, 10, 11, 1, 22, 8, 32, 7, 42, 6, 52, 5, 62, 4, 72, 3, 82, 2, 92, 1 }, + { 12, 3, 10, 12, 1, 23, 8, 33, 7, 43, 6, 53, 5, 63, 4, 73, 3, 83, 2, 93, 1 }, + { 13, 4, 10, 13, 1, 24, 8, 34, 7, 44, 6, 54, 5, 64, 4, 74, 3, 84, 2, 94, 1 }, + { 14, 5, 10, 14, 1, 25, 8, 35, 7, 45, 6, 55, 5, 65, 4, 75, 3, 85, 2, 95, 1 }, + { 15, 6, 10, 15, 1, 26, 8, 36, 7, 46, 6, 56, 5, 66, 4, 76, 3, 86, 2, 96, 1 }, + { 16, 7, 10, 16, 1, 27, 8, 37, 7, 47, 6, 57, 5, 67, 4, 77, 3, 87, 2, 97, 1 }, + { 17, 8, 10, 17, 1, 28, 8, 38, 7, 48, 6, 58, 5, 68, 4, 78, 3, 88, 2, 98, 1 }, + { 18, 9, 10, 18, 1, 29, 8, 39, 7, 49, 6, 59, 5, 69, 4, 79, 3, 89, 2, 99, 1 }, + { 19, 10, 10, 19, 1, 30, 8, 40, 7, 50, 6, 60, 5, 70, 4, 80, 3, 90, 2, 100, 1 }, + { 20, 20, 1, 101, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0 }, + { 21, 2, 10, 12, 9, 21, 1, 32, 7, 42, 6, 52, 5, 62, 4, 72, 3, 82, 2, 92, 1 }, + { 22, 3, 10, 13, 9, 22, 1, 33, 7, 43, 6, 53, 5, 63, 4, 73, 3, 83, 2, 93, 1 }, + { 23, 4, 10, 14, 9, 23, 1, 34, 7, 44, 6, 54, 5, 64, 4, 74, 3, 84, 2, 94, 1 }, + { 24, 5, 10, 15, 9, 24, 1, 35, 7, 45, 6, 55, 5, 65, 4, 75, 3, 85, 2, 95, 1 }, + { 25, 6, 10, 16, 9, 25, 1, 36, 7, 46, 6, 56, 5, 66, 4, 76, 3, 86, 2, 96, 1 }, + { 26, 7, 10, 17, 9, 26, 1, 37, 7, 47, 6, 57, 5, 67, 4, 77, 3, 87, 2, 97, 1 }, + { 27, 8, 10, 18, 9, 27, 1, 38, 7, 48, 6, 58, 5, 68, 4, 78, 3, 88, 2, 98, 1 }, + { 28, 9, 10, 19, 9, 28, 1, 39, 7, 49, 6, 59, 5, 69, 4, 79, 3, 89, 2, 99, 1 }, + { 29, 10, 10, 20, 9, 29, 1, 40, 7, 50, 6, 60, 5, 70, 4, 80, 3, 90, 2, 100, 1 }, + { 30, 30, 1, 101, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0 }, + { 31, 2, 10, 12, 9, 22, 8, 31, 1, 42, 6, 52, 5, 62, 4, 72, 3, 82, 2, 92, 1 }, + { 32, 3, 10, 13, 9, 23, 8, 32, 1, 43, 6, 53, 5, 63, 4, 73, 3, 83, 2, 93, 1 }, + { 33, 4, 10, 14, 9, 24, 8, 33, 1, 44, 6, 54, 5, 64, 4, 74, 3, 84, 2, 94, 1 }, + { 34, 5, 10, 15, 9, 25, 8, 34, 1, 45, 6, 55, 5, 65, 4, 75, 3, 85, 2, 95, 1 }, + { 35, 6, 10, 16, 9, 26, 8, 35, 1, 46, 6, 56, 5, 66, 4, 76, 3, 86, 2, 96, 1 }, + { 36, 7, 10, 17, 9, 27, 8, 36, 1, 47, 6, 57, 5, 67, 4, 77, 3, 87, 2, 97, 1 }, + { 37, 8, 10, 18, 9, 28, 8, 37, 1, 48, 6, 58, 5, 68, 4, 78, 3, 88, 2, 98, 1 }, + { 38, 9, 10, 19, 9, 29, 8, 38, 1, 49, 6, 59, 5, 69, 4, 79, 3, 89, 2, 99, 1 }, + { 39, 10, 10, 20, 9, 30, 8, 39, 1, 50, 6, 60, 5, 70, 4, 80, 3, 90, 2, 100, 1 }, + { 40, 40, 1, 101, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0 }, + { 41, 2, 10, 12, 9, 22, 8, 32, 7, 41, 1, 52, 5, 62, 4, 72, 3, 82, 2, 92, 1 }, + { 42, 3, 10, 13, 9, 23, 8, 33, 7, 42, 1, 53, 5, 63, 4, 73, 3, 83, 2, 93, 1 }, + { 43, 4, 10, 14, 9, 24, 8, 34, 7, 43, 1, 54, 5, 64, 4, 74, 3, 84, 2, 94, 1 }, + { 44, 5, 10, 15, 9, 25, 8, 35, 7, 44, 1, 55, 5, 65, 4, 75, 3, 85, 2, 95, 1 }, + { 45, 6, 10, 16, 9, 26, 8, 36, 7, 45, 1, 56, 5, 66, 4, 76, 3, 86, 2, 96, 1 }, + { 46, 7, 10, 17, 9, 27, 8, 37, 7, 46, 1, 57, 5, 67, 4, 77, 3, 87, 2, 97, 1 }, + { 47, 8, 10, 18, 9, 28, 8, 38, 7, 47, 1, 58, 5, 68, 4, 78, 3, 88, 2, 98, 1 }, + { 48, 9, 10, 19, 9, 29, 8, 39, 7, 48, 1, 59, 5, 69, 4, 79, 3, 89, 2, 99, 1 }, + { 49, 10, 10, 20, 9, 30, 8, 40, 7, 49, 1, 60, 5, 70, 4, 80, 3, 90, 2, 100, 1 }, + { 50, 50, 1, 101, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0 }, + { 51, 2, 10, 12, 9, 22, 8, 32, 7, 42, 6, 51, 1, 62, 4, 72, 3, 82, 2, 92, 1 }, + { 52, 3, 10, 13, 9, 23, 8, 33, 7, 43, 6, 52, 1, 63, 4, 73, 3, 83, 2, 93, 1 }, + { 53, 4, 10, 14, 9, 24, 8, 34, 7, 44, 6, 53, 1, 64, 4, 74, 3, 84, 2, 94, 1 }, + { 54, 5, 10, 15, 9, 25, 8, 35, 7, 45, 6, 54, 1, 65, 4, 75, 3, 85, 2, 95, 1 }, + { 55, 6, 10, 16, 9, 26, 8, 36, 7, 46, 6, 55, 1, 66, 4, 76, 3, 86, 2, 96, 1 }, + { 56, 7, 10, 17, 9, 27, 8, 37, 7, 47, 6, 56, 1, 67, 4, 77, 3, 87, 2, 97, 1 }, + { 57, 8, 10, 18, 9, 28, 8, 38, 7, 48, 6, 57, 1, 68, 4, 78, 3, 88, 2, 98, 1 }, + { 58, 9, 10, 19, 9, 29, 8, 39, 7, 49, 6, 58, 1, 69, 4, 79, 3, 89, 2, 99, 1 }, + { 59, 10, 10, 20, 9, 30, 8, 40, 7, 50, 6, 59, 1, 70, 4, 80, 3, 90, 2, 100, 1 }, + { 60, 60, 1, 101, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0 }, + { 61, 2, 10, 12, 9, 22, 8, 32, 7, 42, 6, 52, 5, 61, 1, 72, 3, 82, 2, 92, 1 }, + { 62, 3, 10, 13, 9, 23, 8, 33, 7, 43, 6, 53, 5, 62, 1, 73, 3, 83, 2, 93, 1 }, + { 63, 4, 10, 14, 9, 24, 8, 34, 7, 44, 6, 54, 5, 63, 1, 74, 3, 84, 2, 94, 1 }, + { 64, 5, 10, 15, 9, 25, 8, 35, 7, 45, 6, 55, 5, 64, 1, 75, 3, 85, 2, 95, 1 }, + { 65, 6, 10, 16, 9, 26, 8, 36, 7, 46, 6, 56, 5, 65, 1, 76, 3, 86, 2, 96, 1 }, + { 66, 7, 10, 17, 9, 27, 8, 37, 7, 47, 6, 57, 5, 66, 1, 77, 3, 87, 2, 97, 1 }, + { 67, 8, 10, 18, 9, 28, 8, 38, 7, 48, 6, 58, 5, 67, 1, 78, 3, 88, 2, 98, 1 }, + { 68, 9, 10, 19, 9, 29, 8, 39, 7, 49, 6, 59, 5, 68, 1, 79, 3, 89, 2, 99, 1 }, + { 69, 10, 10, 20, 9, 30, 8, 40, 7, 50, 6, 60, 5, 69, 1, 80, 3, 90, 2, 100, 1 }, + { 70, 70, 1, 101, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0 }, + { 71, 2, 10, 12, 9, 22, 8, 32, 7, 42, 6, 52, 5, 62, 4, 71, 1, 82, 2, 92, 1 }, + { 72, 3, 10, 13, 9, 23, 8, 33, 7, 43, 6, 53, 5, 63, 4, 72, 1, 83, 2, 93, 1 }, + { 73, 4, 10, 14, 9, 24, 8, 34, 7, 44, 6, 54, 5, 64, 4, 73, 1, 84, 2, 94, 1 }, + { 74, 5, 10, 15, 9, 25, 8, 35, 7, 45, 6, 55, 5, 65, 4, 74, 1, 85, 2, 95, 1 }, + { 75, 6, 10, 16, 9, 26, 8, 36, 7, 46, 6, 56, 5, 66, 4, 75, 1, 86, 2, 96, 1 }, + { 76, 7, 10, 17, 9, 27, 8, 37, 7, 47, 6, 57, 5, 67, 4, 76, 1, 87, 2, 97, 1 }, + { 77, 8, 10, 18, 9, 28, 8, 38, 7, 48, 6, 58, 5, 68, 4, 77, 1, 88, 2, 98, 1 }, + { 78, 9, 10, 19, 9, 29, 8, 39, 7, 49, 6, 59, 5, 69, 4, 78, 1, 89, 2, 99, 1 }, + { 79, 10, 10, 20, 9, 30, 8, 40, 7, 50, 6, 60, 5, 70, 4, 79, 1, 90, 2, 100, 1 }, + { 80, 80, 1, 101, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0 }, + { 81, 2, 10, 12, 9, 22, 8, 32, 7, 42, 6, 52, 5, 62, 4, 72, 3, 81, 1, 92, 1 }, + { 82, 3, 10, 13, 9, 23, 8, 33, 7, 43, 6, 53, 5, 63, 4, 73, 3, 82, 1, 93, 1 }, + { 83, 4, 10, 14, 9, 24, 8, 34, 7, 44, 6, 54, 5, 64, 4, 74, 3, 83, 1, 94, 1 }, + { 84, 5, 10, 15, 9, 25, 8, 35, 7, 45, 6, 55, 5, 65, 4, 75, 3, 84, 1, 95, 1 }, + { 85, 6, 10, 16, 9, 26, 8, 36, 7, 46, 6, 56, 5, 66, 4, 76, 3, 85, 1, 96, 1 }, + { 86, 7, 10, 17, 9, 27, 8, 37, 7, 47, 6, 57, 5, 67, 4, 77, 3, 86, 1, 97, 1 }, + { 87, 8, 10, 18, 9, 28, 8, 38, 7, 48, 6, 58, 5, 68, 4, 78, 3, 87, 1, 98, 1 }, + { 88, 9, 10, 19, 9, 29, 8, 39, 7, 49, 6, 59, 5, 69, 4, 79, 3, 88, 1, 99, 1 }, + { 89, 10, 10, 20, 9, 30, 8, 40, 7, 50, 6, 60, 5, 70, 4, 80, 3, 89, 1, 100, 1 }, + { 90, 90, 1, 101, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0 }, + { 91, 2, 10, 12, 9, 22, 8, 32, 7, 42, 6, 52, 5, 62, 4, 72, 3, 82, 2, 91, 1 }, + { 92, 3, 10, 13, 9, 23, 8, 33, 7, 43, 6, 53, 5, 63, 4, 73, 3, 83, 2, 92, 1 }, + { 93, 4, 10, 14, 9, 24, 8, 34, 7, 44, 6, 54, 5, 64, 4, 74, 3, 84, 2, 93, 1 }, + { 94, 5, 10, 15, 9, 25, 8, 35, 7, 45, 6, 55, 5, 65, 4, 75, 3, 85, 2, 94, 1 }, + { 95, 6, 10, 16, 9, 26, 8, 36, 7, 46, 6, 56, 5, 66, 4, 76, 3, 86, 2, 95, 1 }, + { 96, 7, 10, 17, 9, 27, 8, 37, 7, 47, 6, 57, 5, 67, 4, 77, 3, 87, 2, 96, 1 }, + { 97, 8, 10, 18, 9, 28, 8, 38, 7, 48, 6, 58, 5, 68, 4, 78, 3, 88, 2, 97, 1 }, + { 98, 9, 10, 19, 9, 29, 8, 39, 7, 49, 6, 59, 5, 69, 4, 79, 3, 89, 2, 98, 1 }, + { 99, 10, 10, 20, 9, 30, 8, 40, 7, 50, 6, 60, 5, 70, 4, 80, 3, 90, 2, 99, 1 }, + { 100, 100, 1, 101, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0 }, + { 101, 1, 10, 11, 9, 21, 8, 31, 7, 41, 6, 51, 5, 61, 4, 71, 3, 81, 2, 91, 1 } +}; diff --git a/check/times.cpp b/check/times.cpp index 54f36b83..65ca3baf 100644 --- a/check/times.cpp +++ b/check/times.cpp @@ -124,7 +124,23 @@ int main() cout << "Error: caught exception " << e.what() << endl; ++result; } - + + try { + for (int i=0; i<1; ++i) + result += time_lw_P(); + } catch (const exception &e) { + cout << "Error: caught exception " << e.what() << endl; + ++result; + } + + try { + for (int i=0; i<1; ++i) + result += time_lw_Pprime(); + } catch (const exception &e) { + cout << "Error: caught exception " << e.what() << endl; + ++result; + } + if (result) { cout << "Error: something went wrong. "; if (result == 1) { diff --git a/check/times.h b/check/times.h index f1fc2e52..c4919751 100644 --- a/check/times.h +++ b/check/times.h @@ -59,5 +59,7 @@ unsigned time_lw_E(); unsigned time_lw_F(); unsigned time_lw_G(); unsigned time_lw_H(); +unsigned time_lw_P(); +unsigned time_lw_Pprime(); #endif // ndef CHECKS_H diff --git a/check/times.ref b/check/times.ref index e45683b7..074fbdf8 100644 --- a/check/times.ref +++ b/check/times.ref @@ -6,3 +6,23 @@ (no output) -------determinant of polyvariate symbolic Toeplitz matrices: (no output) +-------Lewis-Wester test A (divide factorials) +(no output) +-------Lewis-Wester test B (sum of rational numbers) +(no output) +-------Lewis-Wester test C (gcd of big integers) +(no output) +-------Lewis-Wester test D (sum of rational fcns) +(no output) +-------Lewis-Wester test E (sum of rational fcns) +(no output) +-------Lewis-Wester test F (gcd of 2-var polys) +(no output) +-------Lewis-Wester test G (gcd of 3-var polys) +(no output) +-------Lewis-Wester test H (det of 80x80 Hilbert) +(no output) +-------Lewis-Wester test P (det of sparse rank 101) +(no output) +-------Lewis-Wester test P' (det of less sparse rank 101) +(no output)