Changeset f4b180 in git
- Timestamp:
- Sep 26, 2007, 5:07:16 PM (16 years ago)
- Branches:
- (u'spielwiese', '8e0ad00ce244dfd0756200662572aef8402f13d5')
- Children:
- a094d6f29cc607482d3c6933b8425c059b4136fe
- Parents:
- 08a6ebb93a83d74ddbebc285cfd635bbda6ce13c
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
factory/cf_gcd.cc
r08a6ebb rf4b180 1 1 /* emacs edit mode for this file is -*- C++ -*- */ 2 /* $Id: cf_gcd.cc,v 1.5 1 2007-09-26 14:31:12Singular Exp $ */2 /* $Id: cf_gcd.cc,v 1.52 2007-09-26 15:07:16 Singular Exp $ */ 3 3 4 4 #include <config.h> … … 33 33 CanonicalForm 34 34 chinrem_gcd ( const CanonicalForm & FF, const CanonicalForm & GG ); 35 35 36 36 bool 37 37 gcd_test_one ( const CanonicalForm & f, const CanonicalForm & g, bool swap ) … … 706 706 #else 707 707 while(1) 708 { 709 d = gcd_poly( f, g ); 708 { 709 d = gcd_poly( f, g ); 710 710 if ((fdivides(d,f)) && (fdivides(d,g))) break; 711 711 printf("g"); fflush(stdout); … … 930 930 for ( i = n-1; i > 0; i-- ) 931 931 { 932 932 if ( degsf[i] == 0 ) 933 933 { 934 934 if ( degsg[i] != 0 ) … … 953 953 if ( ( pe != 1 ) && ( degsf[1] != 0 ) ) 954 954 pe = -pe; 955 955 956 956 delete [] degsf; 957 957 delete [] degsg; … … 976 976 result += power( x, i.exp() ) * c; 977 977 } 978 else 978 else 979 979 result += power( x, i.exp() ) * balance_p(c,q); 980 980 } … … 1036 1036 D = newD; 1037 1037 } 1038 else if ( dp_deg >d_deg )1038 else if ( dp_deg < d_deg ) 1039 1039 { 1040 1040 n=GCD_CHINES_MIN_TRIES; … … 1044 1044 d_deg=dp_deg; 1045 1045 } 1046 //else dp_deg <d_deg: bad prime1046 //else dp_deg > d_deg: bad prime 1047 1047 } 1048 1048 if ( i >= 0 ) … … 1051 1051 { 1052 1052 CanonicalForm Dn= Farey(D,q); 1053 1054 1053 int is_rat=isOn(SW_RATIONAL); 1054 On(SW_RATIONAL); 1055 1055 CanonicalForm cd = bCommonDen( Dn ); // we need On(SW_RATIONAL) 1056 1056 if (!is_rat) Off(SW_RATIONAL); 1057 1057 Dn *=cd; 1058 1058 //Dn /=vcontent(Dn,Variable(1));
Note: See TracChangeset
for help on using the changeset viewer.