Changeset b8f8ea in git for factory/cf_gcd_smallp.cc
- Timestamp:
- Apr 9, 2013, 3:24:54 PM (11 years ago)
- Branches:
- (u'spielwiese', '17f1d200f27c5bd38f5dfc6e8a0879242279d1d8')
- Children:
- 84299e1e1d2b92c5e28fc52391cc529f8eb8ade7f8565ac2b56eae4e46fb63670efa1bc402ae3628
- Parents:
- 8e48d4973dda2a880260a9e9a6e0705b49ab77960b447e5e0cc1cede9cfd6c91fab1752432a2bd62
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
factory/cf_gcd_smallp.cc
r8e48d49 rb8f8ea 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.