source: git/Tst/Wester/I.tst @ 33ec11

spielwiese
Last change on this file since 33ec11 was 2e49a5, checked in by Olaf Bachmann <obachman@…>, 23 years ago
* initial commit git-svn-id: file:///usr/local/Singular/svn/trunk@5001 2c84dea3-7e68-4137-9b89-c4e89433aadc
  • Property mode set to 100644
File size: 544 bytes
Line 
1LIB "tst.lib"; tst_init();
2LIB "linalg.lib";
3
4proc hilbert (int n)
5{
6   matrix a[n][n];
7   int j;
8   for (int i = 1; i <= n; i++)
9      {
10      for (j = 1; j <= n; j++)
11         {
12         a[i, j] = 1/(number(i) + number(j) - 1);
13         }
14      }
15   return(a);
16}
17
18ring R = 0, x, lp;
19
20matrix h40[40][40];
21h40 = hilbert(40);
22
23tst_InitTimer();
24
25matrix i_h40 = inverse(h40);
26
27tst_ReportTimer("I");
28
29matrix check;
30
31tst_InitTimer();
32
33check = i_h40 * h40;
34
35tst_ReportTimer("J");
36
37check == matrix(freemodule(40));
38
39kill R, hilbert;
40
41tst_status(1); $
Note: See TracBrowser for help on using the repository browser.