34 {
35 PrintS(
"This is a Test 2\n");
39
40
41
42
43
45 for(
int i=1;
i<=3;
i++) {
47 }
48 m->set(1,2,
n_Init(1,coef), coef);
49 m->set(2,3,
n_Init(1,coef), coef);
50 m->set(3,1,
n_Init(1,coef), coef);
51
54
56
58 enumer =
l->enumerate_all(c);
59
60
64 }
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120 PrintS("polynomial\n");
121 number * poly = new number[5];//(number *)omAlloc( (5) * sizeof( number ) );//new number[5];
122 //poly[0] = n_Init(6,coef);
123 //poly[1] = n_Init(0,coef);
124 //poly[2] = n_Init(5,coef);//positiv imagin??r, negatic reelle wurzeln
125 //poly[3] = n_Init(0,coef);
126 //poly[4] = n_Init(1,coef);
127 poly[0] = n_Init(-1,coef);
128 poly[1] = n_Init(0,coef);
129 poly[2] = n_Init(0,coef);
130 poly[3] = n_Init(3,coef);
131 poly[4] = n_Init(1,coef);
132 int prec = 42;
133 //coeffs rea = nInitChar(n_long_R,NULL);
134 //setGMPFloatDigits( prec, prec);
135 //number abc = n_Init(1,rea);
136 //abc = n_Div(abc,n_Init(3333,rea),rea);
137 //n_Print(abc,rea);
138 //PrintS("\n");
139 bigintmat * gitter = NULL;PrintS("Call function\n");
140 gitter = minkowksi(elementarray,4,poly,4,coef,prec);
141 if(gitter !=NULL){
142 gitter->Print();PrintS("\n");
143 //cout << "CoeffType of gitter: " << getCoeffType(gitter->basecoeffs()) << '\n';
144 coeffs rea = gitter->basecoeffs();
145 number sqrt = squareroot(n_Init(100,rea),rea,prec);
146 n_Print(sqrt,rea);
147 PrintS("\n");
148 }
149 //*/
150
152
154}
static FORCE_INLINE number n_Init(long i, const coeffs r)
a number representing i in the given coeff field/ring r
The main handler for Singular numbers which are suitable for Singular polynomials.
VAR ring currRing
Widely used global variable which specifies the current polynomial ring for Singular interpreter and ...