X-Git-Url: https://www.ginac.de/ginac.git//ginac.git?p=ginac.git;a=blobdiff_plain;f=check%2Ftime_lw_H.cpp;h=a36e5f249f1fce0a629f885b2e7fd248c0811f46;hp=a7c5c852ddbe149e04a0f49978f3eb7dbfa48d05;hb=1d07d8ac9fb47c51aa19a84df6c8c5fee5dd5105;hpb=70ff026226b1a1a7530e8a1d934b98ad42795a1d diff --git a/check/time_lw_H.cpp b/check/time_lw_H.cpp index a7c5c852..a36e5f24 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-2003 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 @@ -23,47 +23,64 @@ #include "times.h" -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