My Project
Loading...
Searching...
No Matches
Public Member Functions | Private Member Functions
PolysTestSuite Class Reference

#include <polys_test.h>

Public Member Functions

void test_Z13_t ()
 
void test_QQ_t ()
 
void test_Z11_x_y_z ()
 
void test_QQ_x_y_z ()
 
void test_Z13_t_GF ()
 
void test_Q_Ext_a ()
 
void test_Q_Ext_b ()
 
void test_Z_17_Ext_a ()
 
void test_Q_Ext_s_t ()
 
void test_Q_Ext_Performance ()
 
void test_Q_Ext_s_t_NestedFractions ()
 
void test_Z13_t ()
 
void test_QQ_t ()
 
void test_Z11_x_y_z ()
 
void test_QQ_x_y_z ()
 
void test_Z13_t_GF ()
 
void test_QQ_x_y_z_ord_2_lp ()
 
- Public Member Functions inherited from CxxTest::TestSuite
virtual ~TestSuite ()
 
virtual void setUp ()
 
virtual void tearDown ()
 

Private Member Functions

void plusTerm (poly &p, int c, int i, int exp, const ring r)
 
void plusTermOverQ (poly &p, int c1, int c2, int i, int exp, const ring r)
 
void specialPlusTerm (poly &p, int c1, int c2, int sign, int xExp, int yExp, const ring r)
 
void specialPoly (poly &p, const ring r)
 
void checkInverse (number n, const coeffs cf)
 
number toFractionNumber (poly p, const coeffs cf)
 
void TestArithCf (const coeffs r)
 
void TestSumCf (const coeffs r, const unsigned long N)
 

Detailed Description

Definition at line 209 of file polys_test.h.

Member Function Documentation

◆ checkInverse()

void PolysTestSuite::checkInverse ( number  n,
const coeffs  cf 
)
inlineprivate

Definition at line 1642 of file polys_test.h.

1643 {
1644 clog << "n = "; p_Write((poly)n, cf->extRing);
1645 number n1 = n_Invers(n, cf);
1646 clog << "==> n^(-1) = "; p_Write((poly)n1, cf->extRing);
1647 number n2 = n_Mult(n, n1, cf);
1648 clog << "check: n * n^(-1) = "; p_Write((poly)n2, cf->extRing);
1649 TS_ASSERT( n_IsOne(n2, cf) );
1650 n_Delete(&n1, cf); n_Delete(&n2, cf);
1651 }
#define TS_ASSERT(e)
Definition: TestSuite.h:239
CanonicalForm cf
Definition: cfModGcd.cc:4083
static FORCE_INLINE number n_Mult(number a, number b, const coeffs r)
return the product of 'a' and 'b', i.e., a*b
Definition: coeffs.h:633
static FORCE_INLINE number n_Invers(number a, const coeffs r)
return the multiplicative inverse of 'a'; raise an error if 'a' is not invertible
Definition: coeffs.h:561
static FORCE_INLINE void n_Delete(number *p, const coeffs r)
delete 'p'
Definition: coeffs.h:452
static FORCE_INLINE BOOLEAN n_IsOne(number n, const coeffs r)
TRUE iff 'n' represents the one element.
Definition: coeffs.h:465
void p_Write(poly p, ring lmRing, ring tailRing)
Definition: polys0.cc:342

◆ plusTerm()

void PolysTestSuite::plusTerm ( poly &  p,
int  c,
int  i,
int  exp,
const ring  r 
)
inlineprivate

Definition at line 214 of file polys_test.h.

215 {
216 poly t = p_ISet(c, r);
217 if (exp > 0) { p_SetExp(t, i, exp, r); p_Setm(t, r); }
218 p = p_Add_q(p, t, r);
219 }
int i
Definition: cfEzgcd.cc:132
int p
Definition: cfModGcd.cc:4078
gmp_float exp(const gmp_float &a)
Definition: mpr_complex.cc:357
poly p_ISet(long i, const ring r)
returns the poly representing the integer i
Definition: p_polys.cc:1297
static poly p_Add_q(poly p, poly q, const ring r)
Definition: p_polys.h:934
static unsigned long p_SetExp(poly p, const unsigned long e, const unsigned long iBitmask, const int VarOffset)
set a single variable exponent @Note: VarOffset encodes the position in p->exp
Definition: p_polys.h:486
static void p_Setm(poly p, const ring r)
Definition: p_polys.h:231

◆ plusTermOverQ()

void PolysTestSuite::plusTermOverQ ( poly &  p,
int  c1,
int  c2,
int  i,
int  exp,
const ring  r 
)
inlineprivate

Definition at line 223 of file polys_test.h.

224 {
225 number c1AsN = n_Init(c1, r->cf);
226 number c2AsN = n_Init(c2, r->cf);
227 number c = n_Div(c1AsN, c2AsN, r->cf);
228 poly t = p_ISet(1, r); p_SetCoeff(t, c, r);
229 if (exp > 0) { p_SetExp(t, i, exp, r); p_Setm(t, r); }
230 p = p_Add_q(p, t, r);
231 }
static FORCE_INLINE number n_Div(number a, number b, const coeffs r)
return the quotient of 'a' and 'b', i.e., a/b; raises an error if 'b' is not invertible in r exceptio...
Definition: coeffs.h:612
static FORCE_INLINE number n_Init(long i, const coeffs r)
a number representing i in the given coeff field/ring r
Definition: coeffs.h:535
static number p_SetCoeff(poly p, number n, ring r)
Definition: p_polys.h:410

◆ specialPlusTerm()

void PolysTestSuite::specialPlusTerm ( poly &  p,
int  c1,
int  c2,
int  sign,
int  xExp,
int  yExp,
const ring  r 
)
inlineprivate

Definition at line 235 of file polys_test.h.

237 {
238 poly c1p = p_ISet(c1, r->cf->extRing);
239 poly c2p = p_ISet(c2, r->cf->extRing);
240 poly c3p = p_ISet(1000000, r->cf->extRing);
241 poly xterm = p_Mult_q(c1p, c3p, r->cf->extRing);
242 xterm = p_Add_q(xterm, c2p, r->cf->extRing);
243 if (sign == -1) xterm = p_Neg(xterm, r->cf->extRing);
244 if (xExp > 0)
245 {
246 p_SetExp(xterm, 1, xExp, r->cf->extRing);
247 p_Setm(xterm, r->cf->extRing);
248 }
249 number xtermAsN = toFractionNumber(xterm, r->cf);
250 poly yterm = p_ISet(1, r);
251 if (yExp > 0)
252 {
253 p_SetExp(yterm, 1, yExp, r);
254 p_Setm(yterm, r);
255 }
256 p_SetCoeff(yterm, xtermAsN, r);
257 p = p_Add_q(p, yterm, r);
258 }
number toFractionNumber(poly p, const coeffs cf)
Definition: polys_test.h:1655
static poly p_Neg(poly p, const ring r)
Definition: p_polys.h:1105
static poly p_Mult_q(poly p, poly q, const ring r)
Definition: p_polys.h:1112
static int sign(int x)
Definition: ring.cc:3427

◆ specialPoly()

void PolysTestSuite::specialPoly ( poly &  p,
const ring  r 
)
inlineprivate

Definition at line 261 of file polys_test.h.

