Changeset c3c832 in git
- Timestamp:
- Sep 30, 2021, 11:50:24 AM (2 years ago)
- Branches:
- (u'spielwiese', '5b153614cbc72bfa198d75b1e9e33dab2645d9fe')
- Children:
- 348ae69282271d1294a9b41bd9c15b897966c0ce
- Parents:
- 4dc97bfcb251c1bcfa5ad66d1a61c6a41e7f0c86
- Location:
- libpolys/polys
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
libpolys/polys/clapsing.cc
r4dc97b rc3c832 78 78 poly res=Flint_GCD_MP(f,pLength(f),g,pLength(g),ctx,r); 79 79 res=p_Cleardenom(res,r); 80 return res; 81 } 82 } 83 else 84 if (rField_is_Z(r)) 85 { 86 fmpz_mpoly_ctx_t ctx; 87 if (!convSingRFlintR(ctx,r)) 88 { 89 // leading coef. positive, all coeffs in Z 90 poly res=Flint_GCD_MP(f,pLength(f),g,pLength(g),ctx,r); 80 91 return res; 81 92 } -
libpolys/polys/flint_mpoly.cc
r4dc97b rc3c832 389 389 } 390 390 391 poly Flint_GCD_MP(poly p,int lp,poly q,int lq,fmpz_mpoly_ctx_t ctx,const ring r) 392 { 393 fmpz_mpoly_t pp,qq,res; 394 convSingPFlintMP(pp,ctx,p,lp,r); 395 convSingPFlintMP(qq,ctx,q,lq,r); 396 fmpz_mpoly_init(res,ctx); 397 int ok=fmpz_mpoly_gcd(res,pp,qq,ctx); 398 poly pres; 399 if (ok) 400 { 401 // Singular wants a gcd defined over ZZ that is primitive and has a positive leading coeff. 402 pres=convFlintMPSingP(res,ctx,r); 403 p_Test(pres,r); 404 } 405 else 406 { 407 pres=p_One(r); 408 } 409 fmpz_mpoly_clear(res,ctx); 410 fmpz_mpoly_clear(pp,ctx); 411 fmpz_mpoly_clear(qq,ctx); 412 fmpz_mpoly_ctx_clear(ctx); 413 return pres; 414 } 415 391 416 #endif 392 417 #endif -
libpolys/polys/flint_mpoly.h
r4dc97b rc3c832 37 37 poly Flint_GCD_MP(poly p,int lp,poly q,int lq,fmpq_mpoly_ctx_t ctx,const ring r); 38 38 poly Flint_GCD_MP(poly p,int lp,poly q,int lq,nmod_mpoly_ctx_t ctx,const ring r); 39 poly Flint_GCD_MP(poly p,int lp,poly q,int lq,fmpz_mpoly_ctx_t ctx,const ring r); 39 40 40 41 #endif
Note: See TracChangeset
for help on using the changeset viewer.