Changeset b1d287 in git for factory/cf_gcd.cc
- Timestamp:
- Aug 1, 2012, 2:25:24 AM (11 years ago)
- Branches:
- (u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', 'c987db42cd2ec943b97ac5746c99892ceddf909c')
- Children:
- 0df59c8a8e59eded04e4aca4e57cfed188a00cf1
- Parents:
- 09afeb85ea17e564813761786f76281c8162dad0362fc6799a207ad61d3be8abe0206e52b5782e50
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
factory/cf_gcd.cc
r09afeb rb1d287 1 1 /* emacs edit mode for this file is -*- C++ -*- */ 2 /* $Id$ */3 2 4 3 #include "config.h" … … 1233 1232 cl = gcd (f.lc(),g.lc()); 1234 1233 CanonicalForm gcdcfcg= gcd (cf, cg); 1234 CanonicalForm fp, gp; 1235 1235 CanonicalForm b= 1; 1236 1236 int minCommonDeg= 0; … … 1260 1260 1261 1261 CanonicalForm cof, cog, cofp, cogp, newCof, newCog, cofn, cogn; 1262 int maxNumVars= tmax (getNumVars (f), getNumVars (g)); 1262 1263 //Off (SW_RATIONAL); 1263 1264 while ( true ) … … 1272 1273 //printf("try p=%d\n",p); 1273 1274 setCharacteristic( p ); 1275 fp= mapinto (f); 1276 gp= mapinto (g); 1274 1277 #ifdef HAVE_NTL 1275 Dp = GCD_small_p (mapinto (f), mapinto (g), cofp, cogp); 1278 if (size (fp)/maxNumVars > 500 && size (gp)/maxNumVars > 500) 1279 Dp = GCD_small_p (fp, gp, cofp, cogp); 1280 else 1281 { 1282 Dp= gcd_poly (fp, gp); 1283 cofp= fp/Dp; 1284 cogp= gp/Dp; 1285 } 1276 1286 #else 1277 Dp= gcd_poly ( mapinto (f), mapinto (g));1278 cofp= mapinto (f)/Dp;1279 cogp= mapinto (g)/Dp;1287 Dp= gcd_poly (fp, gp); 1288 cofp= fp/Dp; 1289 cogp= gp/Dp; 1280 1290 #endif 1281 1291 Dp /=Dp.lc();
Note: See TracChangeset
for help on using the changeset viewer.