262 {
263 p = NULL;
264 specialPlusTerm(p, 0, 1, 1, 0, 17, r);
265 specialPlusTerm(p, 0, 1, -1, 15, 16, r);
266 specialPlusTerm(p, 0, 2, -1, 14, 16, r);
267 specialPlusTerm(p, 0, 3, -1, 13, 16, r);
268 specialPlusTerm(p, 0, 4, -1, 12, 16, r);
269 specialPlusTerm(p, 0, 5, -1, 11, 16, r);
270 specialPlusTerm(p, 0, 6, -1, 10, 16, r);
271 specialPlusTerm(p, 0, 7, -1, 9, 16, r);
272 specialPlusTerm(p, 0, 8, -1, 8, 16, r);
273 specialPlusTerm(p, 0, 9, -1, 7, 16, r);
274 specialPlusTerm(p, 0, 10, -1, 6, 16, r);
275 specialPlusTerm(p, 0, 11, -1, 5, 16, r);
276 specialPlusTerm(p, 0, 12, -1, 4, 16, r);
277 specialPlusTerm(p, 0, 13, -1, 3, 16, r);
278 specialPlusTerm(p, 0, 14, -1, 2, 16, r);
279 specialPlusTerm(p, 0, 15, -1, 1, 16, r);
280 specialPlusTerm(p, 0, 16, -1, 0, 16, r);
281 specialPlusTerm(p, 0, 1, 1, 29, 15, r);
282 specialPlusTerm(p, 0, 3, 1, 28, 15, r);
283 specialPlusTerm(p, 0, 7, 1, 27, 15, r);
284 specialPlusTerm(p, 0, 13, 1, 26, 15, r);
285 specialPlusTerm(p, 0, 22, 1, 25, 15, r);
286 specialPlusTerm(p, 0, 34, 1, 24, 15, r);
287 specialPlusTerm(p, 0, 50, 1, 23, 15, r);
288 specialPlusTerm(p, 0, 70, 1, 22, 15, r);
289 specialPlusTerm(p, 0, 95, 1, 21, 15, r);
290 specialPlusTerm(p, 0, 125, 1, 20, 15, r);
291 specialPlusTerm(p, 0, 161, 1, 19, 15, r);
292 specialPlusTerm(p, 0, 203, 1, 18, 15, r);
293 specialPlusTerm(p, 0, 252, 1, 17, 15, r);
294 specialPlusTerm(p, 0, 308, 1, 16, 15, r);
295 specialPlusTerm(p, 0, 372, 1, 15, 15, r);
296 specialPlusTerm(p, 0, 428, 1, 14, 15, r);
297 specialPlusTerm(p, 0, 476, 1, 13, 15, r);
298 specialPlusTerm(p, 0, 515, 1, 12, 15, r);
299 specialPlusTerm(p, 0, 545, 1, 11, 15, r);
300 specialPlusTerm(p, 0, 565, 1, 10, 15, r);
301 specialPlusTerm(p, 0, 575, 1, 9, 15, r);
302 specialPlusTerm(p, 0, 574, 1, 8, 15, r);
303 specialPlusTerm(p, 0, 562, 1, 7, 15, r);
304 specialPlusTerm(p, 0, 538, 1, 6, 15, r);
305 specialPlusTerm(p, 0, 502, 1, 5, 15, r);
306 specialPlusTerm(p, 0, 453, 1, 4, 15, r);
307 specialPlusTerm(p, 0, 391, 1, 3, 15, r);
308 specialPlusTerm(p, 0, 315, 1, 2, 15, r);
309 specialPlusTerm(p, 0, 225, 1, 1, 15, r);
310 specialPlusTerm(p, 0, 120, 1, 0, 15, r);
311 specialPlusTerm(p, 0, 1, -1, 42, 14, r);
312 specialPlusTerm(p, 0, 4, -1, 41, 14, r);
313 specialPlusTerm(p, 0, 11, -1, 40, 14, r);
314 specialPlusTerm(p, 0, 25, -1, 39, 14, r);
315 specialPlusTerm(p, 0, 50, -1, 38, 14, r);
316 specialPlusTerm(p, 0, 91, -1, 37, 14, r);
317 specialPlusTerm(p, 0, 155, -1, 36, 14, r);
318 specialPlusTerm(p, 0, 250, -1, 35, 14, r);
319 specialPlusTerm(p, 0, 386, -1, 34, 14, r);
320 specialPlusTerm(p, 0, 575, -1, 33, 14, r);
321 specialPlusTerm(p, 0, 831, -1, 32, 14, r);
322 specialPlusTerm(p, 0, 1170, -1, 31, 14, r);
323 specialPlusTerm(p, 0, 1611, -1, 30, 14, r);
324 specialPlusTerm(p, 0, 2175, -1, 29, 14, r);
325 specialPlusTerm(p, 0, 2871, -1, 28, 14, r);
326 specialPlusTerm(p, 0, 3710, -1, 27, 14, r);
327 specialPlusTerm(p, 0, 4690, -1, 26, 14, r);
328 specialPlusTerm(p, 0, 5810, -1, 25, 14, r);
329 specialPlusTerm(p, 0, 7056, -1, 24, 14, r);
330 specialPlusTerm(p, 0, 8414, -1, 23, 14, r);
331 specialPlusTerm(p, 0, 9856, -1, 22, 14, r);
332 specialPlusTerm(p, 0, 11354, -1, 21, 14, r);
333 specialPlusTerm(p, 0, 12865, -1, 20, 14, r);
334 specialPlusTerm(p, 0, 14345, -1, 19, 14, r);
335 specialPlusTerm(p, 0, 15735, -1, 18, 14, r);
336 specialPlusTerm(p, 0, 16974, -1, 17, 14, r);
337 specialPlusTerm(p, 0, 17985, -1, 16, 14, r);
338 specialPlusTerm(p, 0, 18689, -1, 15, 14, r);
339 specialPlusTerm(p, 0, 18990, -1, 14, 14, r);
340 specialPlusTerm(p, 0, 18909, -1, 13, 14, r);
341 specialPlusTerm(p, 0, 18465, -1, 12, 14, r);
342 specialPlusTerm(p, 0, 17689, -1, 11, 14, r);
343 specialPlusTerm(p, 0, 16610, -1, 10, 14, r);
344 specialPlusTerm(p, 0, 15270, -1, 9, 14, r);
345 specialPlusTerm(p, 0, 13709, -1, 8, 14, r);
346 specialPlusTerm(p, 0, 11980, -1, 7, 14, r);
347 specialPlusTerm(p, 0, 10135, -1, 6, 14, r);
348 specialPlusTerm(p, 0, 8239, -1, 5, 14, r);
349 specialPlusTerm(p, 0, 6356, -1, 4, 14, r);
350 specialPlusTerm(p, 0, 4564, -1, 3, 14, r);
351 specialPlusTerm(p, 0, 2940, -1, 2, 14, r);
352 specialPlusTerm(p, 0, 1575, -1, 1, 14, r);
353 specialPlusTerm(p, 0, 560, -1, 0, 14, r);
354 specialPlusTerm(p, 0, 1, 1, 54, 13, r);
355 specialPlusTerm(p, 0, 5, 1, 53, 13, r);
356 specialPlusTerm(p, 0, 16, 1, 52, 13, r);
357 specialPlusTerm(p, 0, 41, 1, 51, 13, r);
358 specialPlusTerm(p, 0, 92, 1, 50, 13, r);
359 specialPlusTerm(p, 0, 187, 1, 49, 13, r);
360 specialPlusTerm(p, 0, 353, 1, 48, 13, r);
361 specialPlusTerm(p, 0, 628, 1, 47, 13, r);
362 specialPlusTerm(p, 0, 1065, 1, 46, 13, r);
363 specialPlusTerm(p, 0, 1735, 1, 45, 13, r);
364 specialPlusTerm(p, 0, 2732, 1, 44, 13, r);
365 specialPlusTerm(p, 0, 4177, 1, 43, 13, r);
366 specialPlusTerm(p, 0, 6225, 1, 42, 13, r);
367 specialPlusTerm(p, 0, 9056, 1, 41, 13, r);
368 specialPlusTerm(p, 0, 12882, 1, 40, 13, r);
369 specialPlusTerm(p, 0, 17939, 1, 39, 13, r);
370 specialPlusTerm(p, 0, 24481, 1, 38, 13, r);
371 specialPlusTerm(p, 0, 32771, 1, 37, 13, r);
372 specialPlusTerm(p, 0, 43075, 1, 36, 13, r);
373 specialPlusTerm(p, 0, 55639, 1, 35, 13, r);
374 specialPlusTerm(p, 0, 70682, 1, 34, 13, r);
375 specialPlusTerm(p, 0, 88372, 1, 33, 13, r);
376 specialPlusTerm(p, 0, 108804, 1, 32, 13, r);
377 specialPlusTerm(p, 0, 131974, 1, 31, 13, r);
378 specialPlusTerm(p, 0, 157756, 1, 30, 13, r);
379 specialPlusTerm(p, 0, 185860, 1, 29, 13, r);
380 specialPlusTerm(p, 0, 215806, 1, 28, 13, r);
381 specialPlusTerm(p, 0, 246985, 1, 27, 13, r);
382 specialPlusTerm(p, 0, 278631, 1, 26, 13, r);
383 specialPlusTerm(p, 0, 309893, 1, 25, 13, r);
384 specialPlusTerm(p, 0, 339819, 1, 24, 13, r);
385 specialPlusTerm(p, 0, 367427, 1, 23, 13, r);
386 specialPlusTerm(p, 0, 391701, 1, 22, 13, r);
387 specialPlusTerm(p, 0, 411675, 1, 21, 13, r);
388 specialPlusTerm(p, 0, 426428, 1, 20, 13, r);
389 specialPlusTerm(p, 0, 435181, 1, 19, 13, r);
390 specialPlusTerm(p, 0, 437306, 1, 18, 13, r);
391 specialPlusTerm(p, 0, 432423, 1, 17, 13, r);
392 specialPlusTerm(p, 0, 420422, 1, 16, 13, r);
393 specialPlusTerm(p, 0, 401575, 1, 15, 13, r);
394 specialPlusTerm(p, 0, 376559, 1, 14, 13, r);
395 specialPlusTerm(p, 0, 346582, 1, 13, 13, r);
396 specialPlusTerm(p, 0, 312861, 1, 12, 13, r);
397 specialPlusTerm(p, 0, 276645, 1, 11, 13, r);
398 specialPlusTerm(p, 0, 239149, 1, 10, 13, r);
399 specialPlusTerm(p, 0, 201578, 1, 9, 13, r);
400 specialPlusTerm(p, 0, 165048, 1, 8, 13, r);
401 specialPlusTerm(p, 0, 130611, 1, 7, 13, r);
402 specialPlusTerm(p, 0, 99177, 1, 6, 13, r);
403 specialPlusTerm(p, 0, 71526, 1, 5, 13, r);
404 specialPlusTerm(p, 0, 48230, 1, 4, 13, r);
405 specialPlusTerm(p, 0, 29666, 1, 3, 13, r);
406 specialPlusTerm(p, 0, 15925, 1, 2, 13, r);
407 specialPlusTerm(p, 0, 6825, 1, 1, 13, r);
408 specialPlusTerm(p, 0, 1820, 1, 0, 13, r);
409 specialPlusTerm(p, 0, 1, -1, 65, 12, r);
410 specialPlusTerm(p, 0, 6, -1, 64, 12, r);
411 specialPlusTerm(p, 0, 22, -1, 63, 12, r);
412 specialPlusTerm(p, 0, 63, -1, 62, 12, r);
413 specialPlusTerm(p, 0, 155, -1, 61, 12, r);
414 specialPlusTerm(p, 0, 343, -1, 60, 12, r);
415 specialPlusTerm(p, 0, 701, -1, 59, 12, r);
416 specialPlusTerm(p, 0, 1345, -1, 58, 12, r);
417 specialPlusTerm(p, 0, 2451, -1, 57, 12, r);
418 specialPlusTerm(p, 0, 4278, -1, 56, 12, r);
419 specialPlusTerm(p, 0, 7198, -1, 55, 12, r);
420 specialPlusTerm(p, 0, 11733, -1, 54, 12, r);
421 specialPlusTerm(p, 0, 18589, -1, 53, 12, r);
422 specialPlusTerm(p, 0, 28699, -1, 52, 12, r);
423 specialPlusTerm(p, 0, 43265, -1, 51, 12, r);
424 specialPlusTerm(p, 0, 63799, -1, 50, 12, r);
425 specialPlusTerm(p, 0, 92152, -1, 49, 12, r);
426 specialPlusTerm(p, 0, 130543, -1, 48, 12, r);
427 specialPlusTerm(p, 0, 181565, -1, 47, 12, r);
428 specialPlusTerm(p, 0, 248179, -1, 46, 12, r);
429 specialPlusTerm(p, 0, 333673, -1, 45, 12, r);
430 specialPlusTerm(p, 0, 441596, -1, 44, 12, r);
431 specialPlusTerm(p, 0, 575643, -1, 43, 12, r);
432 specialPlusTerm(p, 0, 739501, -1, 42, 12, r);
433 specialPlusTerm(p, 0, 936619, -1, 41, 12, r);
434 specialPlusTerm(p, 1, 170014, -1, 40, 12, r);
435 specialPlusTerm(p, 1, 441997, -1, 39, 12, r);
436 specialPlusTerm(p, 1, 753919, -1, 38, 12, r);
437 specialPlusTerm(p, 2, 105911, -1, 37, 12, r);
438 specialPlusTerm(p, 2, 496652, -1, 36, 12, r);
439 specialPlusTerm(p, 2, 923127, -1, 35, 12, r);
440 specialPlusTerm(p, 3, 380499, -1, 34, 12, r);
441 specialPlusTerm(p, 3, 861979, -1, 33, 12, r);
442 specialPlusTerm(p, 4, 358819, -1, 32, 12, r);
443 specialPlusTerm(p, 4, 860402, -1, 31, 12, r);
444 specialPlusTerm(p, 5, 354477, -1, 30, 12, r);
445 specialPlusTerm(p, 5, 827501, -1, 29, 12, r);
446 specialPlusTerm(p, 6, 265239, -1, 28, 12, r);
447 specialPlusTerm(p, 6, 653507, -1, 27, 12, r);
448 specialPlusTerm(p, 6, 978743, -1, 26, 12, r);
449 specialPlusTerm(p, 7, 228746, -1, 25, 12, r);
450 specialPlusTerm(p, 7, 393190, -1, 24, 12, r);
451 specialPlusTerm(p, 7, 464241, -1, 23, 12, r);
452 specialPlusTerm(p, 7, 436963, -1, 22, 12, r);
453 specialPlusTerm(p, 7, 309763, -1, 21, 12, r);
454 specialPlusTerm(p, 7, 84549, -1, 20, 12, r);
455 specialPlusTerm(p, 6, 766941, -1, 19, 12, r);
456 specialPlusTerm(p, 6, 366119, -1, 18, 12, r);
457 specialPlusTerm(p, 5, 894636, -1, 17, 12, r);
458 specialPlusTerm(p, 5, 367870, -1, 16, 12, r);
459 specialPlusTerm(p, 4, 803365, -1, 15, 12, r);
460 specialPlusTerm(p, 4, 219710, -1, 14, 12, r);
461 specialPlusTerm(p, 3, 635296, -1, 13, 12, r);
462 specialPlusTerm(p, 3, 66522, -1, 12, 12, r);
463 specialPlusTerm(p, 2, 527597, -1, 11, 12, r);
464 specialPlusTerm(p, 2, 30222, -1, 10, 12, r);
465 specialPlusTerm(p, 1, 583491, -1, 9, 12, r);
466 specialPlusTerm(p, 1, 193660, -1, 8, 12, r);
467 specialPlusTerm(p, 0, 864214, -1, 7, 12, r);
468 specialPlusTerm(p, 0, 595790, -1, 6, 12, r);
469 specialPlusTerm(p, 0, 386386, -1, 5, 12, r);
470 specialPlusTerm(p, 0, 231504, -1, 4, 12, r);
471 specialPlusTerm(p, 0, 124579, -1, 3, 12, r);
472 specialPlusTerm(p, 0, 57330, -1, 2, 12, r);
473 specialPlusTerm(p, 0, 20475, -1, 1, 12, r);
474 specialPlusTerm(p, 0, 4368, -1, 0, 12, r);
475 specialPlusTerm(p, 0, 1, 1, 75, 11, r);
476 specialPlusTerm(p, 0, 7, 1, 74, 11, r);
477 specialPlusTerm(p, 0, 29, 1, 73, 11, r);
478 specialPlusTerm(p, 0, 92, 1, 72, 11, r);
479 specialPlusTerm(p, 0, 247, 1, 71, 11, r);
480 specialPlusTerm(p, 0, 590, 1, 70, 11, r);
481 specialPlusTerm(p, 0, 1292, 1, 69, 11, r);
482 specialPlusTerm(p, 0, 2643, 1, 68, 11, r);
483 specialPlusTerm(p, 0, 5116, 1, 67, 11, r);
484 specialPlusTerm(p, 0, 9457, 1, 66, 11, r);
485 specialPlusTerm(p, 0, 16810, 1, 65, 11, r);
486 specialPlusTerm(p, 0, 28874, 1, 64, 11, r);
487 specialPlusTerm(p, 0, 48105, 1, 63, 11, r);
488 specialPlusTerm(p, 0, 77963, 1, 62, 11, r);
489 specialPlusTerm(p, 0, 123209, 1, 61, 11, r);
490 specialPlusTerm(p, 0, 190245, 1, 60, 11, r);
491 specialPlusTerm(p, 0, 287494, 1, 59, 11, r);
492 specialPlusTerm(p, 0, 425804, 1, 58, 11, r);
493 specialPlusTerm(p, 0, 618866, 1, 57, 11, r);
494 specialPlusTerm(p, 0, 883609, 1, 56, 11, r);
495 specialPlusTerm(p, 1, 240541, 1, 55, 11, r);
496 specialPlusTerm(p, 1, 713978, 1, 54, 11, r);
497 specialPlusTerm(p, 2, 332107, 1, 53, 11, r);
498 specialPlusTerm(p, 3, 126867, 1, 52, 11, r);
499 specialPlusTerm(p, 4, 133571, 1, 51, 11, r);
500 specialPlusTerm(p, 5, 390227, 1, 50, 11, r);
501 specialPlusTerm(p, 6, 936520, 1, 49, 11, r);
502 specialPlusTerm(p, 8, 812464, 1, 48, 11, r);
503 specialPlusTerm(p, 11, 56669, 1, 47, 11, r);
504 specialPlusTerm(p, 13, 704280, 1, 46, 11, r);
505 specialPlusTerm(p, 16, 784594, 1, 45, 11, r);
506 specialPlusTerm(p, 20, 318470, 1, 44, 11, r);
507 specialPlusTerm(p, 24, 315607, 1, 43, 11, r);
508 specialPlusTerm(p, 28, 771888, 1, 42, 11, r);
509 specialPlusTerm(p, 33, 666946, 1, 41, 11, r);
510 specialPlusTerm(p, 38, 962309, 1, 40, 11, r);
511 specialPlusTerm(p, 44, 600023, 1, 39, 11, r);
512 specialPlusTerm(p, 50, 502149, 1, 38, 11, r);
513 specialPlusTerm(p, 56, 571139, 1, 37, 11, r);
514 specialPlusTerm(p, 62, 691244, 1, 36, 11, r);
515 specialPlusTerm(p, 68, 730935, 1, 35, 11, r);
516 specialPlusTerm(p, 74, 546533, 1, 34, 11, r);
517 specialPlusTerm(p, 79, 986722, 1, 33, 11, r);
518 specialPlusTerm(p, 84, 898120, 1, 32, 11, r);
519 specialPlusTerm(p, 89, 131550, 1, 31, 11, r);
520 specialPlusTerm(p, 92, 548805, 1, 30, 11, r);
521 specialPlusTerm(p, 95, 29441, 1, 29, 11, r);
522 specialPlusTerm(p, 96, 477351, 1, 28, 11, r);
523 specialPlusTerm(p, 96, 826185, 1, 27, 11, r);
524 specialPlusTerm(p, 96, 43174, 1, 26, 11, r);
525 specialPlusTerm(p, 94, 131647, 1, 25, 11, r);
526 specialPlusTerm(p, 91, 131660, 1, 24, 11, r);
527 specialPlusTerm(p, 87, 119171, 1, 23, 11, r);
528 specialPlusTerm(p, 82, 203392, 1, 22, 11, r);
529 specialPlusTerm(p, 76, 522667, 1, 21, 11, r);
530 specialPlusTerm(p, 70, 238707, 1, 20, 11, r);
531 specialPlusTerm(p, 63, 529796, 1, 19, 11, r);
532 specialPlusTerm(p, 56, 582713, 1, 18, 11, r);
533 specialPlusTerm(p, 49, 584249, 1, 17, 11, r);
534 specialPlusTerm(p, 42, 712395, 1, 16, 11, r);
535 specialPlusTerm(p, 36, 128059, 1, 15, 11, r);
536 specialPlusTerm(p, 29, 967652, 1, 14, 11, r);
537 specialPlusTerm(p, 24, 337808, 1, 13, 11, r);
538 specialPlusTerm(p, 19, 312634, 1, 12, 11, r);
539 specialPlusTerm(p, 14, 935096, 1, 11, 11, r);
540 specialPlusTerm(p, 11, 218988, 1, 10, 11, r);
541 specialPlusTerm(p, 8, 151858, 1, 9, 11, r);
542 specialPlusTerm(p, 5, 698407, 1, 8, 11, r);
543 specialPlusTerm(p, 3, 804801, 1, 7, 11, r);
544 specialPlusTerm(p, 2, 403115, 1, 6, 11, r);
545 specialPlusTerm(p, 1, 416415, 1, 5, 11, r);
546 specialPlusTerm(p, 0, 763763, 1, 4, 11, r);
547 specialPlusTerm(p, 0, 365365, 1, 3, 11, r);
548 specialPlusTerm(p, 0, 147147, 1, 2, 11, r);
549 specialPlusTerm(p, 0, 45045, 1, 1, 11, r);
550 specialPlusTerm(p, 0, 8008, 1, 0, 11, r);
551 specialPlusTerm(p, 0, 1, -1, 84, 10, r);
552 specialPlusTerm(p, 0, 8, -1, 83, 10, r);
553 specialPlusTerm(p, 0, 37, -1, 82, 10, r);
554 specialPlusTerm(p, 0, 129, -1, 81, 10, r);
555 specialPlusTerm(p, 0, 376, -1, 80, 10, r);
556 specialPlusTerm(p, 0, 966, -1, 79, 10, r);
557 specialPlusTerm(p, 0, 2258, -1, 78, 10, r);
558 specialPlusTerm(p, 0, 4902, -1, 77, 10, r);
559 specialPlusTerm(p, 0, 10025, -1, 76, 10, r);
560 specialPlusTerm(p, 0, 19511, -1, 75, 10, r);
561 specialPlusTerm(p, 0, 36402, -1, 74, 10, r);
562 specialPlusTerm(p, 0, 65457, -1, 73, 10, r);
563 specialPlusTerm(p, 0, 113910, -1, 72, 10, r);
564 specialPlusTerm(p, 0, 192472, -1, 71, 10, r);
565 specialPlusTerm(p, 0, 316620, -1, 70, 10, r);
566 specialPlusTerm(p, 0, 508215, -1, 69, 10, r);
567 specialPlusTerm(p, 0, 797473, -1, 68, 10, r);
568 specialPlusTerm(p, 1, 225306, -1, 67, 10, r);
569 specialPlusTerm(p, 1, 846017, -1, 66, 10, r);
570 specialPlusTerm(p, 2, 730299, -1, 65, 10, r);
571 specialPlusTerm(p, 3, 968427, -1, 64, 10, r);
572 specialPlusTerm(p, 5, 673536, -1, 63, 10, r);
573 specialPlusTerm(p, 7, 984777, -1, 62, 10, r);
574 specialPlusTerm(p, 11, 70116, -1, 61, 10, r);
575 specialPlusTerm(p, 15, 128465, -1, 60, 10, r);
576 specialPlusTerm(p, 20, 390819, -1, 59, 10, r);
577 specialPlusTerm(p, 27, 120017, -1, 58, 10, r);
578 specialPlusTerm(p, 35, 608761, -1, 57, 10, r);
579 specialPlusTerm(p, 46, 175479, -1, 56, 10, r);
580 specialPlusTerm(p, 59, 157726, -1, 55, 10, r);
581 specialPlusTerm(p, 74, 902862, -1, 54, 10, r);
582 specialPlusTerm(p, 93, 755945, -1, 53, 10, r);
583 specialPlusTerm(p, 116, 44932, -1, 52, 10, r);
584 specialPlusTerm(p, 142, 63382, -1, 51, 10, r);
585 specialPlusTerm(p, 172, 51120, -1, 50, 10, r);
586 specialPlusTerm(p, 206, 173563, -1, 49, 10, r);
587 specialPlusTerm(p, 244, 500607, -1, 48, 10, r);
588 specialPlusTerm(p, 286, 986083, -1, 47, 10, r);
589 specialPlusTerm(p, 333, 449096, -1, 46, 10, r);
590 specialPlusTerm(p, 383, 558571, -1, 45, 10, r);
591 specialPlusTerm(p, 436, 822461, -1, 44, 10, r);
592 specialPlusTerm(p, 492, 582939, -1, 43, 10, r);
593 specialPlusTerm(p, 550, 18832, -1, 42, 10, r);
594 specialPlusTerm(p, 608, 156141, -1, 41, 10, r);
595 specialPlusTerm(p, 665, 887167, -1, 40, 10, r);
596 specialPlusTerm(p, 721, 997807, -1, 39, 10, r);
597 specialPlusTerm(p, 775, 202852, -1, 38, 10, r);
598 specialPlusTerm(p, 824, 187996, -1, 37, 10, r);
599 specialPlusTerm(p, 867, 657138, -1, 36, 10, r);
600 specialPlusTerm(p, 904, 382945, -1, 35, 10, r);
601 specialPlusTerm(p, 933, 258541, -1, 34, 10, r);
602 specialPlusTerm(p, 953, 347368, -1, 33, 10, r);
603 specialPlusTerm(p, 963, 928871, -1, 32, 10, r);
604 specialPlusTerm(p, 964, 536834, -1, 31, 10, r);
605 specialPlusTerm(p, 954, 987850, -1, 30, 10, r);
606 specialPlusTerm(p, 935, 397536, -1, 29, 10, r);
607 specialPlusTerm(p, 906, 183073, -1, 28, 10, r);
608 specialPlusTerm(p, 868, 50862, -1, 27, 10, r);
609 specialPlusTerm(p, 821, 970338, -1, 26, 10, r);
610 specialPlusTerm(p, 769, 135827, -1, 25, 10, r);
611 specialPlusTerm(p, 710, 918057, -1, 24, 10, r);
612 specialPlusTerm(p, 648, 808233, -1, 23, 10, r);
613 specialPlusTerm(p, 584, 357073, -1, 22, 10, r);
614 specialPlusTerm(p, 519, 112032, -1, 21, 10, r);
615 specialPlusTerm(p, 454, 555728, -1, 20, 10, r);
616 specialPlusTerm(p, 392, 49009, -1, 19, 10, r);
617 specialPlusTerm(p, 332, 781273, -1, 18, 10, r);
618 specialPlusTerm(p, 277, 731388, -1, 17, 10, r);
619 specialPlusTerm(p, 227, 641117, -1, 16, 10, r);
620 specialPlusTerm(p, 183, 2853, -1, 15, 10, r);
621 specialPlusTerm(p, 144, 62127, -1, 14, 10, r);
622 specialPlusTerm(p, 110, 834647, -1, 13, 10, r);
623 specialPlusTerm(p, 83, 135184, -1, 12, 10, r);
624 specialPlusTerm(p, 60, 614741, -1, 11, 10, r);
625 specialPlusTerm(p, 42, 799119, -1, 10, 10, r);
626 specialPlusTerm(p, 29, 127956, -1, 9, 10, r);
627 specialPlusTerm(p, 18, 992545, -1, 8, 10, r);
628 specialPlusTerm(p, 11, 771474, -1, 7, 10, r);
629 specialPlusTerm(p, 6, 862141, -1, 6, 10, r);
630 specialPlusTerm(p, 3, 707704, -1, 5, 10, r);
631 specialPlusTerm(p, 1, 817816, -1, 4, 10, r);
632 specialPlusTerm(p, 0, 782782, -1, 3, 10, r);
633 specialPlusTerm(p, 0, 280280, -1, 2, 10, r);
634 specialPlusTerm(p, 0, 75075, -1, 1, 10, r);
635 specialPlusTerm(p, 0, 11440, -1, 0, 10, r);
636 specialPlusTerm(p, 0, 1, 1, 92, 9, r);
637 specialPlusTerm(p, 0, 9, 1, 91, 9, r);
638 specialPlusTerm(p, 0, 46, 1, 90, 9, r);
639 specialPlusTerm(p, 0, 175, 1, 89, 9, r);
640 specialPlusTerm(p, 0, 551, 1, 88, 9, r);
641 specialPlusTerm(p, 0, 1517, 1, 87, 9, r);
642 specialPlusTerm(p, 0, 3775, 1, 86, 9, r);
643 specialPlusTerm(p, 0, 8677, 1, 85, 9, r);
644 specialPlusTerm(p, 0, 18703, 1, 84, 9, r);
645 specialPlusTerm(p, 0, 38212, 1, 83, 9, r);
646 specialPlusTerm(p, 0, 74581, 1, 82, 9, r);
647 specialPlusTerm(p, 0, 139877, 1, 81, 9, r);
648 specialPlusTerm(p, 0, 253243, 1, 80, 9, r);
649 specialPlusTerm(p, 0, 444211, 1, 79, 9, r);
650 specialPlusTerm(p, 0, 757189, 1, 78, 9, r);
651 specialPlusTerm(p, 1, 257386, 1, 77, 9, r);
652 specialPlusTerm(p, 2, 38445, 1, 76, 9, r);
653 specialPlusTerm(p, 3, 232029, 1, 75, 9, r);
654 specialPlusTerm(p, 5, 19547, 1, 74, 9, r);
655 specialPlusTerm(p, 7, 646140, 1, 73, 9, r);
656 specialPlusTerm(p, 11, 436924, 1, 72, 9, r);
657 specialPlusTerm(p, 16, 815312, 1, 71, 9, r);
658 specialPlusTerm(p, 24, 323016, 1, 70, 9, r);
659 specialPlusTerm(p, 34, 641066, 1, 69, 9, r);
660 specialPlusTerm(p, 48, 610873, 1, 68, 9, r);
661 specialPlusTerm(p, 67, 254061, 1, 67, 9, r);
662 specialPlusTerm(p, 91, 789450, 1, 66, 9, r);
663 specialPlusTerm(p, 123, 645277, 1, 65, 9, r);
664 specialPlusTerm(p, 164, 464508, 1, 64, 9, r);
665 specialPlusTerm(p, 216, 101017, 1, 63, 9, r);
666 specialPlusTerm(p, 280, 604281, 1, 62, 9, r);
667 specialPlusTerm(p, 360, 190441, 1, 61, 9, r);
668 specialPlusTerm(p, 457, 197865, 1, 60, 9, r);
669 specialPlusTerm(p, 574, 25922, 1, 59, 9, r);
670 specialPlusTerm(p, 713, 56365, 1, 58, 9, r);
671 specialPlusTerm(p, 876, 557703, 1, 57, 9, r);
672 specialPlusTerm(p, 1066, 573992, 1, 56, 9, r);
673 specialPlusTerm(p, 1284, 800887, 1, 55, 9, r);
674 specialPlusTerm(p, 1532, 453056, 1, 54, 9, r);
675 specialPlusTerm(p, 1810, 128450, 1, 53, 9, r);
676 specialPlusTerm(p, 2117, 675954, 1, 52, 9, r);
677 specialPlusTerm(p, 2454, 73820, 1, 51, 9, r);
678 specialPlusTerm(p, 2817, 326941, 1, 50, 9, r);
679 specialPlusTerm(p, 3204, 391243, 1, 49, 9, r);
680 specialPlusTerm(p, 3611, 133043, 1, 48, 9, r);
681 specialPlusTerm(p, 4032, 330356, 1, 47, 9, r);
682 specialPlusTerm(p, 4461, 721846, 1, 46, 9, r);
683 specialPlusTerm(p, 4892, 107024, 1, 45, 9, r);
684 specialPlusTerm(p, 5315, 498836, 1, 44, 9, r);
685 specialPlusTerm(p, 5723, 326840, 1, 43, 9, r);
686 specialPlusTerm(p, 6106, 686025, 1, 42, 9, r);
687 specialPlusTerm(p, 6456, 623000, 1, 41, 9, r);
688 specialPlusTerm(p, 6764, 448368, 1, 40, 9, r);
689 specialPlusTerm(p, 7022, 61523, 1, 39, 9, r);
690 specialPlusTerm(p, 7222, 273135, 1, 38, 9, r);
691 specialPlusTerm(p, 7359, 108966, 1, 37, 9, r);
692 specialPlusTerm(p, 7428, 79054, 1, 36, 9, r);
693 specialPlusTerm(p, 7426, 396980, 1, 35, 9, r);
694 specialPlusTerm(p, 7353, 135921, 1, 34, 9, r);
695 specialPlusTerm(p, 7209, 310506, 1, 33, 9, r);
696 specialPlusTerm(p, 6997, 877688, 1, 32, 9, r);
697 specialPlusTerm(p, 6723, 653256, 1, 31, 9, r);
698 specialPlusTerm(p, 6393, 146079, 1, 30, 9, r);
699 specialPlusTerm(p, 6014, 316858, 1, 29, 9, r);
700 specialPlusTerm(p, 5596, 273275, 1, 28, 9, r);
701 specialPlusTerm(p, 5148, 917160, 1, 27, 9, r);
702 specialPlusTerm(p, 4682, 563401, 1, 26, 9, r);
703 specialPlusTerm(p, 4207, 550601, 1, 25, 9, r);
704 specialPlusTerm(p, 3733, 862769, 1, 24, 9, r);
705 specialPlusTerm(p, 3270, 780702, 1, 23, 9, r);
706 specialPlusTerm(p, 2826, 579105, 1, 22, 9, r);
707 specialPlusTerm(p, 2408, 283186, 1, 21, 9, r);
708 specialPlusTerm(p, 2021, 494926, 1, 20, 9, r);
709 specialPlusTerm(p, 1670, 295297, 1, 19, 9, r);
710 specialPlusTerm(p, 1357, 224099, 1, 18, 9, r);
711 specialPlusTerm(p, 1083, 335088, 1, 17, 9, r);
712 specialPlusTerm(p, 848, 318658, 1, 16, 9, r);
713 specialPlusTerm(p, 650, 680536, 1, 15, 9, r);
714 specialPlusTerm(p, 487, 961232, 1, 14, 9, r);
715 specialPlusTerm(p, 356, 978589, 1, 13, 9, r);
716 specialPlusTerm(p, 254, 74425, 1, 12, 9, r);
717 specialPlusTerm(p, 175, 348338, 1, 11, 9, r);
718 specialPlusTerm(p, 116, 865243, 1, 10, 9, r);
719 specialPlusTerm(p, 74, 831757, 1, 9, 9, r);
720 specialPlusTerm(p, 45, 737406, 1, 8, 9, r);
721 specialPlusTerm(p, 26, 458575, 1, 7, 9, r);
722 specialPlusTerm(p, 14, 324310, 1, 6, 9, r);
723 specialPlusTerm(p, 7, 145853, 1, 5, 9, r);
724 specialPlusTerm(p, 3, 212352, 1, 4, 9, r);
725 specialPlusTerm(p, 1, 257828, 1, 3, 9, r);
726 specialPlusTerm(p, 0, 405405, 1, 2, 9, r);
727 specialPlusTerm(p, 0, 96525, 1, 1, 9, r);
728 specialPlusTerm(p, 0, 12870, 1, 0, 9, r);
729 specialPlusTerm(p, 0, 1, -1, 99, 8, r);
730 specialPlusTerm(p, 0, 10, -1, 98, 8, r);
731 specialPlusTerm(p, 0, 56, -1, 97, 8, r);
732 specialPlusTerm(p, 0, 231, -1, 96, 8, r);
733 specialPlusTerm(p, 0, 782, -1, 95, 8, r);
734 specialPlusTerm(p, 0, 2299, -1, 94, 8, r);
735 specialPlusTerm(p, 0, 6074, -1, 93, 8, r);
736 specialPlusTerm(p, 0, 14751, -1, 92, 8, r);
737 specialPlusTerm(p, 0, 33445, -1, 91, 8, r);
738 specialPlusTerm(p, 0, 71586, -1, 90, 8, r);
739 specialPlusTerm(p, 0, 145843, -1, 89, 8, r);
740 specialPlusTerm(p, 0, 284605, -1, 88, 8, r);
741 specialPlusTerm(p, 0, 534639, -1, 87, 8, r);
742 specialPlusTerm(p, 0, 970707, -1, 86, 8, r);
743 specialPlusTerm(p, 1, 709091, -1, 85, 8, r);
744 specialPlusTerm(p, 2, 926134, -1, 84, 8, r);
745 specialPlusTerm(p, 4, 883022, -1, 83, 8, r);
746 specialPlusTerm(p, 7, 958118, -1, 82, 8, r);
747 specialPlusTerm(p, 12, 688161, -1, 81, 8, r);
748 specialPlusTerm(p, 19, 819543, -1, 80, 8, r);
749 specialPlusTerm(p, 30, 370620, -1, 79, 8, r);
750 specialPlusTerm(p, 45, 705588, -1, 78, 8, r);
751 specialPlusTerm(p, 67, 619803, -1, 77, 8, r);
752 specialPlusTerm(p, 98, 435565, -1, 76, 8, r);
753 specialPlusTerm(p, 141, 106293, -1, 75, 8, r);
754 specialPlusTerm(p, 199, 325748, -1, 74, 8, r);
755 specialPlusTerm(p, 277, 637550, -1, 73, 8, r);
756 specialPlusTerm(p, 381, 538692, -1, 72, 8, r);
757 specialPlusTerm(p, 517, 569184, -1, 71, 8, r);
758 specialPlusTerm(p, 693, 378528, -1, 70, 8, r);
759 specialPlusTerm(p, 917, 758545, -1, 69, 8, r);
760 specialPlusTerm(p, 1200, 631327, -1, 68, 8, r);
761 specialPlusTerm(p, 1552, 980935, -1, 67, 8, r);
762 specialPlusTerm(p, 1986, 718008, -1, 66, 8, r);
763 specialPlusTerm(p, 2514, 467898, -1, 65, 8, r);
764 specialPlusTerm(p, 3149, 275373, -1, 64, 8, r);
765 specialPlusTerm(p, 3904, 222333, -1, 63, 8, r);
766 specialPlusTerm(p, 4791, 959202, -1, 62, 8, r);
767 specialPlusTerm(p, 5824, 155954, -1, 61, 8, r);
768 specialPlusTerm(p, 7010, 884530, -1, 60, 8, r);
769 specialPlusTerm(p, 8359, 950639, -1, 59, 8, r);
770 specialPlusTerm(p, 9876, 199091, -1, 58, 8, r);
771 specialPlusTerm(p, 11560, 822647, -1, 57, 8, r);
772 specialPlusTerm(p, 13410, 709233, -1, 56, 8, r);
773 specialPlusTerm(p, 15417, 866033, -1, 55, 8, r);
774 specialPlusTerm(p, 17568, 960466, -1, 54, 8, r);
775 specialPlusTerm(p, 19845, 17463, -1, 53, 8, r);
776 specialPlusTerm(p, 22221, 309147, -1, 52, 8, r);
777 specialPlusTerm(p, 24667, 467342, -1, 51, 8, r);
778 specialPlusTerm(p, 27147, 841107, -1, 50, 8, r);
779 specialPlusTerm(p, 29622, 110916, -1, 49, 8, r);
780 specialPlusTerm(p, 32046, 158421, -1, 48, 8, r);
781 specialPlusTerm(p, 34373, 176970, -1, 47, 8, r);
782 specialPlusTerm(p, 36554, 993654, -1, 46, 8, r);
783 specialPlusTerm(p, 38543, 559373, -1, 45, 8, r);
784 specialPlusTerm(p, 40292, 550458, -1, 44, 8, r);
785 specialPlusTerm(p, 41759, 14716, -1, 43, 8, r);
786 specialPlusTerm(p, 42904, 987186, -1, 42, 8, r);
787 specialPlusTerm(p, 43698, 997388, -1, 41, 8, r);
788 specialPlusTerm(p, 44117, 391022, -1, 40, 8, r);
789 specialPlusTerm(p, 44145, 394986, -1, 39, 8, r);
790 specialPlusTerm(p, 43777, 865188, -1, 38, 8, r);
791 specialPlusTerm(p, 43019, 670206, -1, 37, 8, r);
792 specialPlusTerm(p, 41885, 681598, -1, 36, 8, r);
793 specialPlusTerm(p, 40400, 361216, -1, 35, 8, r);
794 specialPlusTerm(p, 38596, 956954, -1, 34, 8, r);
795 specialPlusTerm(p, 36516, 339240, -1, 33, 8, r);
796 specialPlusTerm(p, 34205, 530818, -1, 32, 8, r);
797 specialPlusTerm(p, 31715, 999202, -1, 31, 8, r);
798 specialPlusTerm(p, 29101, 795368, -1, 30, 8, r);
799 specialPlusTerm(p, 26417, 630514, -1, 29, 8, r);
800 specialPlusTerm(p, 23716, 985664, -1, 28, 8, r);
801 specialPlusTerm(p, 21050, 345182, -1, 27, 8, r);
802 specialPlusTerm(p, 18463, 636290, -1, 26, 8, r);
803 specialPlusTerm(p, 15996, 940992, -1, 25, 8, r);
804 specialPlusTerm(p, 13683, 529134, -1, 24, 8, r);
805 specialPlusTerm(p, 11549, 242308, -1, 23, 8, r);
806 specialPlusTerm(p, 9612, 238032, -1, 22, 8, r);
807 specialPlusTerm(p, 7883, 84208, -1, 21, 8, r);
808 specialPlusTerm(p, 6365, 175366, -1, 20, 8, r);
809 specialPlusTerm(p, 5055, 425826, -1, 19, 8, r);
810 specialPlusTerm(p, 3945, 181834, -1, 18, 8, r);
811 specialPlusTerm(p, 3021, 285630, -1, 17, 8, r);
812 specialPlusTerm(p, 2267, 219328, -1, 16, 8, r);
813 specialPlusTerm(p, 1664, 257320, -1, 15, 8, r);
814 specialPlusTerm(p, 1192, 561524, -1, 14, 8, r);
815 specialPlusTerm(p, 832, 164102, -1, 13, 8, r);
816 specialPlusTerm(p, 563, 796684, -1, 12, 8, r);
817 specialPlusTerm(p, 369, 542514, -1, 11, 8, r);
818 specialPlusTerm(p, 233, 304720, -1, 10, 8, r);
819 specialPlusTerm(p, 141, 98386, -1, 9, 8, r);
820 specialPlusTerm(p, 81, 180528, -1, 8, 8, r);
821 specialPlusTerm(p, 44, 38137, -1, 7, 8, r);
822 specialPlusTerm(p, 22, 259094, -1, 6, 8, r);
823 specialPlusTerm(p, 10, 314447, -1, 5, 8, r);
824 specialPlusTerm(p, 4, 281420, -1, 4, 8, r);
825 specialPlusTerm(p, 1, 537107, -1, 3, 8, r);
826 specialPlusTerm(p, 0, 450450, -1, 2, 8, r);
827 specialPlusTerm(p, 0, 96525, -1, 1, 8, r);
828 specialPlusTerm(p, 0, 11440, -1, 0, 8, r);
829 specialPlusTerm(p, 0, 1, 1, 105, 7, r);
830 specialPlusTerm(p, 0, 11, 1, 104, 7, r);
831 specialPlusTerm(p, 0, 67, 1, 103, 7, r);
832 specialPlusTerm(p, 0, 298, 1, 102, 7, r);
833 specialPlusTerm(p, 0, 1080, 1, 101, 7, r);
834 specialPlusTerm(p, 0, 3379, 1, 100, 7, r);
835 specialPlusTerm(p, 0, 9453, 1, 99, 7, r);
836 specialPlusTerm(p, 0, 24196, 1, 98, 7, r);
837 specialPlusTerm(p, 0, 57569, 1, 97, 7, r);
838 specialPlusTerm(p, 0, 128787, 1, 96, 7, r);
839 specialPlusTerm(p, 0, 273231, 1, 95, 7, r);
840 specialPlusTerm(p, 0, 553438, 1, 94, 7, r);
841 specialPlusTerm(p, 1, 75997, 1, 93, 7, r);
842 specialPlusTerm(p, 2, 16735, 1, 92, 7, r);
843 specialPlusTerm(p, 3, 657192, 1, 91, 7, r);
844 specialPlusTerm(p, 6, 436037, 1, 90, 7, r);
845 specialPlusTerm(p, 11, 19717, 1, 89, 7, r);
846 specialPlusTerm(p, 18, 397189, 1, 88, 7, r);
847 specialPlusTerm(p, 30, 3973, 1, 87, 7, r);
848 specialPlusTerm(p, 47, 880870, 1, 86, 7, r);
849 specialPlusTerm(p, 74, 872383, 1, 85, 7, r);
850 specialPlusTerm(p, 114, 869036, 1, 84, 7, r);
851 specialPlusTerm(p, 173, 96283, 1, 83, 7, r);
852 specialPlusTerm(p, 256, 450472, 1, 82, 7, r);
853 specialPlusTerm(p, 373, 879259, 1, 81, 7, r);
854 specialPlusTerm(p, 536, 799939, 1, 80, 7, r);
855 specialPlusTerm(p, 759, 544391, 1, 79, 7, r);
856 specialPlusTerm(p, 1059, 813880, 1, 78, 7, r);
857 specialPlusTerm(p, 1459, 121011, 1, 77, 7, r);
858 specialPlusTerm(p, 1983, 190069, 1, 76, 7, r);
859 specialPlusTerm(p, 2662, 281192, 1, 75, 7, r);
860 specialPlusTerm(p, 3531, 398853, 1, 74, 7, r);
861 specialPlusTerm(p, 4630, 341477, 1, 73, 7, r);
862 specialPlusTerm(p, 6003, 547268, 1, 72, 7, r);
863 specialPlusTerm(p, 7699, 692101, 1, 71, 7, r);
864 specialPlusTerm(p, 9770, 999253, 1, 70, 7, r);
865 specialPlusTerm(p, 12272, 228155, 1, 69, 7, r);
866 specialPlusTerm(p, 15259, 320516, 1, 68, 7, r);
867 specialPlusTerm(p, 18787, 697047, 1, 67, 7, r);
868 specialPlusTerm(p, 22910, 216326, 1, 66, 7, r);
869 specialPlusTerm(p, 27674, 828551, 1, 65, 7, r);
870 specialPlusTerm(p, 33121, 980096, 1, 64, 7, r);
871 specialPlusTerm(p, 39281, 848637, 1, 63, 7, r);
872 specialPlusTerm(p, 46171, 511745, 1, 62, 7, r);
873 specialPlusTerm(p, 53792, 172793, 1, 61, 7, r);
874 specialPlusTerm(p, 62126, 584715, 1, 60, 7, r);
875 specialPlusTerm(p, 71136, 823074, 1, 59, 7, r);
876 specialPlusTerm(p, 80762, 563409, 1, 58, 7, r);
877 specialPlusTerm(p, 90920, 12755, 1, 57, 7, r);
878 specialPlusTerm(p, 101501, 630586, 1, 56, 7, r);
879 specialPlusTerm(p, 112376, 750037, 1, 55, 7, r);
880 specialPlusTerm(p, 123393, 176185, 1, 54, 7, r);
881 specialPlusTerm(p, 134379, 795971, 1, 53, 7, r);
882 specialPlusTerm(p, 145150, 185558, 1, 52, 7, r);
883 specialPlusTerm(p, 155507, 148257, 1, 51, 7, r);
884 specialPlusTerm(p, 165248, 62169, 1, 50, 7, r);
885 specialPlusTerm(p, 174170, 864688, 1, 49, 7, r);
886 specialPlusTerm(p, 182080, 454274, 1, 48, 7, r);
887 specialPlusTerm(p, 188795, 252141, 1, 47, 7, r);
888 specialPlusTerm(p, 194153, 640367, 1, 46, 7, r);
889 specialPlusTerm(p, 198019, 981033, 1, 45, 7, r);
890 specialPlusTerm(p, 200289, 925212, 1, 44, 7, r);
891 specialPlusTerm(p, 200894, 741748, 1, 43, 7, r);
892 specialPlusTerm(p, 199804, 433264, 1, 42, 7, r);
893 specialPlusTerm(p, 197029, 459520, 1, 41, 7, r);
894 specialPlusTerm(p, 192620, 953188, 1, 40, 7, r);
895 specialPlusTerm(p, 186669, 386562, 1, 39, 7, r);
896 specialPlusTerm(p, 179301, 725204, 1, 38, 7, r);
897 specialPlusTerm(p, 170677, 181240, 1, 37, 7, r);
898 specialPlusTerm(p, 160981, 751274, 1, 36, 7, r);
899 specialPlusTerm(p, 150421, 786460, 1, 35, 7, r);
900 specialPlusTerm(p, 139216, 891710, 1, 34, 7, r);
901 specialPlusTerm(p, 127592, 483930, 1, 33, 7, r);
902 specialPlusTerm(p, 115772, 353582, 1, 32, 7, r);
903 specialPlusTerm(p, 103971, 568098, 1, 31, 7, r);
904 specialPlusTerm(p, 92390, 30732, 1, 30, 7, r);
905 specialPlusTerm(p, 81206, 964790, 1, 29, 7, r);
906 specialPlusTerm(p, 70576, 534794, 1, 28, 7, r);
907 specialPlusTerm(p, 60624, 746714, 1, 27, 7, r);
908 specialPlusTerm(p, 51447, 694586, 1, 26, 7, r);
909 specialPlusTerm(p, 43111, 145244, 1, 25, 7, r);
910 specialPlusTerm(p, 35651, 383472, 1, 24, 7, r);
911 specialPlusTerm(p, 29077, 179220, 1, 23, 7, r);
912 specialPlusTerm(p, 23372, 689230, 1, 22, 7, r);
913 specialPlusTerm(p, 18501, 69995, 1, 21, 7, r);
914 specialPlusTerm(p, 14408, 558395, 1, 20, 7, r);
915 specialPlusTerm(p, 11028, 771237, 1, 19, 7, r);
916 specialPlusTerm(p, 8286, 985223, 1, 18, 7, r);
917 specialPlusTerm(p, 6104, 182964, 1, 17, 7, r);
918 specialPlusTerm(p, 4400, 686554, 1, 16, 7, r);
919 specialPlusTerm(p, 3099, 245270, 1, 15, 7, r);
920 specialPlusTerm(p, 2127, 493720, 1, 14, 7, r);
921 specialPlusTerm(p, 1419, 747120, 1, 13, 7, r);
922 specialPlusTerm(p, 918, 147362, 1, 12, 7, r);
923 specialPlusTerm(p, 573, 212794, 1, 11, 7, r);
924 specialPlusTerm(p, 343, 872738, 1, 10, 7, r);
925 specialPlusTerm(p, 197, 84030, 1, 9, 7, r);
926 specialPlusTerm(p, 107, 132168, 1, 8, 7, r);
927 specialPlusTerm(p, 54, 719808, 1, 7, 7, r);
928 specialPlusTerm(p, 25, 940200, 1, 6, 7, r);
929 specialPlusTerm(p, 11, 223212, 1, 5, 7, r);
930 specialPlusTerm(p, 4, 327323, 1, 4, 7, r);
931 specialPlusTerm(p, 1, 434433, 1, 3, 7, r);
932 specialPlusTerm(p, 0, 385385, 1, 2, 7, r);
933 specialPlusTerm(p, 0, 75075, 1, 1, 7, r);
934 specialPlusTerm(p, 0, 8008, 1, 0, 7, r);
935 specialPlusTerm(p, 0, 1, -1, 110, 6, r);
936 specialPlusTerm(p, 0, 12, -1, 109, 6, r);
937 specialPlusTerm(p, 0, 79, -1, 108, 6, r);
938 specialPlusTerm(p, 0, 377, -1, 107, 6, r);
939 specialPlusTerm(p, 0, 1457, -1, 106, 6, r);
940 specialPlusTerm(p, 0, 4836, -1, 105, 6, r);
941 specialPlusTerm(p, 0, 14282, -1, 104, 6, r);
942 specialPlusTerm(p, 0, 38408, -1, 103, 6, r);
943 specialPlusTerm(p, 0, 95585, -1, 102, 6, r);
944 specialPlusTerm(p, 0, 222755, -1, 101, 6, r);
945 specialPlusTerm(p, 0, 490512, -1, 100, 6, r);
946 specialPlusTerm(p, 1, 27858, -1, 99, 6, r);
947 specialPlusTerm(p, 2, 61348, -1, 98, 6, r);
948 specialPlusTerm(p, 3, 974921, -1, 97, 6, r);
949 specialPlusTerm(p, 7, 398548, -1, 96, 6, r);
950 specialPlusTerm(p, 13, 335851, -1, 95, 6, r);
951 specialPlusTerm(p, 23, 342939, -1, 94, 6, r);
952 specialPlusTerm(p, 39, 772696, -1, 93, 6, r);
953 specialPlusTerm(p, 66, 100395, -1, 92, 6, r);
954 specialPlusTerm(p, 107, 347509, -1, 91, 6, r);
955 specialPlusTerm(p, 170, 620609, -1, 90, 6, r);
956 specialPlusTerm(p, 265, 780891, -1, 89, 6, r);
957 specialPlusTerm(p, 406, 256761, -1, 88, 6, r);
958 specialPlusTerm(p, 610, 6662, -1, 87, 6, r);
959 specialPlusTerm(p, 900, 631638, -1, 86, 6, r);
960 specialPlusTerm(p, 1308, 626820, -1, 85, 6, r);
961 specialPlusTerm(p, 1872, 748088, -1, 84, 6, r);
962 specialPlusTerm(p, 2641, 454830, -1, 83, 6, r);
963 specialPlusTerm(p, 3674, 372459, -1, 82, 6, r);
964 specialPlusTerm(p, 5043, 699859, -1, 81, 6, r);
965 specialPlusTerm(p, 6835, 468267, -1, 80, 6, r);
966 specialPlusTerm(p, 9150, 540598, -1, 79, 6, r);
967 specialPlusTerm(p, 12105, 225506, -1, 78, 6, r);
968 specialPlusTerm(p, 15831, 370284, -1, 77, 6, r);
969 specialPlusTerm(p, 20475, 792894, -1, 76, 6, r);
970 specialPlusTerm(p, 26198, 917672, -1, 75, 6, r);
971 specialPlusTerm(p, 33172, 493074, -1, 74, 6, r);
972 specialPlusTerm(p, 41576, 294268, -1, 73, 6, r);
973 specialPlusTerm(p, 51593, 749027, -1, 72, 6, r);
974 specialPlusTerm(p, 63406, 472134, -1, 71, 6, r);
975 specialPlusTerm(p, 77187, 750422, -1, 70, 6, r);
976 specialPlusTerm(p, 93095, 85649, -1, 69, 6, r);
977 specialPlusTerm(p, 111261, 972846, -1, 68, 6, r);
978 specialPlusTerm(p, 131789, 163843, -1, 67, 6, r);
979 specialPlusTerm(p, 154735, 735031, -1, 66, 6, r);
980 specialPlusTerm(p, 180110, 340164, -1, 65, 6, r);
981 specialPlusTerm(p, 207863, 78032, -1, 64, 6, r);
982 specialPlusTerm(p, 237878, 436148, -1, 63, 6, r);
983 specialPlusTerm(p, 269969, 780853, -1, 62, 6, r);
984 specialPlusTerm(p, 303875, 847919, -1, 61, 6, r);
985 specialPlusTerm(p, 339259, 643405, -1, 60, 6, r);
986 specialPlusTerm(p, 375710, 91709, -1, 59, 6, r);
987 specialPlusTerm(p, 412746, 667621, -1, 58, 6, r);
988 specialPlusTerm(p, 449827, 124838, -1, 57, 6, r);
989 specialPlusTerm(p, 486358, 289884, -1, 56, 6, r);
990 specialPlusTerm(p, 521709, 734617, -1, 55, 6, r);
991 specialPlusTerm(p, 555229, 980825, -1, 54, 6, r);
992 specialPlusTerm(p, 586264, 736452, -1, 53, 6, r);
993 specialPlusTerm(p, 614176, 524327, -1, 52, 6, r);
994 specialPlusTerm(p, 638364, 950461, -1, 51, 6, r);
995 specialPlusTerm(p, 658286, 778382, -1, 50, 6, r);
996 specialPlusTerm(p, 673474, 935703, -1, 49, 6, r);
997 specialPlusTerm(p, 683555, 584035, -1, 48, 6, r);
998 specialPlusTerm(p, 688262, 435939, -1, 47, 6, r);
999 specialPlusTerm(p, 687447, 601958, -1, 46, 6, r);
1000 specialPlusTerm(p, 681088, 393321, -1, 45, 6, r);
1001 specialPlusTerm(p, 669289, 685002, -1, 44, 6, r);
1002 specialPlusTerm(p, 652281, 650056, -1, 43, 6, r);
1003 specialPlusTerm(p, 630412, 897910, -1, 42, 6, r);
1004 specialPlusTerm(p, 604139, 273828, -1, 41, 6, r);
1005 specialPlusTerm(p, 574008, 790372, -1, 40, 6, r);
1006 specialPlusTerm(p, 540643, 351434, -1, 39, 6, r);
1007 specialPlusTerm(p, 504718, 83850, -1, 38, 6, r);
1008 specialPlusTerm(p, 466939, 201686, -1, 37, 6, r);
1009 specialPlusTerm(p, 428021, 387818, -1, 36, 6, r);
1010 specialPlusTerm(p, 388665, 682772, -1, 35, 6, r);
1011 specialPlusTerm(p, 349538, 822179, -1, 34, 6, r);
1012 specialPlusTerm(p, 311254, 865006, -1, 33, 6, r);
1013 specialPlusTerm(p, 274359, 811613, -1, 32, 6, r);
1014 specialPlusTerm(p, 239319, 732987, -1, 31, 6, r);
1015 specialPlusTerm(p, 206512, 732148, -1, 30, 6, r);
1016 specialPlusTerm(p, 176224, 848533, -1, 29, 6, r);
1017 specialPlusTerm(p, 148649, 810169, -1, 28, 6, r);
1018 specialPlusTerm(p, 123892, 349306, -1, 27, 6, r);
1019 specialPlusTerm(p, 101974, 636229, -1, 26, 6, r);
1020 specialPlusTerm(p, 82845, 261439, -1, 25, 6, r);
1021 specialPlusTerm(p, 66390, 113996, -1, 24, 6, r);
1022 specialPlusTerm(p, 52444, 464455, -1, 23, 6, r);
1023 specialPlusTerm(p, 40805, 563557, -1, 22, 6, r);
1024 specialPlusTerm(p, 31245, 109466, -1, 21, 6, r);
1025 specialPlusTerm(p, 23521, 11382, -1, 20, 6, r);
1026 specialPlusTerm(p, 17387, 978784, -1, 19, 6, r);
1027 specialPlusTerm(p, 12606, 585145, -1, 18, 6, r);
1028 specialPlusTerm(p, 8950, 583389, -1, 17, 6, r);
1029 specialPlusTerm(p, 6212, 378502, -1, 16, 6, r);
1030 specialPlusTerm(p, 4206, 681655, -1, 15, 6, r);
1031 specialPlusTerm(p, 2772, 472065, -1, 14, 6, r);
1032 specialPlusTerm(p, 1773, 471986, -1, 13, 6, r);
1033 specialPlusTerm(p, 1097, 393517, -1, 12, 6, r);
1034 specialPlusTerm(p, 654, 242447, -1, 11, 6, r);
1035 specialPlusTerm(p, 373, 966384, -1, 10, 6, r);
1036 specialPlusTerm(p, 203, 716799, -1, 9, 6, r);
1037 specialPlusTerm(p, 104, 963287, -1, 8, 6, r);
1038 specialPlusTerm(p, 50, 659180, -1, 7, 6, r);
1039 specialPlusTerm(p, 22, 613305, -1, 6, 6, r);
1040 specialPlusTerm(p, 9, 176167, -1, 5, 6, r);
1041 specialPlusTerm(p, 3, 303300, -1, 4, 6, r);
1042 specialPlusTerm(p, 1, 17016, -1, 3, 6, r);
1043 specialPlusTerm(p, 0, 252252, -1, 2, 6, r);
1044 specialPlusTerm(p, 0, 45045, -1, 1, 6, r);
1045 specialPlusTerm(p, 0, 4368, -1, 0, 6, r);
1046 specialPlusTerm(p, 0, 1, 1, 114, 5, r);
1047 specialPlusTerm(p, 0, 13, 1, 113, 5, r);
1048 specialPlusTerm(p, 0, 92, 1, 112, 5, r);
1049 specialPlusTerm(p, 0, 469, 1, 111, 5, r);
1050 specialPlusTerm(p, 0, 1926, 1, 110, 5, r);
1051 specialPlusTerm(p, 0, 6756, 1, 109, 5, r);
1052 specialPlusTerm(p, 0, 20972, 1, 108, 5, r);
1053 specialPlusTerm(p, 0, 58978, 1, 107, 5, r);
1054 specialPlusTerm(p, 0, 152775, 1, 106, 5, r);
1055 specialPlusTerm(p, 0, 369050, 1, 105, 5, r);
1056 specialPlusTerm(p, 0, 839288, 1, 104, 5, r);
1057 specialPlusTerm(p, 1, 810449, 1, 103, 5, r);
1058 specialPlusTerm(p, 3, 726832, 1, 102, 5, r);
1059 specialPlusTerm(p, 7, 357527, 1, 101, 5, r);
1060 specialPlusTerm(p, 13, 988283, 1, 100, 5, r);
1061 specialPlusTerm(p, 25, 701547, 1, 99, 5, r);
1062 specialPlusTerm(p, 45, 773588, 1, 98, 5, r);
1063 specialPlusTerm(p, 79, 222619, 1, 97, 5, r);
1064 specialPlusTerm(p, 133, 546121, 1, 96, 5, r);
1065 specialPlusTerm(p, 219, 688458, 1, 95, 5, r);
1066 specialPlusTerm(p, 353, 280515, 1, 94, 5, r);
1067 specialPlusTerm(p, 556, 190572, 1, 93, 5, r);
1068 specialPlusTerm(p, 858, 418990, 1, 92, 5, r);
1069 specialPlusTerm(p, 1300, 357646, 1, 91, 5, r);
1070 specialPlusTerm(p, 1935, 417677, 1, 90, 5, r);
1071 specialPlusTerm(p, 2833, 5498, 1, 89, 5, r);
1072 specialPlusTerm(p, 4081, 797160, 1, 88, 5, r);
1073 specialPlusTerm(p, 5793, 225338, 1, 87, 5, r);
1074 specialPlusTerm(p, 8105, 52608, 1, 86, 5, r);
1075 specialPlusTerm(p, 11184, 860904, 1, 85, 5, r);
1076 specialPlusTerm(p, 15233, 242543, 1, 84, 5, r);
1077 specialPlusTerm(p, 20486, 436025, 1, 83, 5, r);
1078 specialPlusTerm(p, 27218, 113560, 1, 82, 5, r);
1079 specialPlusTerm(p, 35740, 941, 1, 81, 5, r);
1080 specialPlusTerm(p, 46400, 998184, 1, 80, 5, r);
1081 specialPlusTerm(p, 59584, 475380, 1, 79, 5, r);
1082 specialPlusTerm(p, 75703, 446044, 1, 78, 5, r);
1083 specialPlusTerm(p, 95193, 372588, 1, 77, 5, r);
1084 specialPlusTerm(p, 118502, 436837, 1, 76, 5, r);
1085 specialPlusTerm(p, 146079, 212557, 1, 75, 5, r);
1086 specialPlusTerm(p, 178357, 804753, 1, 74, 5, r);
1087 specialPlusTerm(p, 215740, 667987, 1, 73, 5, r);
1088 specialPlusTerm(p, 258579, 477117, 1, 72, 5, r);
1089 specialPlusTerm(p, 307154, 590636, 1, 71, 5, r);
1090 specialPlusTerm(p, 361653, 809467, 1, 70, 5, r);
1091 specialPlusTerm(p, 422151, 281668, 1, 69, 5, r);
1092 specialPlusTerm(p, 488587, 524562, 1, 68, 5, r);
1093 specialPlusTerm(p, 560751, 619043, 1, 67, 5, r);
1094 specialPlusTerm(p, 638266, 666013, 1, 66, 5, r);
1095 specialPlusTerm(p, 720579, 573693, 1, 65, 5, r);
1096 specialPlusTerm(p, 806956, 161270, 1, 64, 5, r);
1097 specialPlusTerm(p, 896482, 416756, 1, 63, 5, r);
1098 specialPlusTerm(p, 988072, 536828, 1, 62, 5, r);
1099 specialPlusTerm(p, 1080484, 109735, 1, 61, 5, r);
1100 specialPlusTerm(p, 1172340, 489345, 1, 60, 5, r);
1101 specialPlusTerm(p, 1262160, 63390, 1, 59, 5, r);
1102 specialPlusTerm(p, 1348391, 759522, 1, 58, 5, r);
1103 specialPlusTerm(p, 1429455, 778912, 1, 57, 5, r);
1104 specialPlusTerm(p, 1503788, 220123, 1, 56, 5, r);
1105 specialPlusTerm(p, 1569887, 977111, 1, 55, 5, r);
1106 specialPlusTerm(p, 1626364, 84113, 1, 54, 5, r);
1107 specialPlusTerm(p, 1671981, 553512, 1, 53, 5, r);
1108 specialPlusTerm(p, 1705703, 722632, 1, 52, 5, r);
1109 specialPlusTerm(p, 1726729, 198623, 1, 51, 5, r);
1110 specialPlusTerm(p, 1734521, 667786, 1, 50, 5, r);
1111 specialPlusTerm(p, 1728831, 111168, 1, 49, 5, r);
1112 specialPlusTerm(p, 1709705, 329909, 1, 48, 5, r);
1113 specialPlusTerm(p, 1677491, 113716, 1, 47, 5, r);
1114 specialPlusTerm(p, 1632824, 861010, 1, 46, 5, r);
1115 specialPlusTerm(p, 1576612, 953462, 1, 45, 5, r);
1116 specialPlusTerm(p, 1510002, 672602, 1, 44, 5, r);
1117 specialPlusTerm(p, 1434344, 893769, 1, 43, 5, r);
1118 specialPlusTerm(p, 1351150, 176624, 1, 42, 5, r);
1119 specialPlusTerm(p, 1262040, 169393, 1, 41, 5, r);
1120 specialPlusTerm(p, 1168696, 438727, 1, 40, 5, r);
1121 specialPlusTerm(p, 1072808, 918138, 1, 39, 5, r);
1122 specialPlusTerm(p, 976026, 132162, 1, 38, 5, r);
1123 specialPlusTerm(p, 879909, 204828, 1, 37, 5, r);
1124 specialPlusTerm(p, 785891, 410576, 1, 36, 5, r);
1125 specialPlusTerm(p, 695244, 690346, 1, 35, 5, r);
1126 specialPlusTerm(p, 609054, 157073, 1, 34, 5, r);
1127 specialPlusTerm(p, 528201, 178547, 1, 33, 5, r);
1128 specialPlusTerm(p, 453355, 178523, 1, 32, 5, r);
1129 specialPlusTerm(p, 384973, 865967, 1, 31, 5, r);
1130 specialPlusTerm(p, 323311, 212357, 1, 30, 5, r);
1131 specialPlusTerm(p, 268432, 169189, 1, 29, 5, r);
1132 specialPlusTerm(p, 220232, 868421, 1, 28, 5, r);
1133 specialPlusTerm(p, 178464, 887323, 1, 27, 5, r);
1134 specialPlusTerm(p, 142762, 89447, 1, 26, 5, r);
1135 specialPlusTerm(p, 112668, 572043, 1, 25, 5, r);
1136 specialPlusTerm(p, 87666, 348585, 1, 24, 5, r);
1137 specialPlusTerm(p, 67201, 559745, 1, 23, 5, r);
1138 specialPlusTerm(p, 50708, 221257, 1, 22, 5, r);
1139 specialPlusTerm(p, 37628, 764983, 1, 21, 5, r);
1140 specialPlusTerm(p, 27430, 891847, 1, 20, 5, r);
1141 specialPlusTerm(p, 19620, 514504, 1, 19, 5, r);
1142 specialPlusTerm(p, 13750, 807706, 1, 18, 5, r);
1143 specialPlusTerm(p, 9427, 591898, 1, 17, 5, r);
1144 specialPlusTerm(p, 6311, 440762, 1, 16, 5, r);
1145 specialPlusTerm(p, 4117, 20228, 1, 15, 5, r);
1146 specialPlusTerm(p, 2610, 233212, 1, 14, 5, r);
1147 specialPlusTerm(p, 1603, 763552, 1, 13, 5, r);
1148 specialPlusTerm(p, 951, 590329, 1, 12, 5, r);
1149 specialPlusTerm(p, 542, 988511, 1, 11, 5, r);
1150 specialPlusTerm(p, 296, 453834, 1, 10, 5, r);
1151 specialPlusTerm(p, 153, 899291, 1, 9, 5, r);
1152 specialPlusTerm(p, 75, 376496, 1, 8, 5, r);
1153 specialPlusTerm(p, 34, 484437, 1, 7, 5, r);
1154 specialPlusTerm(p, 14, 545453, 1, 6, 5, r);
1155 specialPlusTerm(p, 5, 557552, 1, 5, 5, r);
1156 specialPlusTerm(p, 1, 876238, 1, 4, 5, r);
1157 specialPlusTerm(p, 0, 539266, 1, 3, 5, r);
1158 specialPlusTerm(p, 0, 124215, 1, 2, 5, r);
1159 specialPlusTerm(p, 0, 20475, 1, 1, 5, r);
1160 specialPlusTerm(p, 0, 1820, 1, 0, 5, r);
1161 specialPlusTerm(p, 0, 1, -1, 117, 4, r);
1162 specialPlusTerm(p, 0, 14, -1, 116, 4, r);
1163 specialPlusTerm(p, 0, 106, -1, 115, 4, r);
1164 specialPlusTerm(p, 0, 575, -1, 114, 4, r);
1165 specialPlusTerm(p, 0, 2496, -1, 113, 4, r);
1166 specialPlusTerm(p, 0, 9192, -1, 112, 4, r);
1167 specialPlusTerm(p, 0, 29769, -1, 111, 4, r);
1168 specialPlusTerm(p, 0, 86862, -1, 110, 4, r);
1169 specialPlusTerm(p, 0, 232352, -1, 109, 4, r);
1170 specialPlusTerm(p, 0, 577237, -1, 108, 4, r);
1171 specialPlusTerm(p, 1, 345280, -1, 107, 4, r);
1172 specialPlusTerm(p, 2, 964694, -1, 106, 4, r);
1173 specialPlusTerm(p, 6, 218071, -1, 105, 4, r);
1174 specialPlusTerm(p, 12, 478024, -1, 104, 4, r);
1175 specialPlusTerm(p, 24, 64445, -1, 103, 4, r);
1176 specialPlusTerm(p, 44, 768554, -1, 102, 4, r);
1177 specialPlusTerm(p, 80, 598456, -1, 101, 4, r);
1178 specialPlusTerm(p, 140, 809905, -1, 100, 4, r);
1179 specialPlusTerm(p, 239, 293294, -1, 99, 4, r);
1180 specialPlusTerm(p, 396, 392192, -1, 98, 4, r);
1181 specialPlusTerm(p, 641, 228471, -1, 97, 4, r);
1182 specialPlusTerm(p, 1014, 602512, -1, 96, 4, r);
1183 specialPlusTerm(p, 1572, 522451, -1, 95, 4, r);
1184 specialPlusTerm(p, 2390, 392393, -1, 94, 4, r);
1185 specialPlusTerm(p, 3567, 854826, -1, 93, 4, r);
1186 specialPlusTerm(p, 5234, 236531, -1, 92, 4, r);
1187 specialPlusTerm(p, 7554, 490334, -1, 91, 4, r);
1188 specialPlusTerm(p, 10735, 458285, -1, 90, 4, r);
1189 specialPlusTerm(p, 15032, 207608, -1, 89, 4, r);
1190 specialPlusTerm(p, 20754, 112592, -1, 88, 4, r);
1191 specialPlusTerm(p, 28270, 278236, -1, 87, 4, r);
1192 specialPlusTerm(p, 38013, 830749, -1, 86, 4, r);
1193 specialPlusTerm(p, 50484, 542623, -1, 85, 4, r);
1194 specialPlusTerm(p, 66249, 223101, -1, 84, 4, r);
1195 specialPlusTerm(p, 85939, 295631, -1, 83, 4, r);
1196 specialPlusTerm(p, 110245, 8968, -1, 82, 4, r);
1197 specialPlusTerm(p, 139905, 793448, -1, 81, 4, r);
1198 specialPlusTerm(p, 175696, 382307, -1, 80, 4, r);
1199 specialPlusTerm(p, 218408, 471011, -1, 79, 4, r);
1200 specialPlusTerm(p, 268827, 883672, -1, 78, 4, r);
1201 specialPlusTerm(p, 327707, 449671, -1, 77, 4, r);
1202 specialPlusTerm(p, 395736, 57018, -1, 76, 4, r);
1203 specialPlusTerm(p, 473504, 629765, -1, 75, 4, r);
1204 specialPlusTerm(p, 561470, 59952, -1, 74, 4, r);
1205 specialPlusTerm(p, 659918, 392736, -1, 73, 4, r);
1206 specialPlusTerm(p, 768928, 797683, -1, 72, 4, r);
1207 specialPlusTerm(p, 888340, 40490, -1, 71, 4, r);
1208 specialPlusTerm(p, 1017721, 279436, -1, 70, 4, r);
1209 specialPlusTerm(p, 1156349, 33848, -1, 69, 4, r);
1210 specialPlusTerm(p, 1303192, 95883, -1, 68, 4, r);
1211 specialPlusTerm(p, 1456905, 975122, -1, 67, 4, r);
1212 specialPlusTerm(p, 1615838, 177110, -1, 66, 4, r);
1213 specialPlusTerm(p, 1778045, 228075, -1, 65, 4, r);
1214 specialPlusTerm(p, 1941321, 881690, -1, 64, 4, r);
1215 specialPlusTerm(p, 2103242, 399767, -1, 63, 4, r);
1216 specialPlusTerm(p, 2261213, 213104, -1, 62, 4, r);
1217 specialPlusTerm(p, 2412535, 672007, -1, 61, 4, r);
1218 specialPlusTerm(p, 2554477, 22053, -1, 60, 4, r);
1219 specialPlusTerm(p, 2684347, 224260, -1, 59, 4, r);
1220 specialPlusTerm(p, 2799578, 813532, -1, 58, 4, r);
1221 specialPlusTerm(p, 2897806, 685056, -1, 57, 4, r);
1222 specialPlusTerm(p, 2976944, 539523, -1, 56, 4, r);
1223 specialPlusTerm(p, 3035254, 721183, -1, 55, 4, r);
1224 specialPlusTerm(p, 3071408, 355156, -1, 54, 4, r);
1225 specialPlusTerm(p, 3084533, 29299, -1, 53, 4, r);
1226 specialPlusTerm(p, 3074245, 758101, -1, 52, 4, r);
1227 specialPlusTerm(p, 3040669, 588583, -1, 51, 4, r);
1228 specialPlusTerm(p, 2984432, 929416, -1, 50, 4, r);
1229 specialPlusTerm(p, 2906651, 466023, -1, 49, 4, r);
1230 specialPlusTerm(p, 2808893, 323361, -1, 48, 4, r);
1231 specialPlusTerm(p, 2693128, 909640, -1, 47, 4, r);
1232 specialPlusTerm(p, 2561667, 574760, -1, 46, 4, r);
1233 specialPlusTerm(p, 2417083, 807115, -1, 45, 4, r);
1234 specialPlusTerm(p, 2262136, 138608, -1, 44, 4, r);
1235 specialPlusTerm(p, 2099682, 206060, -1, 43, 4, r);
1236 specialPlusTerm(p, 1932593, 513922, -1, 42, 4, r);
1237 specialPlusTerm(p, 1763673, 355846, -1, 41, 4, r);
1238 specialPlusTerm(p, 1595581, 90061, -1, 40, 4, r);
1239 specialPlusTerm(p, 1430765, 545095, -1, 39, 4, r);
1240 specialPlusTerm(p, 1271409, 786637, -1, 38, 4, r);
1241 specialPlusTerm(p, 1119388, 838595, -1, 37, 4, r);
1242 specialPlusTerm(p, 976241, 261398, -1, 36, 4, r);
1243 specialPlusTerm(p, 843154, 789753, -1, 35, 4, r);
1244 specialPlusTerm(p, 720965, 560845, -1, 34, 4, r);
1245 specialPlusTerm(p, 610169, 859179, -1, 33, 4, r);
1246 specialPlusTerm(p, 510946, 796821, -1, 32, 4, r);
1247 specialPlusTerm(p, 423189, 960892, -1, 31, 4, r);
1248 specialPlusTerm(p, 346545, 808032, -1, 30, 4, r);
1249 specialPlusTerm(p, 280456, 472902, -1, 29, 4, r);
1250 specialPlusTerm(p, 224204, 680080, -1, 28, 4, r);
1251 specialPlusTerm(p, 176958, 593014, -1, 27, 4, r);
1252 specialPlusTerm(p, 137814, 680334, -1, 26, 4, r);
1253 specialPlusTerm(p, 105837, 4252, -1, 25, 4, r);
1254 specialPlusTerm(p, 80091, 710806, -1, 24, 4, r);
1255 specialPlusTerm(p, 59675, 899582, -1, 23, 4, r);
1256 specialPlusTerm(p, 43740, 445029, -1, 22, 4, r);
1257 specialPlusTerm(p, 31506, 709211, -1, 21, 4, r);
1258 specialPlusTerm(p, 22277, 407599, -1, 20, 4, r);
1259 specialPlusTerm(p, 15442, 151129, -1, 19, 4, r);
1260 specialPlusTerm(p, 10478, 380611, -1, 18, 4, r);
1261 specialPlusTerm(p, 6948, 530664, -1, 17, 4, r);
1262 specialPlusTerm(p, 4494, 312038, -1, 16, 4, r);
1263 specialPlusTerm(p, 2828, 990461, -1, 15, 4, r);
1264 specialPlusTerm(p, 1728, 477668, -1, 14, 4, r);
1265 specialPlusTerm(p, 1021, 949004, -1, 13, 4, r);
1266 specialPlusTerm(p, 582, 575810, -1, 12, 4, r);
1267 specialPlusTerm(p, 318, 823114, -1, 11, 4, r);
1268 specialPlusTerm(p, 166, 625848, -1, 10, 4, r);
1269 specialPlusTerm(p, 82, 629352, -1, 9, 4, r);
1270 specialPlusTerm(p, 38, 568972, -1, 8, 4, r);
1271 specialPlusTerm(p, 16, 773120, -1, 7, 4, r);
1272 specialPlusTerm(p, 6, 706050, -1, 6, 4, r);
1273 specialPlusTerm(p, 2, 420964, -1, 5, 4, r);
1274 specialPlusTerm(p, 0, 769496, -1, 4, 4, r);
1275 specialPlusTerm(p, 0, 207389, -1, 3, 4, r);
1276 specialPlusTerm(p, 0, 44590, -1, 2, 4, r);
1277 specialPlusTerm(p, 0, 6825, -1, 1, 4, r);
1278 specialPlusTerm(p, 0, 560, -1, 0, 4, r);
1279 specialPlusTerm(p, 0, 1, 1, 119, 3, r);
1280 specialPlusTerm(p, 0, 15, 1, 118, 3, r);
1281 specialPlusTerm(p, 0, 121, 1, 117, 3, r);
1282 specialPlusTerm(p, 0, 692, 1, 116, 3, r);
1283 specialPlusTerm(p, 0, 3136, 1, 115, 3, r);
1284 specialPlusTerm(p, 0, 11960, 1, 114, 3, r);
1285 specialPlusTerm(p, 0, 39853, 1, 113, 3, r);
1286 specialPlusTerm(p, 0, 119021, 1, 112, 3, r);
1287 specialPlusTerm(p, 0, 324469, 1, 111, 3, r);
1288 specialPlusTerm(p, 0, 818608, 1, 110, 3, r);
1289 specialPlusTerm(p, 1, 931746, 1, 109, 3, r);
1290 specialPlusTerm(p, 4, 299910, 1, 108, 3, r);
1291 specialPlusTerm(p, 9, 90121, 1, 107, 3, r);
1292 specialPlusTerm(p, 18, 353593, 1, 106, 3, r);
1293 specialPlusTerm(p, 35, 558983, 1, 105, 3, r);
1294 specialPlusTerm(p, 66, 370113, 1, 104, 3, r);
1295 specialPlusTerm(p, 119, 744513, 1, 103, 3, r);
1296 specialPlusTerm(p, 209, 439344, 1, 102, 3, r);
1297 specialPlusTerm(p, 356, 18067, 1, 101, 3, r);
1298 specialPlusTerm(p, 589, 452669, 1, 100, 3, r);
1299 specialPlusTerm(p, 952, 410212, 1, 99, 3, r);
1300 specialPlusTerm(p, 1504, 296795, 1, 98, 3, r);
1301 specialPlusTerm(p, 2326, 104760, 1, 97, 3, r);
1302 specialPlusTerm(p, 3526, 68612, 1, 96, 3, r);
1303 specialPlusTerm(p, 5246, 80850, 1, 95, 3, r);
1304 specialPlusTerm(p, 7668, 750896, 1, 94, 3, r);
1305 specialPlusTerm(p, 11024, 909967, 1, 93, 3, r);
1306 specialPlusTerm(p, 15601, 274876, 1, 92, 3, r);
1307 specialPlusTerm(p, 21747, 888690, 1, 91, 3, r);
1308 specialPlusTerm(p, 29884, 861708, 1, 90, 3, r);
1309 specialPlusTerm(p, 40507, 849459, 1, 89, 3, r);
1310 specialPlusTerm(p, 54191, 633482, 1, 88, 3, r);
1311 specialPlusTerm(p, 71591, 124221, 1, 87, 3, r);
1312 specialPlusTerm(p, 93439, 92109, 1, 86, 3, r);
1313 specialPlusTerm(p, 120539, 960778, 1, 85, 3, r);
1314 specialPlusTerm(p, 153759, 71799, 1, 84, 3, r);
1315 specialPlusTerm(p, 194006, 957680, 1, 83, 3, r);
1316 specialPlusTerm(p, 242218, 340335, 1, 82, 3, r);
1317 specialPlusTerm(p, 299325, 803637, 1, 81, 3, r);
1318 specialPlusTerm(p, 366228, 364763, 1, 80, 3, r);
1319 specialPlusTerm(p, 443755, 479465, 1, 79, 3, r);
1320 specialPlusTerm(p, 532627, 346793, 1, 78, 3, r);
1321 specialPlusTerm(p, 633412, 711280, 1, 77, 3, r);
1322 specialPlusTerm(p, 746485, 674616, 1, 76, 3, r);
1323 specialPlusTerm(p, 871983, 302274, 1, 75, 3, r);
1324 specialPlusTerm(p, 1009766, 21123, 1, 74, 3, r);
1325 specialPlusTerm(p, 1159382, 930867, 1, 73, 3, r);
1326 specialPlusTerm(p, 1320044, 177277, 1, 72, 3, r);
1327 specialPlusTerm(p, 1490602, 445312, 1, 71, 3, r);
1328 specialPlusTerm(p, 1669545, 418046, 1, 70, 3, r);
1329 specialPlusTerm(p, 1855000, 712658, 1, 69, 3, r);
1330 specialPlusTerm(p, 2044754, 355265, 1, 68, 3, r);
1331 specialPlusTerm(p, 2236283, 307760, 1, 67, 3, r);
1332 specialPlusTerm(p, 2426801, 935374, 1, 66, 3, r);
1333 specialPlusTerm(p, 2613321, 633418, 1, 65, 3, r);
1334 specialPlusTerm(p, 2792722, 150781, 1, 64, 3, r);
1335 specialPlusTerm(p, 2961832, 494671, 1, 63, 3, r);
1336 specialPlusTerm(p, 3117518, 715055, 1, 62, 3, r);
1337 specialPlusTerm(p, 3256775, 385842, 1, 61, 3, r);
1338 specialPlusTerm(p, 3376817, 256340, 1, 60, 3, r);
1339 specialPlusTerm(p, 3475167, 367466, 1, 59, 3, r);
1340 specialPlusTerm(p, 3549737, 930366, 1, 58, 3, r);
1341 specialPlusTerm(p, 3598900, 457938, 1, 57, 3, r);
1342 specialPlusTerm(p, 3621542, 18424, 1, 56, 3, r);
1343 specialPlusTerm(p, 3617105, 29495, 1, 55, 3, r);
1344 specialPlusTerm(p, 3585608, 705050, 1, 54, 3, r);
1345 specialPlusTerm(p, 3527651, 69853, 1, 53, 3, r);
1346 specialPlusTerm(p, 3444391, 326416, 1, 52, 3, r);
1347 specialPlusTerm(p, 3337513, 246817, 1, 51, 3, r);
1348 specialPlusTerm(p, 3209171, 120352, 1, 50, 3, r);
1349 specialPlusTerm(p, 3061920, 568442, 1, 49, 3, r);
1350 specialPlusTerm(p, 2898637, 197953, 1, 48, 3, r);
1351 specialPlusTerm(p, 2722426, 567254, 1, 47, 3, r);
1352 specialPlusTerm(p, 2536529, 259766, 1, 46, 3, r);
1353 specialPlusTerm(p, 2344224, 982535, 1, 45, 3, r);
1354 specialPlusTerm(p, 2148739, 529673, 1, 44, 3, r);
1355 specialPlusTerm(p, 1953158, 181630, 1, 43, 3, r);
1356 specialPlusTerm(p, 1760348, 671733, 1, 42, 3, r);
1357 specialPlusTerm(p, 1572896, 271477, 1, 41, 3, r);
1358 specialPlusTerm(p, 1393052, 863345, 1, 40, 3, r);
1359 specialPlusTerm(p, 1222701, 126910, 1, 39, 3, r);
1360 specialPlusTerm(p, 1063334, 204889, 1, 38, 3, r);
1361 specialPlusTerm(p, 916050, 483828, 1, 37, 3, r);
1362 specialPlusTerm(p, 781562, 458519, 1, 36, 3, r);
1363 specialPlusTerm(p, 660218, 83241, 1, 35, 3, r);
1364 specialPlusTerm(p, 552032, 571637, 1, 34, 3, r);
1365 specialPlusTerm(p, 456728, 306449, 1, 33, 3, r);
1366 specialPlusTerm(p, 373780, 366678, 1, 32, 3, r);
1367 specialPlusTerm(p, 302465, 169735, 1, 31, 3, r);
1368 specialPlusTerm(p, 241909, 847846, 1, 30, 3, r);
1369 specialPlusTerm(p, 191140, 212177, 1, 29, 3, r);
1370 specialPlusTerm(p, 149125, 480301, 1, 28, 3, r);
1371 specialPlusTerm(p, 114818, 324960, 1, 27, 3, r);
1372 specialPlusTerm(p, 87189, 215772, 1, 26, 3, r);
1373 specialPlusTerm(p, 65254, 442815, 1, 25, 3, r);
1374 specialPlusTerm(p, 48097, 606920, 1, 24, 3, r);
1375 specialPlusTerm(p, 34884, 715247, 1, 23, 3, r);
1376 specialPlusTerm(p, 24873, 316659, 1, 22, 3, r);
1377 specialPlusTerm(p, 17416, 339482, 1, 21, 3, r);
1378 specialPlusTerm(p, 11961, 450014, 1, 20, 3, r);
1379 specialPlusTerm(p, 8046, 834503, 1, 19, 3, r);
1380 specialPlusTerm(p, 5294, 325768, 1, 18, 3, r);
1381 specialPlusTerm(p, 3400, 757398, 1, 17, 3, r);
1382 specialPlusTerm(p, 2128, 345318, 1, 16, 3, r);
1383 specialPlusTerm(p, 1294, 781596, 1, 15, 3, r);
1384 specialPlusTerm(p, 763, 591975, 1, 14, 3, r);
1385 specialPlusTerm(p, 435, 169111, 1, 13, 3, r);
1386 specialPlusTerm(p, 238, 758463, 1, 12, 3, r);
1387 specialPlusTerm(p, 125, 551459, 1, 11, 3, r);
1388 specialPlusTerm(p, 62, 936621, 1, 10, 3, r);
1389 specialPlusTerm(p, 29, 876893, 1, 9, 3, r);
1390 specialPlusTerm(p, 13, 321355, 1, 8, 3, r);
1391 specialPlusTerm(p, 5, 520901, 1, 7, 3, r);
1392 specialPlusTerm(p, 2, 98067, 1, 6, 3, r);
1393 specialPlusTerm(p, 0, 717871, 1, 5, 3, r);
1394 specialPlusTerm(p, 0, 215565, 1, 4, 3, r);
1395 specialPlusTerm(p, 0, 54691, 1, 3, 3, r);
1396 specialPlusTerm(p, 0, 11025, 1, 2, 3, r);
1397 specialPlusTerm(p, 0, 1575, 1, 1, 3, r);
1398 specialPlusTerm(p, 0, 120, 1, 0, 3, r);
1399 specialPlusTerm(p, 0, 1, -1, 120, 2, r);
1400 specialPlusTerm(p, 0, 16, -1, 119, 2, r);
1401 specialPlusTerm(p, 0, 134, -1, 118, 2, r);
1402 specialPlusTerm(p, 0, 784, -1, 117, 2, r);
1403 specialPlusTerm(p, 0, 3602, -1, 116, 2, r);
1404 specialPlusTerm(p, 0, 13843, -1, 115, 2, r);
1405 specialPlusTerm(p, 0, 46286, -1, 114, 2, r);
1406 specialPlusTerm(p, 0, 138283, -1, 113, 2, r);
1407 specialPlusTerm(p, 0, 376259, -1, 112, 2, r);
1408 specialPlusTerm(p, 0, 945827, -1, 111, 2, r);
1409 specialPlusTerm(p, 2, 220933, -1, 110, 2, r);
1410 specialPlusTerm(p, 4, 914174, -1, 109, 2, r);
1411 specialPlusTerm(p, 10, 318553, -1, 108, 2, r);
1412 specialPlusTerm(p, 20, 680144, -1, 107, 2, r);
1413 specialPlusTerm(p, 39, 750869, -1, 106, 2, r);
1414 specialPlusTerm(p, 73, 579984, -1, 105, 2, r);
1415 specialPlusTerm(p, 131, 610793, -1, 104, 2, r);
1416 specialPlusTerm(p, 228, 154162, -1, 103, 2, r);
1417 specialPlusTerm(p, 384, 310996, -1, 102, 2, r);
1418 specialPlusTerm(p, 630, 410278, -1, 101, 2, r);
1419 specialPlusTerm(p, 1009, 15895, -1, 100, 2, r);
1420 specialPlusTerm(p, 1578, 532849, -1, 99, 2, r);
1421 specialPlusTerm(p, 2417, 410542, -1, 98, 2, r);
1422 specialPlusTerm(p, 3628, 897233, -1, 97, 2, r);
1423 specialPlusTerm(p, 5346, 245930, -1, 96, 2, r);
1424 specialPlusTerm(p, 7738, 209354, -1, 95, 2, r);
1425 specialPlusTerm(p, 11014, 592780, -1, 94, 2, r);
1426 specialPlusTerm(p, 15431, 562271, -1, 93, 2, r);
1427 specialPlusTerm(p, 21296, 336917, -1, 92, 2, r);
1428 specialPlusTerm(p, 28970, 832923, -1, 91, 2, r);
1429 specialPlusTerm(p, 38873, 781118, -1, 90, 2, r);
1430 specialPlusTerm(p, 51480, 814244, -1, 89, 2, r);
1431 specialPlusTerm(p, 67322, 22502, -1, 88, 2, r);
1432 specialPlusTerm(p, 86976, 510707, -1, 87, 2, r);
1433 specialPlusTerm(p, 111063, 562039, -1, 86, 2, r);
1434 specialPlusTerm(p, 140230, 123797, -1, 85, 2, r);
1435 specialPlusTerm(p, 175134, 479331, -1, 84, 2, r);
1436 specialPlusTerm(p, 216426, 154185, -1, 83, 2, r);
1437 specialPlusTerm(p, 264722, 317163, -1, 82, 2, r);
1438 specialPlusTerm(p, 320581, 169273, -1, 81, 2, r);
1439 specialPlusTerm(p, 384473, 53329, -1, 80, 2, r);
1440 specialPlusTerm(p, 456750, 250207, -1, 79, 2, r);
1441 specialPlusTerm(p, 537616, 638714, -1, 78, 2, r);
1442 specialPlusTerm(p, 627098, 568602, -1, 77, 2, r);
1443 specialPlusTerm(p, 725018, 414915, -1, 76, 2, r);
1444 specialPlusTerm(p, 830972, 332853, -1, 75, 2, r);
1445 specialPlusTerm(p, 944313, 704873, -1, 74, 2, r);
1446 specialPlusTerm(p, 1064143, 659019, -1, 73, 2, r);
1447 specialPlusTerm(p, 1189309, 837532, -1, 72, 2, r);
1448 specialPlusTerm(p, 1318414, 311129, -1, 71, 2, r);
1449 specialPlusTerm(p, 1449831, 176128, -1, 70, 2, r);
1450 specialPlusTerm(p, 1581733, 953526, -1, 69, 2, r);
1451 specialPlusTerm(p, 1712132, 450851, -1, 68, 2, r);
1452 specialPlusTerm(p, 1838918, 272730, -1, 67, 2, r);
1453 specialPlusTerm(p, 1959917, 700931, -1, 66, 2, r);
1454 specialPlusTerm(p, 2072950, 236513, -1, 65, 2, r);
1455 specialPlusTerm(p, 2175890, 732337, -1, 64, 2, r);
1456 specialPlusTerm(p, 2266732, 767744, -1, 63, 2, r);
1457 specialPlusTerm(p, 2343650, 748669, -1, 62, 2, r);
1458 specialPlusTerm(p, 2405058, 170088, -1, 61, 2, r);
1459 specialPlusTerm(p, 2449659, 560856, -1, 60, 2, r);
1460 specialPlusTerm(p, 2476493, 843437, -1, 59, 2, r);
1461 specialPlusTerm(p, 2484967, 174656, -1, 58, 2, r);
1462 specialPlusTerm(p, 2474873, 772785, -1, 57, 2, r);
1463 specialPlusTerm(p, 2446403, 758673, -1, 56, 2, r);
1464 specialPlusTerm(p, 2400137, 616515, -1, 55, 2, r);
1465 specialPlusTerm(p, 2337027, 481818, -1, 54, 2, r);
1466 specialPlusTerm(p, 2258366, 57059, -1, 53, 2, r);
1467 specialPlusTerm(p, 2165744, 506758, -1, 52, 2, r);
1468 specialPlusTerm(p, 2061001, 163040, -1, 51, 2, r);
1469 specialPlusTerm(p, 1946163, 254505, -1, 50, 2, r);
1470 specialPlusTerm(p, 1823384, 135692, -1, 49, 2, r);
1471 specialPlusTerm(p, 1694878, 629195, -1, 48, 2, r);
1472 specialPlusTerm(p, 1562859, 93097, -1, 47, 2, r);
1473 specialPlusTerm(p, 1429474, 696453, -1, 46, 2, r);
1474 specialPlusTerm(p, 1296756, 136371, -1, 45, 2, r);
1475 specialPlusTerm(p, 1166567, 679850, -1, 44, 2, r);
1476 specialPlusTerm(p, 1040567, 985354, -1, 43, 2, r);
1477 specialPlusTerm(p, 920180, 680239, -1, 42, 2, r);
1478 specialPlusTerm(p, 806575, 169521, -1, 41, 2, r);
1479 specialPlusTerm(p, 700657, 657865, -1, 40, 2, r);
1480 specialPlusTerm(p, 603071, 906907, -1, 39, 2, r);
1481 specialPlusTerm(p, 514208, 847321, -1, 38, 2, r);
1482 specialPlusTerm(p, 434223, 837763, -1, 37, 2, r);
1483 specialPlusTerm(p, 363060, 123557, -1, 36, 2, r);
1484 specialPlusTerm(p, 300476, 903127, -1, 35, 2, r);
1485 specialPlusTerm(p, 246080, 359923, -1, 34, 2, r);
1486 specialPlusTerm(p, 199356, 56374, -1, 33, 2, r);
1487 specialPlusTerm(p, 159701, 203700, -1, 32, 2, r);
1488 specialPlusTerm(p, 126455, 502830, -1, 31, 2, r);
1489 specialPlusTerm(p, 98929, 480219, -1, 30, 2, r);
1490 specialPlusTerm(p, 76429, 499829, -1, 29, 2, r);
1491 specialPlusTerm(p, 58278, 900847, -1, 28, 2, r);
1492 specialPlusTerm(p, 43834, 973084, -1, 27, 2, r);
1493 specialPlusTerm(p, 32501, 723962, -1, 26, 2, r);
1494 specialPlusTerm(p, 23738, 601098, -1, 25, 2, r);
1495 specialPlusTerm(p, 17065, 504721, -1, 24, 2, r);
1496 specialPlusTerm(p, 12064, 550062, -1, 23, 2, r);
1497 specialPlusTerm(p, 8379, 120417, -1, 22, 2, r);
1498 specialPlusTerm(p, 5710, 788839, -1, 21, 2, r);
1499 specialPlusTerm(p, 3814, 684934, -1, 20, 2, r);
1500 specialPlusTerm(p, 2493, 849460, -1, 19, 2, r);
1501 specialPlusTerm(p, 1593, 60962, -1, 18, 2, r);
1502 specialPlusTerm(p, 992, 543577, -1, 17, 2, r);
1503 specialPlusTerm(p, 601, 881264, -1, 16, 2, r);
1504 specialPlusTerm(p, 354, 378149, -1, 15, 2, r);
1505 specialPlusTerm(p, 202, 23344, -1, 14, 2, r);
1506 specialPlusTerm(p, 111, 145993, -1, 13, 2, r);
1507 specialPlusTerm(p, 58, 785390, -1, 12, 2, r);
1508 specialPlusTerm(p, 29, 753317, -1, 11, 2, r);
1509 specialPlusTerm(p, 14, 331491, -1, 10, 2, r);
1510 specialPlusTerm(p, 6, 525379, -1, 9, 2, r);
1511 specialPlusTerm(p, 2, 785083, -1, 8, 2, r);
1512 specialPlusTerm(p, 1, 102494, -1, 7, 2, r);
1513 specialPlusTerm(p, 0, 399235, -1, 6, 2, r);
1514 specialPlusTerm(p, 0, 129826, -1, 5, 2, r);
1515 specialPlusTerm(p, 0, 36944, -1, 4, 2, r);
1516 specialPlusTerm(p, 0, 8854, -1, 3, 2, r);
1517 specialPlusTerm(p, 0, 1680, -1, 2, 2, r);
1518 specialPlusTerm(p, 0, 225, -1, 1, 2, r);
1519 specialPlusTerm(p, 0, 16, -1, 0, 2, r);
1520 specialPlusTerm(p, 0, 1, 1, 120, 1, r);
1521 specialPlusTerm(p, 0, 15, 1, 119, 1, r);
1522 specialPlusTerm(p, 0, 119, 1, 118, 1, r);
1523 specialPlusTerm(p, 0, 664, 1, 117, 1, r);
1524 specialPlusTerm(p, 0, 2924, 1, 116, 1, r);
1525 specialPlusTerm(p, 0, 10813, 1, 115, 1, r);
1526 specialPlusTerm(p, 0, 34900, 1, 114, 1, r);
1527 specialPlusTerm(p, 0, 100913, 1, 113, 1, r);
1528 specialPlusTerm(p, 0, 266338, 1, 112, 1, r);
1529 specialPlusTerm(p, 0, 650658, 1, 111, 1, r);
1530 specialPlusTerm(p, 1, 487262, 1, 110, 1, r);
1531 specialPlusTerm(p, 3, 208036, 1, 109, 1, r);
1532 specialPlusTerm(p, 6, 574987, 1, 108, 1, r);
1533 specialPlusTerm(p, 12, 876702, 1, 107, 1, r);
1534 specialPlusTerm(p, 24, 210652, 1, 106, 1, r);
1535 specialPlusTerm(p, 43, 874857, 1, 105, 1, r);
1536 specialPlusTerm(p, 76, 893687, 1, 104, 1, r);
1537 specialPlusTerm(p, 130, 701986, 1, 103, 1, r);
1538 specialPlusTerm(p, 216, 8661, 1, 102, 1, r);
1539 specialPlusTerm(p, 347, 854815, 1, 101, 1, r);
1540 specialPlusTerm(p, 546, 871981, 1, 100, 1, r);
1541 specialPlusTerm(p, 840, 732790, 1, 99, 1, r);
1542 specialPlusTerm(p, 1265, 769513, 1, 98, 1, r);
1543 specialPlusTerm(p, 1868, 715733, 1, 97, 1, r);
1544 specialPlusTerm(p, 2708, 503701, 1, 96, 1, r);
1545 specialPlusTerm(p, 3858, 25899, 1, 95, 1, r);
1546 specialPlusTerm(p, 5405, 745562, 1, 94, 1, r);
1547 specialPlusTerm(p, 7457, 19331, 1, 93, 1, r);
1548 specialPlusTerm(p, 10134, 977992, 1, 92, 1, r);
1549 specialPlusTerm(p, 13580, 800674, 1, 91, 1, r);
1550 specialPlusTerm(p, 17953, 216130, 1, 90, 1, r);
1551 specialPlusTerm(p, 23427, 73737, 1, 89, 1, r);
1552 specialPlusTerm(p, 30190, 848078, 1, 88, 1, r);
1553 specialPlusTerm(p, 38442, 975195, 1, 87, 1, r);
1554 specialPlusTerm(p, 48386, 965771, 1, 86, 1, r);
1555 specialPlusTerm(p, 60225, 299589, 1, 85, 1, r);
1556 specialPlusTerm(p, 74152, 174574, 1, 84, 1, r);
1557 specialPlusTerm(p, 90345, 259476, 1, 83, 1, r);
1558 specialPlusTerm(p, 108956, 677797, 1, 82, 1, r);
1559 specialPlusTerm(p, 130103, 527156, 1, 81, 1, r);
1560 specialPlusTerm(p, 153858, 307693, 1, 80, 1, r);
1561 specialPlusTerm(p, 180239, 689955, 1, 79, 1, r);
1562 specialPlusTerm(p, 209204, 91832, 1, 78, 1, r);
1563 specialPlusTerm(p, 240638, 550997, 1, 77, 1, r);
1564 specialPlusTerm(p, 274355, 370450, 1, 76, 1, r);
1565 specialPlusTerm(p, 310088, 978041, 1, 75, 1, r);
1566 specialPlusTerm(p, 347495, 375766, 1, 74, 1, r);
1567 specialPlusTerm(p, 386154, 462530, 1, 73, 1, r);
1568 specialPlusTerm(p, 425575, 398166, 1, 72, 1, r);
1569 specialPlusTerm(p, 465205, 41801, 1, 71, 1, r);
1570 specialPlusTerm(p, 504439, 350762, 1, 70, 1, r);
1571 specialPlusTerm(p, 542637, 474944, 1, 69, 1, r);
1572 specialPlusTerm(p, 579138, 134521, 1, 68, 1, r);
1573 specialPlusTerm(p, 613277, 734909, 1, 67, 1, r);
1574 specialPlusTerm(p, 644409, 560477, 1, 66, 1, r);
1575 specialPlusTerm(p, 671923, 305201, 1, 65, 1, r);
1576 specialPlusTerm(p, 695264, 150336, 1, 64, 1, r);
1577 specialPlusTerm(p, 713950, 590364, 1, 63, 1, r);
1578 specialPlusTerm(p, 727590, 240796, 1, 62, 1, r);
1579 specialPlusTerm(p, 735892, 934219, 1, 61, 1, r);
1580 specialPlusTerm(p, 738680, 521142, 1, 60, 1, r);
1581 specialPlusTerm(p, 735892, 934219, 1, 59, 1, r);
1582 specialPlusTerm(p, 727590, 240796, 1, 58, 1, r);
1583 specialPlusTerm(p, 713950, 590364, 1, 57, 1, r);
1584 specialPlusTerm(p, 695264, 150336, 1, 56, 1, r);
1585 specialPlusTerm(p, 671923, 305201, 1, 55, 1, r);
1586 specialPlusTerm(p, 644409, 560477, 1, 54, 1, r);
1587 specialPlusTerm(p, 613277, 734909, 1, 53, 1, r);
1588 specialPlusTerm(p, 579138, 134521, 1, 52, 1, r);
1589 specialPlusTerm(p, 542637, 474944, 1, 51, 1, r);
1590 specialPlusTerm(p, 504439, 350762, 1, 50, 1, r);
1591 specialPlusTerm(p, 465205, 41801, 1, 49, 1, r);
1592 specialPlusTerm(p, 425575, 398166, 1, 48, 1, r);
1593 specialPlusTerm(p, 386154, 462530, 1, 47, 1, r);
1594 specialPlusTerm(p, 347495, 375766, 1, 46, 1, r);
1595 specialPlusTerm(p, 310088, 978041, 1, 45, 1, r);
1596 specialPlusTerm(p, 274355, 370450, 1, 44, 1, r);
1597 specialPlusTerm(p, 240638, 550997, 1, 43, 1, r);
1598 specialPlusTerm(p, 209204, 91832, 1, 42, 1, r);
1599 specialPlusTerm(p, 180239, 689955, 1, 41, 1, r);
1600 specialPlusTerm(p, 153858, 307693, 1, 40, 1, r);
1601 specialPlusTerm(p, 130103, 527156, 1, 39, 1, r);
1602 specialPlusTerm(p, 108956, 677797, 1, 38, 1, r);
1603 specialPlusTerm(p, 90345, 259476, 1, 37, 1, r);
1604 specialPlusTerm(p, 74152, 174574, 1, 36, 1, r);
1605 specialPlusTerm(p, 60225, 299589, 1, 35, 1, r);
1606 specialPlusTerm(p, 48386, 965771, 1, 34, 1, r);
1607 specialPlusTerm(p, 38442, 975195, 1, 33, 1, r);
1608 specialPlusTerm(p, 30190, 848078, 1, 32, 1, r);
1609 specialPlusTerm(p, 23427, 73737, 1, 31, 1, r);
1610 specialPlusTerm(p, 17953, 216130, 1, 30, 1, r);
1611 specialPlusTerm(p, 13580, 800674, 1, 29, 1, r);
1612 specialPlusTerm(p, 10134, 977992, 1, 28, 1, r);
1613 specialPlusTerm(p, 7457, 19331, 1, 27, 1, r);
1614 specialPlusTerm(p, 5405, 745562, 1, 26, 1, r);
1615 specialPlusTerm(p, 3858, 25899, 1, 25, 1, r);
1616 specialPlusTerm(p, 2708, 503701, 1, 24, 1, r);
1617 specialPlusTerm(p, 1868, 715733, 1, 23, 1, r);
1618 specialPlusTerm(p, 1265, 769513, 1, 22, 1, r);
1619 specialPlusTerm(p, 840, 732790, 1, 21, 1, r);
1620 specialPlusTerm(p, 546, 871981, 1, 20, 1, r);
1621 specialPlusTerm(p, 347, 854815, 1, 19, 1, r);
1622 specialPlusTerm(p, 216, 8661, 1, 18, 1, r);
1623 specialPlusTerm(p, 130, 701986, 1, 17, 1, r);
1624 specialPlusTerm(p, 76, 893687, 1, 16, 1, r);
1625 specialPlusTerm(p, 43, 874857, 1, 15, 1, r);
1626 specialPlusTerm(p, 24, 210652, 1, 14, 1, r);
1627 specialPlusTerm(p, 12, 876702, 1, 13, 1, r);
1628 specialPlusTerm(p, 6, 574987, 1, 12, 1, r);
1629 specialPlusTerm(p, 3, 208036, 1, 11, 1, r);
1630 specialPlusTerm(p, 1, 487262, 1, 10, 1, r);
1631 specialPlusTerm(p, 0, 650658, 1, 9, 1, r);
1632 specialPlusTerm(p, 0, 266338, 1, 8, 1, r);
1633 specialPlusTerm(p, 0, 100913, 1, 7, 1, r);
1634 specialPlusTerm(p, 0, 34900, 1, 6, 1, r);
1635 specialPlusTerm(p, 0, 10813, 1, 5, 1, r);
1636 specialPlusTerm(p, 0, 2924, 1, 4, 1, r);
1637 specialPlusTerm(p, 0, 664, 1, 3, 1, r);
1638 specialPlusTerm(p, 0, 119, 1, 2, 1, r);
1639 specialPlusTerm(p, 0, 15, 1, 1, 1, r);
1640 specialPlusTerm(p, 0, 1, 1, 0, 1, r);
1641 }
void specialPlusTerm(poly &p, int c1, int c2, int sign, int xExp, int yExp, const ring r)
Definition: polys_test.h:235
#define NULL
Definition: omList.c:12

