source: git/Tst/New/print_minpoly.tst @ 060421

fieker-DuValspielwiese
Last change on this file since 060421 was 75f460, checked in by Hans Schoenemann <hannes@…>, 9 years ago
format
  • Property mode set to 100644
File size: 1.0 KB
Line 
1LIB "tst.lib"; tst_init();
2
3proc TestRingPrinting(def r, string n)
4{
5  def save = basering;
6
7  setring r;
8
9  "VVVVVVVVVVVV[", n, "]VVVVVVVVVVVV";
10
11  "r == currRing (the following type and print should yield the same output!): ";
12  "type: "; r;
13  "print(ring): "; print(r);
14
15  ring @temp = 2,@a,ds; setring @temp;
16
17  "r != currRing (the following type and print may be different!): ";
18  "type: "; r;
19  "print(ring): "; print(r);
20
21  "^^^^^^^^^^^^[", n, "]^^^^^^^^^^^^";
22  kill @temp;
23
24  setring save;
25}
26int i;
27ring R = (9,a),x,dp;
28
29TestRingPrinting(R, "commutative polynomial ring over GF(3^2)");
30
31for(i = 0; i<= 20; i++)
32{
33  "exp: ", i, ", a^exp: ", a^i;
34}
35
36kill R;
37
38
39
40
41
42
43ring R = (0,a), x,dp; minpoly = a2+1;
44
45TestRingPrinting(R, "commutative polynomial ring over Q[a]/<a2+1>");
46
47for(i = 0; i<= 20; i++)
48{
49  "exp: ", i, ", a^exp: ", a^i;
50}
51
52kill R;
53
54
55
56
57ring R = (complex,30,a), x,dp;
58
59TestRingPrinting(R, "commutative polynomial ring over GMP complex numbers with parameter: 'a'");
60
61for(i = 0; i<= 20; i++)
62{
63  "exp: ", i, ", a^exp: ", a^i;
64}
65
66
67kill R;
68
69
70tst_status(1);$
Note: See TracBrowser for help on using the repository browser.