Changeset ad0177 in git for factory/facFqBivar.cc
- Timestamp:
- Mar 6, 2012, 9:48:34 PM (12 years ago)
- Branches:
- (u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
- Children:
- 24c6177e872b135f0188fea998eb45a75e3fde6e
- Parents:
- 54af8a51cc8091a4687fb55bf401e31a0478bc1e
- git-author:
- Martin Lee <martinlee84@web.de>2012-03-06 21:48:34+01:00
- git-committer:
- Martin Lee <martinlee84@web.de>2012-04-04 14:42:27+02:00
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
factory/facFqBivar.cc
r54af8a5 rad0177 43 43 TIMING_DEFINE_PRINT(fac_hensel_lift12) 44 44 45 CanonicalForm prodMod0 (const CFList& L, const CanonicalForm& M )45 CanonicalForm prodMod0 (const CFList& L, const CanonicalForm& M, const modpk& b) 46 46 { 47 47 if (L.isEmpty()) … … 50 50 return mod (L.getFirst()(0, 1) , M); 51 51 else if (L.length() == 2) 52 return mod (mulNTL (L.getFirst()(0, 1),L.getLast()(0, 1) ), M);52 return mod (mulNTL (L.getFirst()(0, 1),L.getLast()(0, 1), b), M); 53 53 else 54 54 { … … 60 60 tmp1.append (i.getItem()); 61 61 tmp2= Difference (L, tmp1); 62 buf1= prodMod0 (tmp1, M );63 buf2= prodMod0 (tmp2, M );64 return mod (mulNTL (buf1,buf2 ), M);62 buf1= prodMod0 (tmp1, M, b); 63 buf2= prodMod0 (tmp2, M, b); 64 return mod (mulNTL (buf1,buf2, b), M); 65 65 } 66 66 } … … 487 487 bool recombination= false; 488 488 CanonicalForm test; 489 CanonicalForm buf0= buf (0, x)*LCBuf; 489 CanonicalForm buf0= mulNTL (buf (0, x), LCBuf, b); 490 bool isRat= (isOn (SW_RATIONAL) && getCharacteristic() == 0) || getCharacteristic() > 0; 490 491 while (T.length() >= 2*s && s <= thres) 491 492 { … … 521 522 else 522 523 { 523 test= prodMod0 (S, M); 524 test *= LCBuf; 525 test = mod (test, M); 526 if (b.getp() != 0) 527 test= b(test); 528 if (fdivides (test, buf0)) 524 test= prodMod0 (S, M, b); 525 test= mulNTL (test, LCBuf, b); 526 test= mod (test, M); 527 if (uniFdivides (test, buf0)) 529 528 { 530 529 S.insert (LCBuf); … … 534 533 g= b(g); 535 534 g /= content (g, x); 535 if (!isRat) 536 On (SW_RATIONAL); 536 537 if (fdivides (g, buf, quot)) 537 538 { … … 543 544 l -= degree (g); 544 545 M= power (y, l); 545 buf0= buf (0, x)*LCBuf; 546 if (!isRat) 547 Off (SW_RATIONAL); 548 buf0= mulNTL (buf (0, x), LCBuf, b); 546 549 // compute new possible degree pattern 547 550 bufDegs2= DegreePattern (T); … … 569 572 if (nosubset) break; 570 573 } 574 if (!isRat) 575 Off (SW_RATIONAL); 571 576 } 572 577 } … … 661 666 CanonicalForm buf1= mulNTL (buf (1,x), LCBuf, b); 662 667 CanonicalForm test0, test1; 668 bool isRat= (isOn (SW_RATIONAL) && getCharacteristic() == 0) || getCharacteristic() > 0; 663 669 for (CFListIterator i= factors; i.hasItem(); i++, l++) 664 670 { … … 677 683 g= b(g); 678 684 g /= content (g, x); 685 if (!isRat) 686 On (SW_RATIONAL); 679 687 if (fdivides (g, buf, quot)) 680 688 { … … 684 692 d -= degree (g); 685 693 LCBuf= LC (buf, x); 694 if (!isRat) 695 Off (SW_RATIONAL); 686 696 buf0= mulNTL (buf (0,x), LCBuf, b); 687 697 buf1= mulNTL (buf (1,x), LCBuf, b); … … 699 709 } 700 710 } 711 if (!isRat) 712 Off (SW_RATIONAL); 701 713 } 702 714 }
Note: See TracChangeset
for help on using the changeset viewer.