◆ test_Q_Ext_a()

void PolysTestSuite::test_Q_Ext_a ( )
inline

Definition at line 1968 of file polys_test.h.

1969 {
1970 clog << "Start by creating Q[a]..." << endl;
1971
1972 char* n[] = {(char*)"a"};
1973 ring r = rDefault( 0, 1, n); // Q[a]
1975
1976 PrintRing(r);
1977
1979 TS_ASSERT( rField_is_Q(r) );
1980
1981 TS_ASSERT( !rField_is_Zp(r) );
1982 TS_ASSERT( !rField_is_Zp(r, 11) );
1983
1984 TS_ASSERT_EQUALS( rVar(r), 1);
1985
1986 poly minPoly = p_ISet(1, r); // minPoly = 1
1987 p_SetExp(minPoly, 1, 2, r); p_Setm(minPoly, r); // minPoly = a^2
1988 minPoly = p_Add_q(minPoly, p_ISet(1, r), r); // minPoly = a^2 + 1
1989 ideal minIdeal = idInit(1); // minIdeal = < 0 >
1990 minIdeal->m[0] = minPoly; // minIdeal = < a^2 + 1 >
1991
1993 TS_ASSERT(type == n_algExt);
1994
1995 r->qideal = minIdeal;
1996 AlgExtInfo extParam;
1997 extParam.r = r;
1998
1999 clog << "Next create the extension field Q[a]/<a2+1>..." << endl;
2000
2001 const coeffs cf = nInitChar(type, &extParam); // Q[a]/<a2+1>
2002
2003 if( cf == NULL )
2004 TS_FAIL("Could not get needed coeff. domain");
2005
2006 TS_ASSERT_DIFFERS( cf->cfCoeffWrite, NULLp );
2007
2008 if( cf->cfCoeffWrite != NULL )
2009 {
2010 clog << "Coeff-domain: " << endl;
2012 }
2013
2016
2017 // some tests for the coefficient field represented by cf:
2018 TestArithCf(cf);
2019 TestSumCf(cf, 10);
2020 TestSumCf(cf, 100);
2021 TestSumCf(cf, 101);
2022 TestSumCf(cf, 1001);
2023 TestSumCf(cf, 2000);
2024
2025 clog << "Finally create the polynomial ring (Q[a]/<a2+1>)[x, y]..."
2026 << endl;
2027
2028 char* m[] = {(char*)"x", (char*)"y"};
2029 ring s = rDefault(cf, 2, m); // (Q[a]/<a2+1>)[x, y]
2031
2032 PrintRing(s);
2033
2035 TS_ASSERT( !rField_is_Q(s) );
2037 TS_ASSERT( !rField_is_Zp(s, 11) );
2038 TS_ASSERT( !rField_is_Zp(s, 13) );
2040 TS_ASSERT( (s->cf->extRing!=NULL) );
2041 TS_ASSERT( !rField_is_GF(s, 25) );
2042 TS_ASSERT_EQUALS(rVar(s), 2);
2043
2044 Test(s);
2045
2046 clog << endl
2047 << "Now let's compute some inverses in Q[a]/<a^2+1>..."
2048 << endl;
2049
2050 poly u;
2051 u = NULL; plusTerm(u, 1, 1, 1, cf->extRing);
2052 plusTerm(u, 1, 1, 0, cf->extRing); // a + 1
2053 checkInverse((number)u, cf); p_Delete(&u, cf->extRing);
2054 u = NULL; plusTerm(u, 1, 1, 1, cf->extRing);
2055 plusTerm(u, -1, 1, 0, cf->extRing); // a - 1
2056 checkInverse((number)u, cf); p_Delete(&u, cf->extRing);
2057 u = NULL; plusTerm(u, 1, 1, 1, cf->extRing);
2058 plusTerm(u, 5, 1, 0, cf->extRing); // a + 5
2059 checkInverse((number)u, cf); p_Delete(&u, cf->extRing);
2060 u = NULL; plusTerm(u, 1, 1, 1, cf->extRing);
2061 plusTerm(u, -5, 1, 0, cf->extRing); // a - 5
2062 checkInverse((number)u, cf); p_Delete(&u, cf->extRing);
2063 u = NULL; plusTerm(u, 17, 1, 1, cf->extRing);
2064 plusTerm(u, 5, 1, 0, cf->extRing); // 17a + 5
2065 checkInverse((number)u, cf); p_Delete(&u, cf->extRing);
2066
2067 rDelete(s); // kills 'cf' and 'r' as well
2068 }
#define TS_ASSERT_EQUALS(x, y)
Definition: TestSuite.h:255
#define TS_ASSERT_DIFFERS(x, y)
Definition: TestSuite.h:287
#define TS_FAIL(e)
Definition: TestSuite.h:229
BOOLEAN naInitChar(coeffs cf, void *infoStruct)
Initialize the coeffs object.
Definition: algext.cc:1388
ring r
Definition: algext.h:37
struct for passing initialization parameters to naInitChar
Definition: algext.h:37
#define NULLp
Definition: auxiliary.h:108
int m
Definition: cfEzgcd.cc:128
void checkInverse(number n, const coeffs cf)
Definition: polys_test.h:1642
void TestArithCf(const coeffs r)
Definition: polys_test.h:1663
void plusTerm(poly &p, int c, int i, int exp, const ring r)
Definition: polys_test.h:214
void TestSumCf(const coeffs r, const unsigned long N)
Definition: polys_test.h:1749
static FORCE_INLINE void n_CoeffWrite(const coeffs r, BOOLEAN details=TRUE)
output the coeff description
Definition: coeffs.h:716
n_coeffType
Definition: coeffs.h:27
@ n_algExt
used for all algebraic extensions, i.e., the top-most extension in an extension tower is algebraic
Definition: coeffs.h:35
coeffs nInitChar(n_coeffType t, void *parameter)
one-time initialisations for new coeffs in case of an error return NULL
Definition: numbers.cc:413
static FORCE_INLINE BOOLEAN nCoeff_is_algExt(const coeffs r)
TRUE iff r represents an algebraic extension field.
Definition: coeffs.h:907
static FORCE_INLINE BOOLEAN nCoeff_is_transExt(const coeffs r)
TRUE iff r represents a transcendental extension field.
Definition: coeffs.h:915
BOOLEAN Test(const n_coeffType type, void *p=NULLp)
Definition: coeffs_test.h:209
const CanonicalForm int s
Definition: facAbsFact.cc:51
The main handler for Singular numbers which are suitable for Singular polynomials.
n_coeffType nRegister(n_coeffType n, cfInitCharProc p)
Definition: numbers.cc:595
static void p_Delete(poly *p, const ring r)
Definition: p_polys.h:899
void PrintLn()
Definition: reporter.cc:310
void rDelete(ring r)
unconditionally deletes fields in r
Definition: ring.cc:450
ring rDefault(const coeffs cf, int N, char **n, int ord_size, rRingOrder_t *ord, int *block0, int *block1, int **wvhdl, unsigned long bitmask)
Definition: ring.cc:102
static BOOLEAN rField_is_Zp(const ring r)
Definition: ring.h:500
static BOOLEAN rField_is_Domain(const ring r)
Definition: ring.h:487
static BOOLEAN rField_is_Q(const ring r)
Definition: ring.h:506
static BOOLEAN rField_is_GF(const ring r)
Definition: ring.h:521
static short rVar(const ring r)
#define rVar(r) (r->N)
Definition: ring.h:592
ideal idInit(int idsize, int rank)
initialise an ideal / module
Definition: simpleideals.cc:35

