spielwiese
Last change
on this file since 3d369e was
3d369e,
checked in by Olaf Bachmann <obachman@…>, 23 years ago
|
* added res/stat files
git-svn-id: file:///usr/local/Singular/svn/trunk@5007 2c84dea3-7e68-4137-9b89-c4e89433aadc
|
-
Property mode set to
100644
|
File size:
543 bytes
|
Line | |
---|
1 | LIB "tst.lib"; tst_init(); |
---|
2 | LIB "linalg.lib"; |
---|
3 | |
---|
4 | proc hilbert (int n) |
---|
5 | { |
---|
6 | matrix a[n][n]; |
---|
7 | int i, j; |
---|
8 | for (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 | |
---|
18 | ring R = 0, x, lp; |
---|
19 | |
---|
20 | matrix h70[70][70]; |
---|
21 | h70 = hilbert(70); |
---|
22 | |
---|
23 | tst_InitTimer(); |
---|
24 | |
---|
25 | matrix i_h70 = inverse(h70); |
---|
26 | |
---|
27 | tst_ReportTimer("K"); |
---|
28 | |
---|
29 | matrix check; |
---|
30 | |
---|
31 | tst_InitTimer(); |
---|
32 | |
---|
33 | check = i_h70 * h70; |
---|
34 | |
---|
35 | tst_ReportTimer("L"); |
---|
36 | |
---|
37 | check == matrix(freemodule(70)); |
---|
38 | |
---|
39 | kill R, hilbert; |
---|
40 | |
---|
41 | tst_status(1); $ |
---|
Note: See
TracBrowser
for help on using the repository browser.