Changeset 52cccfd in git
 Timestamp:
 Apr 7, 2013, 1:36:31 AM (9 years ago)
 Branches:
 (u'jengelhdatetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', '48f1dd268d0ff74ef2f7dccbf02545425002ddcc')
 Children:
 803956e36bc486d4e8bb34f103dce728e5d1ea6f
 Parents:
 67f82efac7d435c72c77fbd667d017b0ad83a57e
 gitauthor:
 Martin Lee <martinlee84@web.de>20130407 01:36:31+02:00
 gitcommitter:
 Martin Lee <martinlee84@web.de>20130408 14:42:19+02:00
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

factory/cf_gcd_smallp.cc
r67f82ef r52cccfd 383 383 int p= getCharacteristic (); 384 384 int d= degree (mipo); 385 int bound= ipower (p,d);385 double bound= pow ((double) p, (double) d); 386 386 do 387 387 { … … 436 436 CanonicalForm newMipo= convertNTLzzpX2CF (NTLIrredpoly, Variable (1)); 437 437 return rootOf (newMipo); 438 }439 440 /// chooses a suitable extension of \f$ F_{p}(\alpha ) \f$441 /// we do not extend \f$ F_{p}(\alpha ) \f$ itself but extend \f$ F_{p} \f$ ,442 /// s.t. \f$ F_{p}(\alpha ) \subset F_{p}(\beta ) \f$443 static inline444 void choose_extension (const int& d, const int& num_vars, Variable& beta)445 {446 int p= getCharacteristic();447 if (p != fac_NTL_char)448 {449 fac_NTL_char= p;450 zz_p::init (p);451 }452 zz_pX NTLirredpoly;453 //TODO: replace d by max_{i} (deg_x{i}(f))454 int i= (int) (log ((double) ipower (d + 1, num_vars))/log ((double) p));455 int m= degree (getMipo (beta));456 if (i <= 1)457 i= 2;458 BuildIrred (NTLirredpoly, i*m);459 CanonicalForm mipo= convertNTLzzpX2CF (NTLirredpoly, Variable(1));460 beta= rootOf (mipo);461 438 } 462 439 … … 2253 2230 GFRandom genGF; 2254 2231 int p= getCharacteristic (); 2255 intbound;2232 double bound; 2256 2233 if (alpha != Variable (1)) 2257 2234 { 2258 bound= ipower (p,degree (getMipo(alpha)));2259 bound= ipower (bound,k);2235 bound= pow ((double) p, (double) degree (getMipo(alpha))); 2236 bound= pow (bound, (double) k); 2260 2237 } 2261 2238 else if (GF) 2262 2239 { 2263 bound= ipower (p,getGFDegree());2264 bound= ipower (bound,k);2240 bound= pow ((double) p, (double) getGFDegree()); 2241 bound= pow ((double) bound, (double) k); 2265 2242 } 2266 2243 else 2267 bound= ipower (p,k);2244 bound= pow ((double) p, (double) k); 2268 2245 2269 2246 CanonicalForm random;
Note: See TracChangeset
for help on using the changeset viewer.