Changeset 14e634 in git for factory/facBivar.cc


Ignore:
Timestamp:
Dec 10, 2012, 3:38:49 PM (11 years ago)
Author:
Martin Lee <martinlee84@…>
Branches:
(u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
Children:
b15cf8578937df382dad415dbfdd2229103409bf
Parents:
3e7db4d961b4509d248e12d8e96e2bed08d9cfe8
git-author:
Martin Lee <martinlee84@web.de>2012-12-10 15:38:49+01:00
git-committer:
Martin Lee <martinlee84@web.de>2012-12-12 15:24:58+01:00
Message:
fix: bug in factorization over Q(a)
File:
1 edited

Legend:

Unmodified
Added
Removed
  • factory/facBivar.cc

    r3e7db4 r14e634  
    499499  modpk b= modpk();
    500500  bool mipoHasDen= false;
     501  CanonicalForm den= 1;
    501502  if (!extension)
    502503  {
     
    519520  {
    520521    A /= Lc (Aeval);
     522    mipoHasDen= !bCommonDen(mipo).isOne();
     523    mipo *= bCommonDen (mipo);
     524    ZZX NTLmipo= convertFacCF2NTLZZX (mipo);
     525    ZZX NTLLcf= convertFacCF2NTLZZX (Lc (A*bCommonDen (A)));
     526    ZZ NTLf= resultant (NTLmipo, NTLLcf);
     527    ZZ NTLD= discriminant (NTLmipo);
     528    den= abs (convertZZ2CF (NTLD*NTLf));
     529
    521530    // make factors elements of Z(a)[x] disable for modularDiophant
    522531    CanonicalForm multiplier= 1;
     
    529538    A *= bCommonDen (A);
    530539
    531     mipoHasDen= !bCommonDen(mipo).isOne();
    532     mipo *= bCommonDen (mipo);
    533540    Off (SW_RATIONAL);
    534541    int i= 0;
    535     ZZX NTLmipo= convertFacCF2NTLZZX (mipo);
    536     CanonicalForm discMipo= convertZZ2CF (discriminant (NTLmipo));
     542    CanonicalForm discMipo= convertZZ2CF (NTLD);
    537543    findGoodPrime (F*discMipo,i);
    538544    findGoodPrime (Aeval*discMipo,i);
     
    555561  uniFactors= henselLiftAndEarly
    556562              (A, earlySuccess, earlyFactors, degs, liftBound,
    557                uniFactors, dummy, evaluation, b);
     563               uniFactors, dummy, evaluation, b, den);
    558564  TIMING_END_AND_PRINT (fac_bi_hensel_lift,
    559565                        "time for bivariate hensel lifting over Q: ");
     
    578584  TIMING_START (fac_bi_factor_recombination);
    579585  factors= factorRecombination (uniFactors, A, MODl, degs, 1,
    580                                 uniFactors.length()/2, b);
     586                                uniFactors.length()/2, b, den);
    581587  TIMING_END_AND_PRINT (fac_bi_factor_recombination,
    582588                        "time for bivariate factor recombination over Q: ");
Note: See TracChangeset for help on using the changeset viewer.