Changeset 1e4b53 in git for factory/cf_gcd_smallp.cc
- Timestamp:
- May 3, 2012, 3:53:02 PM (12 years ago)
- Branches:
- (u'spielwiese', 'ec94ef7a30b928574c0c3daf41f6804dff5f6b69')
- Children:
- 60cc1289a79586c1732ba3885997c3cb49bc01d9
- Parents:
- 0d56271c672440c06e14ca2528a5185bb37e1e6f
- git-author:
- Martin Lee <martinlee84@web.de>2012-05-03 15:53:02+02:00
- git-committer:
- Martin Lee <martinlee84@web.de>2012-05-07 14:18:40+02:00
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
factory/cf_gcd_smallp.cc
r0d5627 r1e4b53 51 51 TIMING_DEFINE_PRINT(newton_interpolation) 52 52 53 bool 54 terminationTest (const CanonicalForm& F, const CanonicalForm& G, 55 const CanonicalForm& coF, const CanonicalForm& coG, 56 const CanonicalForm& cand) 57 { 58 CanonicalForm LCCand= abs (LC (cand)); 59 if (LCCand*abs (LC (coF)) == abs (LC (F))) 60 { 61 if (LCCand*abs (LC (coG)) == abs (LC (G))) 62 { 63 if (abs (cand)*abs (coF) == abs (F)) 64 { 65 if (abs (cand)*abs (coG) == abs (G)) 66 return true; 67 } 68 return false; 69 } 70 return false; 71 } 72 return false; 73 } 74 53 75 static const double log2exp= 1.442695041; 54 76 … … 805 827 if (((degree (ppCoF,1)+degree (ppH,1) == bound1) && 806 828 (degree (ppCoG,1)+degree (ppH,1) == bound2) && 807 (ppA == ppCoF*ppH && ppB == ppCoG*ppH)) ||829 terminationTest (ppA, ppB, ppCoF, ppCoG, ppH)) || 808 830 (fdivides (ppH, ppA, ppCoF) && fdivides (ppH, ppB, ppCoG))) 809 831 { … … 828 850 else if (((degree (ppCoF,1)+degree (ppH,1) == bound1) && 829 851 (degree (ppCoG,1)+degree (ppH,1) == bound2) && 830 (ppA == ppCoF*ppH && ppB == ppCoG*ppH)) ||852 terminationTest (ppA, ppB, ppCoF, ppCoG, ppH)) || 831 853 (fdivides (ppH, ppA, ppCoF) && fdivides (ppH, ppB, ppCoG))) 832 854 { … … 1255 1277 if (((degree (ppCoF,1)+degree (ppH,1) == bound1) && 1256 1278 (degree (ppCoG,1)+degree (ppH,1) == bound2) && 1257 (ppA == ppCoF*ppH && ppB == ppCoG*ppH)) ||1279 terminationTest (ppA, ppB, ppCoF, ppCoG, ppH)) || 1258 1280 (fdivides (ppH, ppA, ppCoF) && fdivides (ppH, ppB, ppCoG))) 1259 1281 { … … 1279 1301 if (((degree (ppCoF,1)+degree (ppH,1) == bound1) && 1280 1302 (degree (ppCoG,1)+degree (ppH,1) == bound2) && 1281 (ppA == ppCoF*ppH && ppB == ppCoG*ppH)) ||1303 terminationTest (ppA, ppB, ppCoF, ppCoG, ppH)) || 1282 1304 (fdivides (ppH, ppA, ppCoF) && fdivides (ppH, ppB, ppCoG))) 1283 1305 { … … 1773 1795 if (((degree (ppCoF,1)+degree (ppH,1) == bound1) && 1774 1796 (degree (ppCoG,1)+degree (ppH,1) == bound2) && 1775 (ppA == ppCoF*ppH && ppB == ppCoG*ppH)) ||1797 terminationTest (ppA, ppB, ppCoF, ppCoG, ppH)) || 1776 1798 (fdivides (ppH, ppA, ppCoF) && fdivides (ppH, ppB, ppCoG))) 1777 1799 {
Note: See TracChangeset
for help on using the changeset viewer.