spielwiese
Last change
on this file since 0bc5ed4 was
84be83,
checked in by Martin Lee <martinlee84@…>, 11 years ago
|
chg: added more tests to factorizeQ_l
|
-
Property mode set to
100644
|
File size:
799 bytes
|
Line | |
---|
1 | LIB "tst.lib"; |
---|
2 | tst_init(); |
---|
3 | |
---|
4 | proc testfactors (list l, poly f) |
---|
5 | { |
---|
6 | poly g= 1; |
---|
7 | for (int i= 1; i <= size (l[1]); i++) |
---|
8 | { |
---|
9 | g= g*(l[1][i]^l[2][i]); |
---|
10 | } |
---|
11 | g == f; |
---|
12 | l; |
---|
13 | } |
---|
14 | |
---|
15 | ring r=0,(x,y,z,s,u,v,w),dp; |
---|
16 | list l; |
---|
17 | poly f= (1+x+y+z)^20+1; |
---|
18 | poly g= f*(f+1); |
---|
19 | |
---|
20 | l= factorize (g); testfactors (l, g); |
---|
21 | tst_status(); |
---|
22 | |
---|
23 | f= (1+x2+y2+z2)^20+1; |
---|
24 | g= f*(f+1); |
---|
25 | |
---|
26 | l= factorize (g); testfactors (l, g); |
---|
27 | tst_status(); |
---|
28 | |
---|
29 | f= (1+x+y+z)^30+1; |
---|
30 | g= f*(f+1); |
---|
31 | |
---|
32 | l= factorize (g); testfactors (l, g); |
---|
33 | tst_status(); |
---|
34 | |
---|
35 | f= (1+x+y+z+s)^20+1; |
---|
36 | g= f*(f+1); |
---|
37 | |
---|
38 | l= factorize (g); testfactors (l, g); |
---|
39 | tst_status(); |
---|
40 | |
---|
41 | f=(1+u2+v+w2+x-y)^10+1; |
---|
42 | g=(1+u+v2+w+x2-y)^10+1; |
---|
43 | g=g*f; |
---|
44 | |
---|
45 | l= factorize (g); testfactors (l, g); |
---|
46 | tst_status(); |
---|
47 | |
---|
48 | f=(1+x)^20*(1+y)^20*(1+z)^20+1; |
---|
49 | g=(1-x)^20*(1-y)^20*(1-z)^20+1; |
---|
50 | g=g*f; |
---|
51 | |
---|
52 | l= factorize (g); testfactors (l, g); |
---|
53 | |
---|
54 | tst_status(1);$ |
---|
Note: See
TracBrowser
for help on using the repository browser.