Changeset 12f992 in git for factory/cf_gcd.cc
- Timestamp:
- Mar 10, 2014, 2:58:13 PM (10 years ago)
- 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
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
factory/cf_gcd.cc
rc78743 r12f992 336 336 } 337 337 #else 338 if ( isOn(SW_USE_NTL_GCD_P) &&( getCharacteristic() > 0 ) && (CFFactory::gettype() != GaloisFieldDomain)338 if (( getCharacteristic() > 0 ) && (CFFactory::gettype() != GaloisFieldDomain) 339 339 && (f.level()==g.level()) && isPurePoly(f) && isPurePoly(g)) 340 340 { … … 377 377 } 378 378 #else 379 if ( isOn(SW_USE_NTL_GCD_0) &&( getCharacteristic() ==0)379 if (( getCharacteristic() ==0) 380 380 && (f.level()==g.level()) && isPurePoly(f) && isPurePoly(g)) 381 381 { … … 400 400 else 401 401 { 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); 411 408 } 412 409 } … … 422 419 else 423 420 { 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); 433 427 } 434 428 return r; … … 675 669 #else 676 670 #ifdef HAVE_NTL 677 if ( isOn(SW_USE_NTL_GCD_P) &&bpure && (CFFactory::gettype() != GaloisFieldDomain))671 if (bpure && (CFFactory::gettype() != GaloisFieldDomain)) 678 672 return gcd_univar_ntlp(pi, pi1 ) * C; 679 673 #endif … … 794 788 #else 795 789 #ifdef HAVE_NTL 796 if ( isOn(SW_USE_NTL_GCD_0) &&isPurePoly(pi) && isPurePoly(pi1) )790 if (isPurePoly(pi) && isPurePoly(pi1) ) 797 791 return gcd_univar_ntl0(pi, pi1 ) * C; 798 792 #endif
Note: See TracChangeset
for help on using the changeset viewer.