◆ test_Q_Ext_b()

void PolysTestSuite::test_Q_Ext_b ( )
inline

Definition at line 2069 of file polys_test.h.

2070 {
2071 clog << "Start by creating Q[b]..." << endl;
2072
2073 char* n[] = {(char*)"b"};
2074 ring r = rDefault( 0, 1, n); // Q[b]
2076
2077 PrintRing(r);
2078
2080 TS_ASSERT( rField_is_Q(r) );
2081
2082 TS_ASSERT( !rField_is_Zp(r) );
2083 TS_ASSERT( !rField_is_Zp(r, 11) );
2084
2085 TS_ASSERT_EQUALS( rVar(r), 1);
2086
2087 poly minPoly = p_ISet(1, r); // minPoly = 1
2088 p_SetExp(minPoly, 1, 7, r); p_Setm(minPoly, r); // minPoly = b^7
2089 minPoly = p_Add_q(minPoly, p_ISet(17, r), r); // minPoly = b^7 + 17
2090 ideal minIdeal = idInit(1); // minIdeal = < 0 >
2091 minIdeal->m[0] = minPoly; // minIdeal = < b^7 + 17 >
2092
2094 TS_ASSERT(type == n_algExt);
2095
2096 r->qideal = minIdeal;
2097 AlgExtInfo extParam;
2098 extParam.r = r;
2099
2100 clog << "Next create the extension field Q[b]/<b^7+17>..." << endl;
2101
2102 const coeffs cf = nInitChar(type, &extParam); // Q[b]/<b^7+17>
2103
2104 if( cf == NULL )
2105 TS_FAIL("Could not get needed coeff. domain");
2106
2107 TS_ASSERT_DIFFERS( cf->cfCoeffWrite, NULLp );
2108
2109 if( cf->cfCoeffWrite != NULL )
2110 {
2111 clog << "Coeff-domain: " << endl;
2113 }
2114
2117
2118 // some tests for the coefficient field represented by cf:
2119 TestArithCf(cf);
2120 TestSumCf(cf, 10);
2121 TestSumCf(cf, 100);
2122 TestSumCf(cf, 101);
2123 TestSumCf(cf, 1001);
2124 TestSumCf(cf, 9000);
2125
2126 clog << "Finally create the polynomial ring (Q[b]/<b^7+17>)[u, v, w]..."
2127 << endl;
2128
2129 char* m[] = {(char*)"u", (char*)"v", (char*)"w"};
2130 ring s = rDefault(cf, 3, m); // (Q[b]/<b^7+17>)[u, v, w]
2132
2133 PrintRing(s);
2134
2136 TS_ASSERT( !rField_is_Q(s) );
2138 TS_ASSERT( !rField_is_Zp(s, 11) );
2139 TS_ASSERT( !rField_is_Zp(s, 13) );
2141 TS_ASSERT( (s->cf->extRing!=NULL) );
2142 TS_ASSERT( !rField_is_GF(s, 25) );
2143 TS_ASSERT_EQUALS(rVar(s), 3);
2144
2145 Test(s);
2146
2147 clog << endl
2148 << "Now let's compute some inverses in Q[b]/<b^7+17>..."
2149 << endl;
2150
2151 poly u;
2152 u = NULL; plusTerm(u, 1, 1, 2, cf->extRing);
2153 plusTerm(u, 33, 1, 0, cf->extRing); // b^2 + 33
2154 checkInverse((number)u, cf); p_Delete(&u, cf->extRing);
2155 u = NULL; plusTerm(u, 1, 1, 5, cf->extRing);
2156 plusTerm(u, -137, 1, 0, cf->extRing); // b^5 - 137
2157 checkInverse((number)u, cf); p_Delete(&u, cf->extRing);
2158
2159 clog << endl
2160 << "Now let's check a gcd computation in Q[b]..."
2161 << endl;
2162
2163 poly v;
2164 v = NULL; plusTerm(v, 1, 1, 2, cf->extRing);
2165 plusTerm(v, 7, 1, 1, cf->extRing);
2166 plusTerm(v, 1, 1, 0, cf->extRing); // b^2 + 7b + 1
2167 number w = n_Mult((number)v, (number)v, cf); // (b^2 + 7b + 1)^2
2168 number y = n_Mult((number)v, (number)w, cf); // (b^2 + 7b + 1)^3
2169 p_Delete(&v, cf->extRing);
2170 v = NULL; plusTerm(v, 2, 1, 2, cf->extRing);
2171 plusTerm(v, -61, 1, 1, cf->extRing); // 2b^2 - 61b
2172 number z = n_Mult((number)w,
2173 (number)v, cf); // (b^2 + 7b + 1)^2 * (2b^2 - 61b)
2174 p_Delete(&v, cf->extRing);
2175
2176 clog << "z = "; p_Write((poly)z, cf->extRing);
2177 clog << "y = "; p_Write((poly)y, cf->extRing);
2178 number theGcd = n_Gcd(z, y, cf); // should yield w = (b^2 + 7b + 1)^2
2179 clog << "gcd(z, y) = "; p_Write((poly)theGcd, cf->extRing);
2180
2181 v = (poly)n_Sub(theGcd, w, cf);
2182// TS_ASSERT( v == NULL );
2183 p_Delete(&v, cf->extRing);
2184
2185 clog << endl
2186 << "Now let's check an ext_gcd computation in Q[b]..."
2187 << endl;
2188
2189 poly zFactor; poly yFactor;
2190 poly ppp = p_ExtGcd((poly)z, zFactor, (poly)y, yFactor, cf->extRing);
2191 v = (poly)n_Sub(theGcd, (number)ppp, cf);
2192// TS_ASSERT( v == NULL );
2193 p_Delete(&v, cf->extRing);
2194 clog << "z = "; p_Write((poly)z, cf->extRing);
2195 clog << "zFactor = "; p_Write(zFactor, cf->extRing);
2196 clog << "y = "; p_Write((poly)y, cf->extRing);
2197 clog << "yFactor = "; p_Write((poly)yFactor, cf->extRing);
2198 number v1 = n_Mult(z, (number)zFactor, cf);
2199 number v2 = n_Mult(y, (number)yFactor, cf);
2200 number v3 = n_Add(v1, v2, cf);
2201 clog << "z * zFactor + y * yFactor = "; p_Write((poly)v3, cf->extRing);
2202 clog << "gcd(z, y) = "; p_Write(ppp, cf->extRing);
2203 number v4 = n_Sub(v3, w, cf);
2204 TS_ASSERT( v4 == NULL );
2205
2206 p_Delete(&ppp, cf->extRing); p_Delete(&zFactor, cf->extRing);
2207 p_Delete(&yFactor, cf->extRing);
2208 n_Delete(&z, cf); n_Delete(&y, cf); n_Delete(&w, cf);
2209 n_Delete(&theGcd, cf); p_Delete(&v, cf->extRing); n_Delete(&v1, cf);
2210 n_Delete(&v2, cf); n_Delete(&v3, cf); n_Delete(&v4, cf);
2211
2212 rDelete(s); // kills 'cf' and 'r' as well
2213 }
poly p_ExtGcd(poly p, poly &pFactor, poly q, poly &qFactor, ring r)
assumes that p and q are univariate polynomials in r, mentioning the same variable; assumes a global ...
Definition: algext.cc:216
static FORCE_INLINE number n_Add(number a, number b, const coeffs r)
return the sum of 'a' and 'b', i.e., a+b
Definition: coeffs.h:647
static FORCE_INLINE number n_Gcd(number a, number b, const coeffs r)
in Z: return the gcd of 'a' and 'b' in Z/nZ, Z/2^kZ: computed as in the case Z in Z/pZ,...
Definition: coeffs.h:661
static FORCE_INLINE number n_Sub(number a, number b, const coeffs r)
return the difference of 'a' and 'b', i.e., a-b
Definition: coeffs.h:652
const CanonicalForm int const CFList const Variable & y
Definition: facAbsFact.cc:53
const CanonicalForm & w
Definition: facAbsFact.cc:51
const Variable & v
< [in] a sqrfree bivariate poly
Definition: facBivar.h:39

