Changeset 6dfc39 in git for factory/facHensel.cc
- Timestamp:
- Nov 9, 2012, 7:27:54 PM (11 years ago)
- Branches:
- (u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', '0604212ebb110535022efecad887940825b97c3f')
- Children:
- b2c7a216311d3bac9e82e892f71b35269aa0886e
- Parents:
- 86faffa8f6328861e386b04ff4aa1238a2145d25
- git-author:
- Martin Lee <martinlee84@web.de>2012-11-09 19:27:54+01:00
- git-committer:
- Martin Lee <martinlee84@web.de>2012-11-16 13:19:32+01:00
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
factory/facHensel.cc
r86faff r6dfc39 535 535 Variable beta; 536 536 Off (SW_RATIONAL); 537 if (mipoHasDen) 538 { 539 setReduce (alpha, false); 540 modMipo= modMipo.mapinto(); 541 modMipo /= lc (modMipo); 542 beta= rootOf (modMipo); 543 setReduce (alpha, true); 544 } 537 setReduce (alpha, false); 538 modMipo= modMipo.mapinto(); 539 modMipo /= lc (modMipo); 540 beta= rootOf (modMipo); 541 setReduce (alpha, true); 545 542 546 543 setReduce (alpha, false); 547 544 for (k= 0; k < factors.length(); k++) 548 545 { 549 if (!mipoHasDen) 550 bufFactors [k]= bufFactors[k].mapinto(); 551 else 552 { 553 bufFactors [k]= bufFactors[k].mapinto(); 554 bufFactors [k]= replacevar (bufFactors[k], alpha, beta); 555 } 546 bufFactors [k]= bufFactors[k].mapinto(); 547 bufFactors [k]= replacevar (bufFactors[k], alpha, beta); 556 548 } 557 549 setReduce (alpha, true); … … 596 588 recResult= mapinto (recResult); 597 589 setReduce (alpha, true); 598 if (mipoHasDen) 599 { 600 for (CFListIterator i= recResult; i.hasItem(); i++) 601 i.getItem()= replacevar (i.getItem(), alpha, beta); 602 } 590 591 for (CFListIterator i= recResult; i.hasItem(); i++) 592 i.getItem()= replacevar (i.getItem(), alpha, beta); 603 593 604 594 setCharacteristic (0); … … 621 611 if (mipoHasDen) 622 612 coeffE= replacevar (coeffE, gamma, beta); 613 else 614 coeffE= replacevar (coeffE, alpha, beta); 623 615 setCharacteristic (0); 624 616 if (!coeffE.isZero()) … … 631 623 { 632 624 setCharacteristic (p); 633 setReduce (alpha, false);634 625 g= mulNTL (coeffE, j.getItem()); 635 626 g= modNTL (g, bufFactors[ii]); 636 setReduce (alpha, true);637 627 setCharacteristic (0); 638 628 if (mipoHasDen) … … 641 631 k.getItem() += replacevar (g.mapinto()*modulus, beta, gamma); 642 632 e -= mulNTL (replacevar (g.mapinto(), beta, gamma)*modulus, 643 633 l.getItem(), b); 644 634 setReduce (beta, true); 645 635 } 646 636 else 647 637 { 648 k.getItem() += g.mapinto()*modulus; 649 e -= mulNTL (g.mapinto()*modulus, l.getItem(), b); 638 k.getItem() += replacevar (g.mapinto()*modulus, beta, alpha); 639 e -= mulNTL (replacevar (g.mapinto()*modulus, beta, alpha), 640 l.getItem(), b); 650 641 } 651 642 e= b(e);
Note: See TracChangeset
for help on using the changeset viewer.