Changeset 237c42 in git


Ignore:
Timestamp:
Oct 17, 2012, 10:37:28 AM (11 years ago)
Author:
Martin Lee <martinlee84@…>
Branches:
(u'spielwiese', '5b153614cbc72bfa198d75b1e9e33dab2645d9fe')
Children:
b37b3984a12e1552c7bafc9fd5a7849240ea7980
Parents:
72f1e4ba707e83cf6b23e8920fb57f610d7ef8bc
git-author:
Martin Lee <martinlee84@web.de>2012-10-17 10:37:28+02:00
git-committer:
Martin Lee <martinlee84@web.de>2012-10-18 17:42:58+02:00
Message:
fix: factorization over Q(a) if minimal polynomial has denominator
fix: more failed assertions
Location:
factory
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • factory/facHensel.cc

    r72f1e4b r237c42  
    544544  }
    545545
     546  setReduce (alpha, false);
    546547  for (k= 0; k < factors.length(); k++)
    547548  {
     
    554555    }
    555556  }
     557  setReduce (alpha, true);
    556558  setCharacteristic(0);
    557559
     
    591593  }
    592594  setCharacteristic (p);
     595  setReduce (alpha, false);
    593596  recResult= mapinto (recResult);
     597  setReduce (alpha, true);
    594598  if (mipoHasDen)
    595599  {
     
    606610    coeffE= div (e, modulus);
    607611    setCharacteristic (p);
     612    if (mipoHasDen)
     613      setReduce (gamma, false);
     614    else
     615      setReduce (alpha, false);
    608616    coeffE= coeffE.mapinto();
     617    if (mipoHasDen)
     618      setReduce (gamma, true);
     619    else
     620      setReduce (alpha, true);
    609621    if (mipoHasDen)
    610622      coeffE= replacevar (coeffE, gamma, beta);
     
    619631      {
    620632        setCharacteristic (p);
     633        setReduce (alpha, false);
    621634        g= mulNTL (coeffE, j.getItem());
    622635        g= modNTL (g, bufFactors[ii]);
     636        setReduce (alpha, true);
    623637        setCharacteristic (0);
    624638        if (mipoHasDen)
    625639        {
     640          setReduce (beta, false);
    626641          k.getItem() += replacevar (g.mapinto()*modulus, beta, gamma);
    627642          e -= mulNTL (replacevar (g.mapinto(), beta, gamma)*modulus,
    628643                                   l.getItem(), b);
     644          setReduce (beta, true);
    629645        }
    630646        else
  • factory/facMul.cc

    r72f1e4b r237c42  
    404404      {
    405405        ZZ_p::init (convertFacCF2NTLZZ (b.getpk()));
    406         ZZ_pX NTLmipo= to_ZZ_pX (convertFacCF2NTLZZX (getMipo (alpha)));
     406        CanonicalForm mipo= getMipo (alpha);
     407        bool is_rat= isOn (SW_RATIONAL);
     408        if (!is_rat)
     409          On (SW_RATIONAL);
     410        mipo *=bCommonDen (mipo);
     411        if (!is_rat)
     412          Off (SW_RATIONAL);
     413        ZZ_pX NTLmipo= to_ZZ_pX (convertFacCF2NTLZZX (mipo));
    407414        ZZ_pE::init (NTLmipo);
    408415        ZZ_pEX NTLg= convertFacCF2NTLZZ_pEX (G, NTLmipo);
Note: See TracChangeset for help on using the changeset viewer.