◆ test_Q_Ext_Performance()

void PolysTestSuite::test_Q_Ext_Performance ( )
inline

Definition at line 2405 of file polys_test.h.

2406 {
2407 clog << "Start by creating Q[q]..." << endl;
2408
2409 char* n[] = {(char*)"q"};
2410 ring r = rDefault( 0, 1, n); // Q[q]
2411 r->order[0] = ringorder_dp;
2413
2414 PrintRing(r);
2415
2417 TS_ASSERT( rField_is_Q(r) );
2418
2419 TS_ASSERT( !rField_is_Zp(r) );
2420 TS_ASSERT( !rField_is_Zp(r, 17) );
2421
2422 TS_ASSERT_EQUALS( rVar(r), 1);
2423
2425 TS_ASSERT(type == n_transExt);
2426
2427 TransExtInfo extParam;
2428 extParam.r = r;
2429
2430 clog << "Next create the rational function field Q(q)..." << endl;
2431
2432 const coeffs cf = nInitChar(type, &extParam); // Q(q)
2433
2434 if( cf == NULL )
2435 TS_FAIL("Could not get needed coeff. domain");
2436
2437 TS_ASSERT_DIFFERS( cf->cfCoeffWrite, NULLp );
2438
2439 if( cf->cfCoeffWrite != NULL )
2440 {
2441 clog << "Coeff-domain: " << endl;
2443 }
2444
2447
2448 // some tests for the coefficient field represented by cf:
2449 TestArithCf(cf);
2450 TestSumCf(cf, 10);
2451 TestSumCf(cf, 100);
2452 TestSumCf(cf, 101);
2453 TestSumCf(cf, 1001);
2454 TestSumCf(cf, 9000);
2455
2456 clog << "Finally create the polynomial ring Q(q)[t]..."
2457 << endl;
2458
2459 char* m[] = {(char*)"t"};
2460 ring s = rDefault(cf, 1, m); // Q(q)[t]
2461 s->order[0] = ringorder_dp;
2463
2464 PrintRing(s);
2465
2467 TS_ASSERT( !rField_is_Q(s) );
2469 TS_ASSERT( !rField_is_Zp(s, 11) );
2470 TS_ASSERT( !rField_is_Zp(s, 17) );
2472 TS_ASSERT( (s->cf->extRing!=NULL) );
2473 TS_ASSERT( !rField_is_GF(s, 25) );
2474 TS_ASSERT_EQUALS(rVar(s), 1);
2475
2476 Test(s);
2477
2478 /* a special performance test: */
2479 poly entry = NULL;
2480 for (int ti = 0; ti <= 20; ti++)
2481 {
2482 for (int qi = 0; qi <= 100; qi++)
2483 {
2484 int c = rand() % 1000000+1; /* c must not be 0 */
2485 poly qterm = p_ISet(c, r); p_SetExp(qterm, 1, qi, r);
2486 p_Setm(qterm, r);
2487 number qtermAsN = toFractionNumber(qterm, cf);
2488 poly tterm = p_ISet(1, s); p_SetExp(tterm, 1, ti, s);
2489 p_Setm(tterm, r); p_SetCoeff(tterm, qtermAsN, s);
2490 entry = p_Add_q(entry, tterm, s);
2491 }
2492 }
2493 p_Write(entry, s);
2494 poly qfactor = p_ISet(1, r); p_SetExp(qfactor, 1, 66, r);
2495 p_Setm(qfactor, r); /* q^66 */
2496 number qfactorAsN = toFractionNumber(qfactor, cf);
2497 number uuu = n_Invers(qfactorAsN, cf); /* 1 / q^66 */
2498 poly factor = p_ISet(1, s); p_SetCoeff(factor, uuu, s); /* 1 / q^66 */
2499 p_Write(factor, s);
2500 clog << "starting multiplication..." << endl;
2501 poly theProduct = p_Mult_q(entry, factor, s);
2502 p_Write(theProduct, s);
2503 clog << "...ending multiplication" << endl;
2504 n_Delete(&qfactorAsN, cf); p_Delete(&theProduct, s);
2505
2506 /* a very special performance test: */
2507 specialPoly(entry, s);
2508 p_Write(entry, s);
2509 qfactor = p_ISet(1, r); p_SetExp(qfactor, 1, 66, r);
2510 p_Setm(qfactor, r); /* q^66 */
2511 qfactorAsN = toFractionNumber(qfactor, cf);
2512 uuu = n_Invers(qfactorAsN, cf); /* 1 / q^66 */
2513 factor = p_ISet(1, s); p_SetCoeff(factor, uuu, s); /* 1 / q^66 */
2514 p_Write(factor, s);
2515 clog << "starting very special multiplication..." << endl;
2516 /* The following multiplication + output of the product is very slow
2517 in the svn/trunk SINGULAR version; see trac ticket #308.
2518 Here, in the Spielwiese, the result is instantaneous. */
2519 theProduct = p_Mult_q(entry, factor, s);
2520 p_Write(theProduct, s);
2521 clog << "...ending very special multiplication" << endl;
2522 n_Delete(&qfactorAsN, cf); p_Delete(&theProduct, s);
2523
2524 rDelete(s); // kills 'cf' and 'r' as well
2525 }
void specialPoly(poly &p, const ring r)
Definition: polys_test.h:261
@ n_transExt
used for all transcendental extensions, i.e., the top-most extension in an extension tower is transce...
Definition: coeffs.h:38
CanonicalForm factor
Definition: facAbsFact.cc:97
@ ringorder_dp
Definition: ring.h:78
BOOLEAN ntInitChar(coeffs cf, void *infoStruct)
Initialize the coeffs object.
Definition: transext.cc:2636
struct for passing initialization parameters to naInitChar
Definition: transext.h:88

