Changeset c13ebd in git for factory/facBivar.cc
- Timestamp:
- Jun 29, 2020, 5:57:05 PM (3 years ago)
- Branches:
- (u'spielwiese', 'd0474371d8c5d8068ab70bfb42719c97936b18a6')
- Children:
- e64ec88de66303fe1a011fc6de0230f0d45acc5a
- Parents:
- 168e13c73f575fd0acbcbd8dece921aaacd1abe5
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
factory/facBivar.cc
r168e13 rc13ebd 184 184 } 185 185 186 #ifdef HAVE_NTL // resultatnt(ZZ), discrimeninat186 #ifdef HAVE_NTL // henselLiftAndEarly 187 187 CFList biFactorize (const CanonicalForm& F, const Variable& v) 188 188 { … … 526 526 mipoHasDen= !bCommonDen(mipo).isOne(); 527 527 mipo *= bCommonDen (mipo); 528 #ifdef HAVE_FLINT 529 // init 530 fmpz_t FLINTf,FLINTD; 531 fmpz_init(FLINTf); 532 fmpz_init(FLINTD); 533 fmpz_poly_t FLINTmipo; 534 fmpz_poly_t FLINTLcf; 535 //conversion 536 convertFacCF2Fmpz_poly_t(FLINTmipo,mipo); 537 convertFacCF2Fmpz_poly_t(FLINTLcf,Lc (A*bCommonDen (A))); 538 // resultant, discriminant 539 fmpz_poly_resultant(FLINTf,FLINTmipo,FLINTLcf); 540 fmpz_poly_discriminant(FLINTD,FLINTmipo); 541 fmpz_mul(FLINTf,FLINTD,FLINTf); 542 // conversion 543 den= abs (convertFmpz2CF(FLINTf)); 544 // clean up 545 fmpz_clear(FLINTf); 546 // FLINTD is used below 547 fmpz_poly_clear(FLINTLcf); 548 fmpz_poly_clear(FLINTmipo); 549 #elif defined(HAVE_NTL) 528 550 ZZX NTLmipo= convertFacCF2NTLZZX (mipo); 529 551 ZZX NTLLcf= convertFacCF2NTLZZX (Lc (A*bCommonDen (A))); … … 531 553 ZZ NTLD= discriminant (NTLmipo); 532 554 den= abs (convertZZ2CF (NTLD*NTLf)); 555 #endif 533 556 534 557 // make factors elements of Z(a)[x] disable for modularDiophant … … 544 567 Off (SW_RATIONAL); 545 568 int i= 0; 569 #ifdef HAVE_FLINT 570 CanonicalForm discMipo= convertFmpz2CF(FLINTD); 571 fmpz_clear(FLINTD); 572 #elif defined(HAVE_NTL) 546 573 CanonicalForm discMipo= convertZZ2CF (NTLD); 574 #endif 547 575 findGoodPrime (F*discMipo,i); 548 576 findGoodPrime (Aeval*discMipo,i); … … 608 636 } 609 637 #endif 638
Note: See TracChangeset
for help on using the changeset viewer.