X-Git-Url: https://www.ginac.de/ginac.git//ginac.git?p=ginac.git;a=blobdiff_plain;f=check%2Ftime_lw_H.cpp;h=ffe59484dff5b54b6ab902b53b19ee0c08e02be5;hp=a7c5c852ddbe149e04a0f49978f3eb7dbfa48d05;hb=55af76071727bd6e2fd540ad58eac26dd961f9c9;hpb=70ff026226b1a1a7530e8a1d934b98ad42795a1d diff --git a/check/time_lw_H.cpp b/check/time_lw_H.cpp index a7c5c852..ffe59484 100644 --- a/check/time_lw_H.cpp +++ b/check/time_lw_H.cpp @@ -4,7 +4,7 @@ * Lewis and Michael Wester. */ /* - * GiNaC Copyright (C) 1999-2000 Johannes Gutenberg University Mainz, Germany + * GiNaC Copyright (C) 1999-2008 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,52 +18,72 @@ * * 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 "times.h" +#include +#include +#include "ginac.h" +#include "timer.h" +using namespace std; +using namespace GiNaC; -static unsigned test(void) +static unsigned test(unsigned n) { - matrix h80(80,80); - - for (unsigned r=0; r<80; ++r) - for (unsigned c=0; c<80; ++c) - h80.set(r,c,numeric(1,r+c+1)); - ex det = h80.determinant(); - - if (abs(det.evalf()-numeric(".10097939769690107E-3789"))>numeric("1.E-3800")) { - clog << "determinant of 80x80 erroneously returned " << det << endl; - return 1; - } - return 0; + matrix hilbert(n,n); + + for (unsigned r=0; r