◆ test_Q_Ext_s_t()

void PolysTestSuite::test_Q_Ext_s_t ( )
inline

Definition at line 2294 of file polys_test.h.

2295 {
2296 clog << "Start by creating Q[s, t]..." << endl;
2297
2298 char* n[] = {(char*)"s", (char*)"t"};
2299 ring r = rDefault( 0, 2, n); // Q[s, t]
2301
2302 PrintRing(r);
2303
2305 TS_ASSERT( rField_is_Q(r) );
2306
2307 TS_ASSERT( !rField_is_Zp(r) );
2308 TS_ASSERT( !rField_is_Zp(r, 17) );
2309
2310 TS_ASSERT_EQUALS( rVar(r), 2);
2311
2313 TS_ASSERT(type == n_transExt);
2314
2315 TransExtInfo extParam;
2316 extParam.r = r;
2317
2318 clog << "Next create the rational function field Q(s, t)..." << endl;
2319
2320 const coeffs cf = nInitChar(type, &extParam); // Q(s, t)
2321
2322 if( cf == NULL )
2323 TS_FAIL("Could not get needed coeff. domain");
2324
2325 TS_ASSERT_DIFFERS( cf->cfCoeffWrite, NULLp );
2326
2327 if( cf->cfCoeffWrite != NULL )
2328 {
2329 clog << "Coeff-domain: " << endl;
2331 }
2332
2335
2336 // some tests for the coefficient field represented by cf:
2337 TestArithCf(cf);
2338 TestSumCf(cf, 10);
2339 TestSumCf(cf, 100);
2340 TestSumCf(cf, 101);
2341 TestSumCf(cf, 1001);
2342 TestSumCf(cf, 9000);
2343
2344 clog << "Finally create the polynomial ring Q(s, t)[x, y, z]..."
2345 << endl;
2346
2347 char* m[] = {(char*)"x", (char*)"y", (char*)"z"};
2348 ring s = rDefault(cf, 3, m); // Q(s, t)[x, y, z]
2350
2351 PrintRing(s);
2352
2354 TS_ASSERT( !rField_is_Q(s) );
2356 TS_ASSERT( !rField_is_Zp(s, 11) );
2357 TS_ASSERT( !rField_is_Zp(s, 17) );
2359 TS_ASSERT( (s->cf->extRing!=NULL) );
2360 TS_ASSERT( !rField_is_GF(s, 25) );
2361 TS_ASSERT_EQUALS(rVar(s), 3);
2362
2363 Test(s);
2364
2365 /* some special tests: */
2366 poly v1 = NULL;
2367 plusTerm(v1, 1, 1, 1, cf->extRing); // s
2368 plusTerm(v1, 1, 1, 0, cf->extRing); // s + 1
2369 poly v2 = NULL;
2370 plusTerm(v2, 1, 1, 1, cf->extRing); // s
2371 plusTerm(v2, 2, 2, 1, cf->extRing); // s + 2t
2372 poly v = p_Mult_q(v1, v2, cf->extRing); // (s + 1) * (s + 2t)
2373 number v_n = toFractionNumber(v, cf);
2374 PrintSized(v_n, cf);
2375 poly w1 = NULL;
2376 plusTerm(w1, 1, 1, 1, cf->extRing); // s
2377 plusTerm(w1, 1, 1, 0, cf->extRing); // s + 1
2378 poly w2 = NULL;
2379 plusTerm(w2, 3, 1, 1, cf->extRing); // 3s
2380 plusTerm(w2, -7, 2, 1, cf->extRing); // 3s - 7t
2381 poly w = p_Mult_q(w1, w2, cf->extRing); // (s + 1) * (3s - 7t)
2382 number w_n = toFractionNumber(w, cf);
2383 PrintSized(w_n, cf);
2384 number vOverW_n = n_Div(v_n, w_n, cf);
2385 PrintSized(vOverW_n, cf);
2386 number wOverV_n = n_Invers(vOverW_n, cf);
2387 PrintSized(wOverV_n, cf);
2388 number prod = n_Mult(vOverW_n, wOverV_n, cf);
2389 PrintSized(prod, cf);
2390 number tmp; number nn = n_Copy(vOverW_n, cf);
2391 for (int i = 1; i <= 6; i++)
2392 {
2393 tmp = n_Div(nn, v_n, cf);
2394 n_Delete(&nn, cf);
2395 nn = tmp;
2396 clog << i << ". "; PrintSized(nn, cf);
2397 }
2398
2399 n_Delete(&prod, cf); n_Delete(&nn, cf);
2400 n_Delete(&v_n, cf); n_Delete(&w_n, cf);
2401 n_Delete(&vOverW_n, cf); n_Delete(&wOverV_n, cf);
2402
2403 rDelete(s); // kills 'cf' and 'r' as well
2404 }
static FORCE_INLINE number n_Copy(number n, const coeffs r)
return a copy of 'n'
Definition: coeffs.h:448
fq_nmod_poly_t prod
Definition: facHensel.cc:100

