source: git/Tst/Long/factorizeQ_l.tst @ 56c0fe

fieker-DuValspielwiese
Last change on this file since 56c0fe was 9735e15, checked in by Martin Lee <martinlee84@…>, 12 years ago
chg: added new tests for factorization over Q and Q(a)
  • Property mode set to 100644
File size: 559 bytes
Line 
1LIB "tst.lib";
2tst_init();
3
4proc 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
15ring r=0,(x,y,z,s),dp;
16list l;
17poly f= (1+x+y+z)^20+1;
18poly g= f*(f+1);
19
20l= factorize (g); testfactors (l, g);
21tst_status();
22
23f= (1+x2+y2+z2)^20+1;
24g= f*(f+1);
25
26l= factorize (g); testfactors (l, g);
27tst_status();
28
29f= (1+x+y+z)^30+1;
30g= f*(f+1);
31
32l= factorize (g); testfactors (l, g);
33tst_status();
34
35f= (1+x+y+z+s)^20+1;
36g= f*(f+1);
37
38l= factorize (g); testfactors (l, g);
39
40tst_status(1);$
Note: See TracBrowser for help on using the repository browser.