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 | |
---|
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 | 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 | |
---|
19 | ring R = 0, x, lp; |
---|
20 | |
---|
21 | matrix h70[70][70]; |
---|
22 | h70 = hilbert(70); |
---|
23 | |
---|
24 | tst_InitTimer(); |
---|
25 | |
---|
26 | matrix i_h70 = inverse(h70); |
---|
27 | |
---|
28 | tst_ReportTimer("K"); |
---|
29 | |
---|
30 | matrix check; |
---|
31 | |
---|
32 | tst_InitTimer(); |
---|
33 | |
---|
34 | check = i_h70 * h70; |
---|
35 | |
---|
36 | tst_ReportTimer("L"); |
---|
37 | |
---|
38 | check == matrix(freemodule(70)); |
---|
39 | |
---|
40 | kill R, hilbert; |
---|
41 | |
---|
42 | tst_status(1); $ |
---|
Note: See
TracBrowser
for help on using the repository browser.