source: git/Tst/Short/gcd5primtest.tst @ 5ebd4bc

spielwiese
Last change on this file since 5ebd4bc was 17642b, checked in by Martin Lee <martinlee84@…>, 12 years ago
fix: typo in test
  • Property mode set to 100644
File size: 717 bytes
Line 
1LIB "tst.lib";tst_init();
2proc test5prim (int p)
3{
4  ring r= p, x(1..11), dp;
5  poly d1= x(1);
6  poly d2= x(2);
7  poly f1= x(1);
8  poly f2= x(2);
9  poly g1= x(1);
10  poly g2= x(2);
11  poly d= d1*d2 - 1;
12  poly f= f1*f2 + 2;
13  poly g= g1*g2 - 2;
14  f= f*d;
15  g= g*d;
16  poly testgcd= gcd (f,g);
17  testgcd= testgcd/leadcoef (testgcd);
18  testgcd == d;
19  int i;
20  for (i= 3; i <= 11; i++)
21  {
22    d2= d2*x(i);
23    f2= f2*x(i);
24    g2= g2*x(i);
25   
26    d= d1*d2 - 1;
27    f= f1*f2 + 2;
28    g= g1*g2 - 2;
29    f= f*d;
30    g= g*d;
31    testgcd= gcd (f,g);
32    testgcd= testgcd/leadcoef (testgcd);
33    testgcd == d;
34  }
35}
36
37test5prim (3);
38tst_status();
39test5prim (43051);
40tst_status();
41test5prim (0);
42tst_status();
43tst_status(1);
44$
Note: See TracBrowser for help on using the repository browser.