◆ test_Q_Ext_s_t_NestedFractions()

void PolysTestSuite::test_Q_Ext_s_t_NestedFractions ( )
inline

Definition at line 2526 of file polys_test.h.

2527 {
2528 clog << "Start by creating Q[s, t]..." << endl;
2529
2530 char* n[] = {(char*)"s", (char*)"t"};
2531 ring r = rDefault( 0, 2, n); // Q[s, t]
2533
2534 PrintRing(r);
2535
2537 TS_ASSERT( rField_is_Q(r) );
2538
2539 TS_ASSERT( !rField_is_Zp(r) );
2540 TS_ASSERT( !rField_is_Zp(r, 17) );
2541
2542 TS_ASSERT_EQUALS( rVar(r), 2);
2543
2545 TS_ASSERT(type == n_transExt);
2546
2547 TransExtInfo extParam;
2548 extParam.r = r;
2549
2550 clog << "Next create the rational function field Q(s, t)..." << endl;
2551
2552 const coeffs cf = nInitChar(type, &extParam); // Q(s, t)
2553
2554 if( cf == NULL )
2555 TS_FAIL("Could not get needed coeff. domain");
2556
2557 TS_ASSERT_DIFFERS( cf->cfCoeffWrite, NULLp );
2558
2559 if( cf->cfCoeffWrite != NULL )
2560 {
2561 clog << "Coeff-domain: " << endl;
2563 }
2564
2567
2568 clog << "Finally create the polynomial ring Q(s, t)[x, y, z]..."
2569 << endl;
2570
2571 char* m[] = {(char*)"x", (char*)"y", (char*)"z"};
2572 ring s = rDefault(cf, 3, m); // Q(s, t)[x, y, z]
2574
2575 PrintRing(s);
2576
2578 TS_ASSERT( !rField_is_Q(s) );
2580 TS_ASSERT( !rField_is_Zp(s, 11) );
2581 TS_ASSERT( !rField_is_Zp(s, 17) );
2583 TS_ASSERT( (s->cf->extRing!=NULL) );
2584 TS_ASSERT( !rField_is_GF(s, 25) );
2585 TS_ASSERT_EQUALS(rVar(s), 3);
2586
2587 /* test 1 for nested fractions, i.e. fractional coefficients: */
2588 poly v1 = NULL;
2589 plusTermOverQ(v1, 21, 2, 1, 1, cf->extRing); // 21/2*s
2590 plusTermOverQ(v1, 14, 3, 1, 0, cf->extRing); // 21/2*s + 14/3
2591 number v1_n = toFractionNumber(v1, cf);
2592 PrintSized(v1_n, cf);
2593 poly v2 = NULL;
2594 plusTermOverQ(v2, 7, 5, 1, 1, cf->extRing); // 7/5*s
2595 plusTermOverQ(v2, -49, 6, 2, 1, cf->extRing); // 7/5*s - 49/6*t
2596 number v2_n = toFractionNumber(v2, cf);
2597 PrintSized(v2_n, cf);
2598 number v3_n = n_Div(v1_n, v2_n, cf); // (45*s + 20) / (6s - 35*t)
2599 PrintSized(v3_n, cf);
2600 n_Delete(&v1_n, cf); n_Delete(&v2_n, cf); n_Delete(&v3_n, cf);
2601
2602 /* test 2 for nested fractions, i.e. fractional coefficients: */
2603 v1 = NULL;
2604 plusTermOverQ(v1, 1, 2, 1, 1, cf->extRing); // 1/2*s
2605 plusTermOverQ(v1, 1, 1, 1, 0, cf->extRing); // 1/2*s + 1
2606 v2 = NULL;
2607 plusTermOverQ(v2, 1, 1, 1, 1, cf->extRing); // s
2608 plusTermOverQ(v2, 2, 3, 2, 1, cf->extRing); // s + 2/3*t
2609 poly v3 = p_Mult_q(v1, v2, cf->extRing); // (1/2*s + 1) * (s + 2/3*t)
2610 number v_n = toFractionNumber(v3, cf);
2611 PrintSized(v_n, cf);
2612 poly w1 = NULL;
2613 plusTermOverQ(w1, 1, 2, 1, 1, cf->extRing); // 1/2*s
2614 plusTermOverQ(w1, 1, 1, 1, 0, cf->extRing); // 1/2*s + 1
2615 poly w2 = NULL;
2616 plusTermOverQ(w2, -7, 5, 1, 0, cf->extRing); // -7/5
2617 poly w3 = p_Mult_q(w1, w2, cf->extRing); // (1/2*s + 1) * (-7/5)
2618 number w_n = toFractionNumber(w3, cf);
2619 PrintSized(w_n, cf);
2620 number z_n = n_Div(v_n, w_n, cf); // -5/7*s - 10/21*t
2621 PrintSized(z_n, cf);
2622 n_Delete(&v_n, cf); n_Delete(&w_n, cf); n_Delete(&z_n, cf);
2623
2624 rDelete(s); // kills 'cf' and 'r' as well
2625 }
void plusTermOverQ(poly &p, int c1, int c2, int i, int exp, const ring r)
Definition: polys_test.h:223

◆ test_QQ_t() [1/2]

void PolysTestSuite::test_QQ_t ( )
inline

Definition at line 1856 of file polys_test.h.

