Changeset 1e5c50 in git
- Timestamp:
- Nov 12, 2012, 6:21:05 PM (10 years ago)
- Branches:
- (u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', 'a800fe4b3e9d37a38c5a10cc0ae9dfa0c15a4ee6')
- Children:
- f6237dd32a31b0c8c58f56d6a808bda992e743fa
- Parents:
- 6ea864278bd3cbb9e4869b30bd2abcd525d6ed30
- git-author:
- Martin Lee <martinlee84@web.de>2012-11-12 18:21:05+01:00
- git-committer:
- Martin Lee <martinlee84@web.de>2012-11-16 13:20:45+01:00
- Location:
- factory
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
factory/algext.cc
r6ea864 r1e5c50 26 26 #include "cf_map.h" 27 27 #include "cf_generator.h" 28 #include "facMul.h" 28 29 29 30 #ifdef HAVE_NTL … … 821 822 equal= true; // modular image did not add any new information 822 823 TIMING_START (alg_termination) 824 #ifdef HAVE_FLINT 825 if (equal && tmp.isUnivariate() && f.isUnivariate() && g.isUnivariate() 826 && f.level() == tmp.level() && tmp.level() == g.level()) 827 { 828 CanonicalForm Q, R, sf, sg, stmp; 829 Variable x= Variable (1); 830 sf= swapvar (f, f.mvar(), x); 831 sg= swapvar (g, f.mvar(), x); 832 stmp= swapvar (tmp, f.mvar(), x); 833 newtonDivrem (sf, stmp, Q, R); 834 if (R.isZero()) 835 { 836 newtonDivrem (sg, stmp, Q, R); 837 if (R.isZero()) 838 { 839 Off (SW_RATIONAL); 840 setReduce (a,true); 841 if (off_rational) Off(SW_RATIONAL); else On(SW_RATIONAL); 842 TIMING_END_AND_PRINT (alg_termination, 843 "time for successful termination test in alg gcd: ") 844 return tmp*gcdcfcg; 845 } 846 } 847 } 848 else 849 #endif 823 850 if(equal && fdivides( tmp, f ) && fdivides( tmp, g )) // trial division 824 851 { -
factory/facMul.h
r6ea864 r1e5c50 155 155 const CFList& M ///< [in] contains only powers of Variables 156 156 ); 157 158 #ifdef HAVE_FLINT 159 /// division with remainder of univariate polynomials over Q and Q(a) using 160 /// Newton inversion, satisfying F=G*Q+R, deg(R) < deg(G) 161 void 162 newtonDivrem (const CanonicalForm& F, ///<[in] univariate poly 163 const CanonicalForm& G, ///<[in] univariate poly 164 CanonicalForm& Q, ///<[in, out] quotient 165 CanonicalForm& R ///<[in, out] remainder 166 ); 167 #endif 168 157 169 #endif 158 170 /* FAC_MUL_H */
Note: See TracChangeset
for help on using the changeset viewer.