source: git/Tst/Wester/K.tst @ 2e49a5

spielwiese
Last change on this file since 2e49a5 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: 553 bytes
Line 
1LIB "tst.lib"; tst_init();
2LIB "linalg.lib";
3
4proc hilbert (int n)
5{
6   matrix a[n][n];
7   int i, j;
8   int j;
9   for (i = 1; i <= n; i++)
10      {
11      for (j = 1; j <= n; j++)
12         {
13         a[i, j] = 1/(number(i) + number(j) - 1);
14         }
15      }
16   return(a);
17}
18
19ring R = 0, x, lp;
20
21matrix h70[70][70];
22h70 = hilbert(70);
23
24tst_InitTimer();
25
26matrix i_h70 = inverse(h70);
27
28tst_ReportTimer("K");
29
30matrix check;
31
32tst_InitTimer();
33
34check = i_h70 * h70;
35
36tst_ReportTimer("L");
37
38check == matrix(freemodule(70));
39
40kill R, hilbert;
41
42tst_status(1); $
Note: See TracBrowser for help on using the repository browser.