1857 {
1858 clog << "Creating Q[s]: " << endl;
1859
1860 char* n[] = {(char*)"s"};
1861 ring r = rDefault( 0, 1, n);
1863
1864 PrintRing(r);
1865
1867 TS_ASSERT( rField_is_Q(r) );
1868
1869 TS_ASSERT( !rField_is_Zp(r) );
1870 TS_ASSERT( !rField_is_Zp(r, 11) );
1871
1872 TS_ASSERT_EQUALS( rVar(r), 1);
1873
1874 Test(r);
1875
1876 rDelete(r);
1877 }

◆ test_QQ_t() [2/2]

void PolysTestSuite::test_QQ_t ( )
inline

Definition at line 87 of file rings_test.h.

88 {
89 clog << "Creating Q[s]: " << endl;
90
91 char* n[] = {(char*)"s"};
92 ring r = rDefault( 0, 1, n);
94
95 PrintRing(r);
96
99
100 TS_ASSERT( !rField_is_Zp(r) );
101 TS_ASSERT( !rField_is_Zp(r, 11) );
102
103 TS_ASSERT_EQUALS( rVar(r), 1);
104
105 Test(r);
106
107 rDelete(r);
108 }

◆ test_QQ_x_y_z() [1/2]

void PolysTestSuite::test_QQ_x_y_z ( )
inline

Definition at line 1902 of file polys_test.h.

1903 {
1904 clog << "Creating QQ[x, y, z, u]: " << endl;
1905
1906 char* n[] = {(char*)"x", (char*)"y", (char*)"z", (char*)"u"};
1907 ring r = rDefault( 0, 4, n);
1909
1910 PrintRing(r);
1911
1913 TS_ASSERT( rField_is_Q(r) );
1914
1915 TS_ASSERT( !rField_is_Zp(r) );
1916 TS_ASSERT( !rField_is_Zp(r, 11) );
1917
1918 TS_ASSERT_EQUALS( rVar(r), 4);
1919
1920 Test(r);
1921
1922 rDelete(r);
1923 }

◆ test_QQ_x_y_z() [2/2]

void PolysTestSuite::test_QQ_x_y_z ( )
inline

Definition at line 134 of file rings_test.h.

135 {
136 clog << "Creating QQ[x, y, z, u]: " << endl;
137
138 char* n[] = {(char*)"x", (char*)"y", (char*)"z", (char*)"u"};
139 ring r = rDefault( 0, 4, n);
141
142 PrintRing(r);
143
146
147 TS_ASSERT( !rField_is_Zp(r) );
148 TS_ASSERT( !rField_is_Zp(r, 11) );
149
150 TS_ASSERT_EQUALS( rVar(r), 4);
151
152 Test(r);
153
154 rDelete(r);
155 }

◆ test_QQ_x_y_z_ord_2_lp()

void PolysTestSuite::test_QQ_x_y_z_ord_2_lp ( )
inline

Definition at line 201 of file rings_test.h.

202 {
203 clog << "Creating QQ[x, y, z, u]: " << endl;
204
205 const int N = 4;
206 char* n[N] = {(char*)"x", (char*)"y", (char*)"z", (char*)"u"};
207
208
209 const int D = 2;
210 /*order: lp,0*/
211 rRingOrder_t *order = (rRingOrder_t *) omAlloc0(D* sizeof(rRingOrder_t));
212 int *block0 = (int *)omAlloc0(D * sizeof(int));
213 int *block1 = (int *)omAlloc0(D * sizeof(int));
214 /* ringorder dp for the first block: var 1..N */
215 order[0] = ringorder_dp;
216 block0[0] = 1;
217 block1[0] = N;
218 /* the last block: everything is 0 */
219// order[1] = 0;
220
221 ring r = rDefault(0, N, n, D, order, block0, block1);
223
224 PrintRing(r);
225
228
229 TS_ASSERT( !rField_is_Zp(r) );
230 TS_ASSERT( !rField_is_Zp(r, 11) );
231
232 TS_ASSERT_EQUALS( rVar(r), N);
233
234 Test(r);
235
236 rDelete(r);
237 }
const CanonicalForm CFMap CFMap & N
Definition: cfEzgcd.cc:56
#define D(A)
Definition: gentable.cc:131
#define omAlloc0(size)
Definition: omAllocDecl.h:211
rRingOrder_t
order stuff
Definition: ring.h:68

◆ test_Z11_x_y_z() [1/2]

void PolysTestSuite::test_Z11_x_y_z ( )
inline

Definition at line 1879 of file polys_test.h.

1880 {
1881 clog << "Creating Z/11[x, y, z]: " << endl;
1882
1883 char* n[] = {(char*)"x", (char*)"y", (char*)"z"};
1884 ring r = rDefault( 11, 3, n);
1886
1887 PrintRing(r);
1888
1890 TS_ASSERT( !rField_is_Q(r) );
1891
1892 TS_ASSERT( rField_is_Zp(r) );
1893 TS_ASSERT( rField_is_Zp(r, 11) );
1894 TS_ASSERT( !rField_is_Zp(r, 13) );
1895
1896 TS_ASSERT_EQUALS( rVar(r), 3);
1897
1898 Test(r);
1899
1900 rDelete(r);
1901 }

◆ test_Z11_x_y_z() [2/2]

void PolysTestSuite::test_Z11_x_y_z ( )
inline

Definition at line 110 of file rings_test.h.

111 {
112 clog << "Creating Z/11[x, y, z]: " << endl;
113
114 char* n[] = {(char*)"x", (char*)"y", (char*)"z"};
115 ring r = rDefault( 11, 3, n);
117
118 PrintRing(r);
119
121 TS_ASSERT( !rField_is_Q(r) );
122
124 TS_ASSERT( rField_is_Zp(r, 11) );
125 TS_ASSERT( !rField_is_Zp(r, 13) );
126
127 TS_ASSERT_EQUALS( rVar(r), 3);
128
129 Test(r);
130
131 rDelete(r);
132 }

◆ test_Z13_t() [1/2]

void PolysTestSuite::test_Z13_t ( )
inline

Definition at line 1832 of file polys_test.h.

1833 {
1834 clog << "Creating Z/13[t]: " << endl;
1835
1836 char* n[] = {(char*)"t"};
1837 ring r = rDefault( 13, 1, n);
1839
1840 PrintRing(r);
1841
1843 TS_ASSERT( !rField_is_Q(r) );
1844
1845 TS_ASSERT( rField_is_Zp(r) );
1846 TS_ASSERT( !rField_is_Zp(r, 11) );
1847 TS_ASSERT( rField_is_Zp(r, 13) );
1848
1849 TS_ASSERT_EQUALS( rVar(r), 1);
1850
1851 Test(r);
1852
1853 rDelete(r);
1854 }

◆ test_Z13_t() [2/2]

void PolysTestSuite::test_Z13_t ( )
inline

Definition at line 63 of file rings_test.h.

64 {
65 clog << "Creating Z/13[t]: " << endl;
66
67 char* n[] = { (char*)"t"};
68 ring r = rDefault( 13, 1, n);
70
71 PrintRing(r);
72
75
77 TS_ASSERT( !rField_is_Zp(r, 11) );
78 TS_ASSERT( rField_is_Zp(r, 13) );
79
80 TS_ASSERT_EQUALS( rVar(r), 1);
81
82 Test(r);
83
84 rDelete(r);
85 }

◆ test_Z13_t_GF() [1/2]

void PolysTestSuite::test_Z13_t_GF ( )
inline

Definition at line 1926 of file polys_test.h.

1927 {
1928 clog << "Creating GF[t]: " << endl;
1929
1930 char* n[] = {(char*)"t"};
1931
1932 GFInfo param;
1933
1934 param.GFChar= 5;
1935 param.GFDegree= 2;
1936 param.GFPar_name= (const char*)"Q";
1937
1938 const coeffs cf = nInitChar( n_GF, &param );
1939
1940 if( cf == NULL )
1941 TS_FAIL("Could not get needed coeff. domain");
1942
1944
1945 ring r = rDefault( cf, 1, n); // now cf belongs to r!
1947
1948 PrintRing(r);
1949
1951 TS_ASSERT( !rField_is_Q(r) );
1952
1953 TS_ASSERT( !rField_is_Zp(r) );
1954 TS_ASSERT( !rField_is_Zp(r, 11) );
1955 TS_ASSERT( !rField_is_Zp(r, 13) );
1956 TS_ASSERT( rField_is_GF(r) );
1957
1958 TS_ASSERT( rField_is_GF(r, 5) );
1959 TS_ASSERT( !rField_is_GF(r, 25) );
1960
1961 TS_ASSERT_EQUALS( rVar(r), 1);
1962
1963 Test(r);
1964
1965 rDelete(r); // kills 'cf' as well!
1966 }
int GFDegree
Definition: coeffs.h:95
@ n_GF
\GF{p^n < 2^16}
Definition: coeffs.h:32
const char * GFPar_name
Definition: coeffs.h:96
int GFChar
Definition: coeffs.h:94
Creation data needed for finite fields.
Definition: coeffs.h:93

◆ test_Z13_t_GF() [2/2]

void PolysTestSuite::test_Z13_t_GF ( )
inline

Definition at line 158 of file rings_test.h.

159 {
160 clog << "Creating GF[t]: " << endl;
161
162 char* n[] = {(char*)"t"};
163
164 GFInfo param;
165
166 param.GFChar= 5;
167 param.GFDegree= 2;
168 param.GFPar_name= (const char*)"Q";
169
170 const coeffs cf = nInitChar( n_GF, &param );
171
173
174 ring r = rDefault( cf, 1, n); // now cf belongs to r!
176
177 PrintRing(r);
178
180 TS_ASSERT( !rField_is_Q(r) );
181
182 TS_ASSERT( !rField_is_Zp(r) );
183 TS_ASSERT( !rField_is_Zp(r, 11) );
184 TS_ASSERT( !rField_is_Zp(r, 13) );
186
187 TS_ASSERT( rField_is_GF(r, 5) );
188 TS_ASSERT( !rField_is_GF(r, 25) );
189
190 TS_ASSERT_EQUALS( rVar(r), 1);
191
192 Test(r);
193
194 rDelete(r); // kills 'cf' as well!
195 }

◆ test_Z_17_Ext_a()

void PolysTestSuite::test_Z_17_Ext_a ( )
inline

Definition at line 2214 of file polys_test.h.

2215 {
2216 clog << "Start by creating Z_17[a]..." << endl;
2217
2218 char* n[] = {(char*)"a"};
2219 ring r = rDefault( 17, 1, n); // Z/17Z[a]
2221
2222 PrintRing(r);
2223
2225 TS_ASSERT( !rField_is_Q(r) );
2226
2227 TS_ASSERT( rField_is_Zp(r) );
2228 TS_ASSERT( rField_is_Zp(r, 17) );
2229
2230 TS_ASSERT_EQUALS( rVar(r), 1);
2231
2232 poly minPoly = p_ISet(1, r); // minPoly = 1
2233 p_SetExp(minPoly, 1, 2, r); p_Setm(minPoly, r); // minPoly = a^2
2234 minPoly = p_Add_q(minPoly, p_ISet(3, r), r); // minPoly = a^2 + 3
2235 ideal minIdeal = idInit(1); // minIdeal = < 0 >
2236 minIdeal->m[0] = minPoly; // minIdeal = < a^2 + 3 >
2237
2239 TS_ASSERT(type == n_algExt);
2240
2241 r->qideal = minIdeal;
2242 AlgExtInfo extParam;
2243 extParam.r = r;
2244
2245 clog << "Next create the extension field Z_17[a]/<a^2+3>..." << endl;
2246
2247 const coeffs cf = nInitChar(type, &extParam); // Z_17[a]/<a^2+3>
2248
2249 if( cf == NULL )
2250 TS_FAIL("Could not get needed coeff. domain");
2251
2252 TS_ASSERT_DIFFERS( cf->cfCoeffWrite, NULLp );
2253
2254 if( cf->cfCoeffWrite != NULL )
2255 {
2256 clog << "Coeff-domain: " << endl;
2258 }
2259
2262
2263 // some tests for the coefficient field represented by cf:
2264 TestArithCf(cf);
2265 TestSumCf(cf, 10);
2266 TestSumCf(cf, 100);
2267 TestSumCf(cf, 101);
2268 TestSumCf(cf, 1001);
2269 TestSumCf(cf, 9000);
2270
2271 clog << "Finally create the polynomial ring (Z_17[a]/<a^2+3>)[u, v, w]..."
2272 << endl;
2273
2274 char* m[] = {(char*)"u", (char*)"v", (char*)"w"};
2275 ring s = rDefault(cf, 3, m); // (Z_17[a]/<a^2+3>)[u, v, w]
2277
2278 PrintRing(s);
2279
2281 TS_ASSERT( !rField_is_Q(s) );
2283 TS_ASSERT( !rField_is_Zp(s, 11) );
2284 TS_ASSERT( !rField_is_Zp(s, 17) );
2286 TS_ASSERT( (s->cf->extRing!=NULL) );
2287 TS_ASSERT( !rField_is_GF(s, 25) );
2288 TS_ASSERT_EQUALS(rVar(s), 3);
2289
2290 Test(s);
2291
2292 rDelete(s); // kills 'cf' and 'r' as well
2293 }

◆ TestArithCf()

void PolysTestSuite::TestArithCf ( const coeffs  r)
inlineprivate

Definition at line 1663 of file polys_test.h.

1664 {
1665 clog << ("TEST: Simple Arithmetics: ");
1666 clog << endl;
1667
1668 number two = n_Init(2, r);
1669
1670 number t = n_Init(1, r);
1671 n_InpAdd(t, t, r);
1672 TS_ASSERT( n_Equal(two, t, r) );
1673 n_Delete(&t, r);
1674
1675 if( getCoeffType(r) == n_Q )
1676 {
1677 number t = n_Init(1, r);
1678 n_InpAdd(t, t, r);
1679 TS_ASSERT( n_Equal(two, t, r) );
1680 n_Delete(&t, r);
1681 }
1682
1683 const int N = 66666;
1684
1685 number a = n_Init(N, r);
1686
1687 clog<< "a: "; PrintSized(a, r);
1688
1689 clog<< "two: "; PrintSized(two, r);
1690
1691 number aa0 = n_Init(N*2, r);
1692
1693 number aa = n_Add(a, a, r);
1694
1695 clog<< "aa = a + a: "; PrintSized(aa, r);
1696
1697 number aa2 = n_Mult(a, two, r);
1698
1699 clog<< "aa2 = a * 2: "; PrintSized(aa2, r);
1700
1701 number aa1 = n_Mult(two, a, r);
1702
1703 clog<< "aa1 = 2 * a: "; PrintSized(aa1, r);
1704
1705 n_Delete(&a, r);
1706 n_Delete(&two, r);
1707
1708 a = n_Sub( aa, aa1, r );
1709
1710 clog<< "a = aa - aa1: "; PrintSized(a, r);
1711
1712 TS_ASSERT( n_IsZero(a, r) );
1713
1714 n_Delete(&a, r);
1715
1716 a = n_Sub( aa, aa2, r );
1717
1718 clog<< "a = aa - aa2: "; PrintSized(a, r);
1719
1720 TS_ASSERT( n_IsZero(a, r) );
1721
1722 n_Delete(&a, r);
1723
1724 a = n_Sub( aa1, aa2, r );
1725
1726 clog<< "a = aa1 - aa2: "; PrintSized(a, r);
1727
1728 TS_ASSERT( n_IsZero(a, r) );
1729
1730 n_Delete(&a, r);
1731
1732 TS_ASSERT( n_Equal(aa, aa1, r) );
1733 TS_ASSERT( n_Equal(aa, aa2, r) );
1734 TS_ASSERT( n_Equal(aa1, aa2, r) );
1735
1736 TS_ASSERT( n_Equal(aa0, aa, r) );
1737 TS_ASSERT( n_Equal(aa0, aa1, r) );
1738 TS_ASSERT( n_Equal(aa0, aa2, r) );
1739
1740 n_Delete(&aa, r);
1741 n_Delete(&aa1, r);
1742 n_Delete(&aa2, r);
1743
1744 n_Delete(&aa0, r);
1745
1746 clog << ( " >>> TEST DONE!" );
1747 clog << endl;
1748 }
@ n_Q
rational (GMP) numbers
Definition: coeffs.h:30
static FORCE_INLINE BOOLEAN n_IsZero(number n, const coeffs r)
TRUE iff 'n' represents the zero element.
Definition: coeffs.h:461
static FORCE_INLINE n_coeffType getCoeffType(const coeffs r)
Returns the type of coeffs domain.
Definition: coeffs.h:422
static FORCE_INLINE BOOLEAN n_Equal(number a, number b, const coeffs r)
TRUE iff 'a' and 'b' represent the same number; they may have different representations.
Definition: coeffs.h:457
static FORCE_INLINE void n_InpAdd(number &a, number b, const coeffs r)
addition of 'a' and 'b'; replacement of 'a' by the sum a+b
Definition: coeffs.h:643

◆ TestSumCf()

void PolysTestSuite::TestSumCf ( const coeffs  r,
const unsigned long  N 
)
inlineprivate

Definition at line 1749 of file polys_test.h.

1750 {
1751 clog << ( _2S("TEST: sum[0..") + _2S(N) + "]: ");
1752 clog << endl;
1753
1754 assume( N > 0 ); // just for now...
1755
1756 const unsigned long ssss = (N * (N+1)) / 2;
1757
1758 number sum1 = n_Init(ssss, r);
1759 clog<< "N*(N+1)/2 (int: " << ssss << "): "; PrintSized(sum1, r);
1760
1761 number s, ss, i, res;
1762
1763 s = n_Init(N , r);
1764 i = n_Init(N+1, r);
1765 n_InpMult(s, i, r);
1766 n_Delete(&i, r);
1767
1768 clog<< "N*(N+1): ("<< N*(N+1) << ")"; PrintSized(s, r);
1769
1770 i = n_Init(2, r);
1771 clog<< "2: "; PrintSized(i, r);
1772
1773 if( !n_IsZero( i, r) )
1774 {
1775 #ifdef HAVE_RINGS
1776 TS_ASSERT( n_DivBy(s, i, r) );
1777 #endif
1778
1779 res = n_Div(s, i, r);
1780
1781 clog<< "N*(N+1)/2: "; PrintSized(res, r);
1782
1783
1784 number d = n_Sub(res, sum1, r);
1785 TS_ASSERT( n_IsZeroDivisor(d, r) );
1786 n_Delete(&d, r);
1787
1788 if( n_GetChar(r) == 0 )
1789 {
1790 TS_ASSERT( n_Equal(sum1, res, r) );
1791 TS_ASSERT( n_Equal(res, sum1, r) );
1792 }
1793 } else
1795
1796
1797 n_Delete(&s, r); n_Delete(&i, r);
1798
1799 n_Delete(&sum1, r); n_Delete(&res, r);
1800
1801
1802 s = n_Init(0 , r);
1803 ss = n_Init(0 , r);
1804 for( int k = N; k >= 0; k-- )
1805 {
1806 i = n_Init(k, r);
1807 n_InpAdd(s, i, r); // s += i
1808
1809 i = n_InpNeg(i, r);
1810 n_InpAdd(ss, i, r); // ss -= i
1811
1812 n_Delete(&i, r);
1813 }
1814 clog<< "ss: "; PrintSized(ss, r);
1815
1816 ss = n_InpNeg(ss, r); // ss = -ss
1817
1818 clog<< "real sum : "; PrintSized(s, r);
1819 clog<< "real sum(--): "; PrintSized(ss, r);
1820
1821 TS_ASSERT( n_Equal(s, ss, r) );
1822 TS_ASSERT( n_Equal(ss, s, r) );
1823
1824 n_Delete(&s, r);
1825 n_Delete(&ss, r);
1826
1827 clog << ( " >>> TEST DONE!" );
1828 clog << endl;
1829
1830 }
int k
Definition: cfEzgcd.cc:99
static FORCE_INLINE number n_InpNeg(number n, const coeffs r)
in-place negation of n MUST BE USED: n = n_InpNeg(n) (no copy is returned)
Definition: coeffs.h:554
static FORCE_INLINE int n_GetChar(const coeffs r)
Return the characteristic of the coeff. domain.
Definition: coeffs.h:441
static FORCE_INLINE BOOLEAN n_DivBy(number a, number b, const coeffs r)
test whether 'a' is divisible 'b'; for r encoding a field: TRUE iff 'b' does not represent zero in Z:...
Definition: coeffs.h:750
static FORCE_INLINE void n_InpMult(number &a, number b, const coeffs r)
multiplication of 'a' and 'b'; replacement of 'a' by the product a*b
Definition: coeffs.h:638
CanonicalForm res
Definition: facAbsFact.cc:60
#define assume(x)
Definition: mod2.h:389
BOOLEAN n_IsZeroDivisor(number a, const coeffs r)
Test whether a is a zero divisor in r i.e. not coprime with char. of r very inefficient implementatio...
Definition: numbers.cc:173

◆ toFractionNumber()

number PolysTestSuite::toFractionNumber ( poly  p,
const coeffs  cf 
)
inlineprivate

Definition at line 1655 of file polys_test.h.

1656 {
1657 number n = n_Init(1, cf);
1658 fraction f = (fraction)n;
1659 p_Delete(&(f->numerator), cf->extRing);
1660 f->numerator = p;
1661 return n;
1662 }
FILE * f
Definition: checklibs.c:9

The documentation for this class was generated from the following files: