Changeset c74742 in git
- Timestamp:
- Jul 31, 2019, 2:24:45 PM (4 years ago)
- Branches:
- (u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', '0604212ebb110535022efecad887940825b97c3f')
- Children:
- 5cf321599c682cc78b4e3d193a6942c4b89223b2
- Parents:
- 6ca326dd0aa9608cd34d22903d3d6a579fde9c80
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
factory/FLINTconvert.cc
r6ca326 rc74742 752 752 } 753 753 754 static CanonicalForm b_content ( const CanonicalForm & f ) 755 { 756 if ( f.inCoeffDomain() ) 757 return f; 758 else 759 { 760 CanonicalForm result = 0; 761 CFIterator i; 762 for ( i = f; i.hasTerms() && (!result.isOne()); i++ ) 763 result=bgcd( b_content(i.coeff()) , result ); 764 return result; 765 } 766 } 767 768 754 769 CanonicalForm gcdFlintMP_QQ(const CanonicalForm& F, const CanonicalForm& G) 755 770 { … … 781 796 RES=convFlintMPFactoryP(res,ctx,N); 782 797 // gcd(2x,4x) should be 2x, so RES should also have the gcd(lc(F),lc(G)) 783 RES*= gcd(F.lc(),G.lc());798 RES*=bgcd(b_content(F),b_content(G)); 784 799 } 785 800 fmpq_mpoly_clear(res,ctx);
Note: See TracChangeset
for help on using the changeset viewer.