Changeset 12f992 in git for factory/cf_gcd.cc


Ignore:
Timestamp:
Mar 10, 2014, 2:58:13 PM (10 years ago)
Author:
Martin Lee <martinlee84@…>
Branches:
(u'spielwiese', 'ec94ef7a30b928574c0c3daf41f6804dff5f6b69')
Children:
b8f562019d20b1ae9a24693975ad6c264a8fa5e9
Parents:
c78743104173a106f27611fdf3b220e3b470d84e
git-author:
Martin Lee <martinlee84@web.de>2014-03-10 14:58:13+01:00
git-committer:
Martin Lee <martinlee84@web.de>2014-03-11 11:06:27+01:00
Message:
chg: deleted SW_USE_NTL_GCD_*
File:
1 edited

Legend:

Unmodified
Added
Removed
  • factory/cf_gcd.cc

    rc78743 r12f992  
    336336  }
    337337#else
    338   if (isOn(SW_USE_NTL_GCD_P) && ( getCharacteristic() > 0 ) && (CFFactory::gettype() != GaloisFieldDomain)
     338  if (( getCharacteristic() > 0 ) && (CFFactory::gettype() != GaloisFieldDomain)
    339339  &&  (f.level()==g.level()) && isPurePoly(f) && isPurePoly(g))
    340340  {
     
    377377  }
    378378#else
    379   if (isOn(SW_USE_NTL_GCD_0) && ( getCharacteristic() ==0)
     379  if (( getCharacteristic() ==0)
    380380  && (f.level()==g.level()) && isPurePoly(f) && isPurePoly(g))
    381381  {
     
    400400      else
    401401      {
    402         Off(SW_USE_NTL_GCD_0);
    403         r=extgcd(f,g,a,b);
    404         if (isOn(SW_RATIONAL))
    405         {
    406           a/=r.lc();
    407           b/=r.lc();
    408           r/=r.lc();
    409         }
    410         On(SW_USE_NTL_GCD_0);
     402        F1 /= R;
     403        G1 /= R;
     404        XGCD (RR, A,B,F1,G1,1);
     405        rr=convertZZ2CF(RR);
     406        a=convertNTLZZX2CF(A,f.mvar())*(fc/rr);
     407        b=convertNTLZZX2CF(B,f.mvar())*(gc/rr);
    411408      }
    412409    }
     
    422419      else
    423420      {
    424         Off(SW_USE_NTL_GCD_0);
    425         r=extgcd(f,g,a,b);
    426         if (isOn(SW_RATIONAL))
    427         {
    428           a/=r.lc();
    429           b/=r.lc();
    430           r/=r.lc();
    431         }
    432         On(SW_USE_NTL_GCD_0);
     421        F1 /= R;
     422        G1 /= R;
     423        XGCD (RR, A,B,F1,G1,1);
     424        rr=convertZZ2CF(RR);
     425        a=convertNTLZZX2CF(A,f.mvar())*(fc/rr);
     426        b=convertNTLZZX2CF(B,f.mvar())*(gc/rr);
    433427      }
    434428      return r;
     
    675669#else
    676670#ifdef HAVE_NTL
    677         if ( isOn(SW_USE_NTL_GCD_P) && bpure && (CFFactory::gettype() != GaloisFieldDomain))
     671        if (bpure && (CFFactory::gettype() != GaloisFieldDomain))
    678672            return gcd_univar_ntlp(pi, pi1 ) * C;
    679673#endif
     
    794788#else
    795789#ifdef HAVE_NTL
    796         if ( isOn(SW_USE_NTL_GCD_0) && isPurePoly(pi) && isPurePoly(pi1) )
     790        if (isPurePoly(pi) && isPurePoly(pi1) )
    797791            return gcd_univar_ntl0(pi, pi1 ) * C;
    798792#endif
Note: See TracChangeset for help on using the changeset viewer.