Changeset e89e56 in git for libfac/charset
- Timestamp:
- Mar 17, 2008, 6:44:17 PM (16 years ago)
- Branches:
- (u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
- Children:
- 85194f264939ff85dd7731d524a483b21f35f5ac
- Parents:
- ca847b0e390392983ef3461c16980b5defee8e0c
- Location:
- libfac/charset
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
libfac/charset/alg_factor.cc
rca847b re89e56 3 3 // emacs edit mode for this file is -*- C++ -*- 4 4 //////////////////////////////////////////////////////////// 5 static char * rcsid = "$Id: alg_factor.cc,v 1.2 0 2008-02-22 12:16:02Singular Exp $";5 static char * rcsid = "$Id: alg_factor.cc,v 1.21 2008-03-17 17:44:15 Singular Exp $"; 6 6 //////////////////////////////////////////////////////////// 7 7 // FACTORY - Includes … … 94 94 else { l = 1; } 95 95 d= dr-dv+1; 96 while ( ( dv <= dr ) && ( !r.isZero()) ) 97 { 96 while ( ( dv <= dr ) && ( r != r.genZero()) ){ 98 97 test = power(x,dr-dv)*v*LC(r,x); 99 98 if ( dr == 0 ) { r= CanonicalForm(0); } … … 142 141 143 142 h = CanonicalForm(1); 144 while ( !G.isZero() ) 145 { 143 while ( G != G.genZero() ) { 146 144 delta= degree(F,v) -degree(G,v); 147 145 beta = power(CanonicalForm(-1), delta+1) * LC(F,v)* power(h, delta); … … 196 194 temp= gcd(R, R.deriv(vf)); 197 195 DEBOUTLN(CERR, "sqrf_norm_sub: temp= ", temp); 198 if (degree(temp,vf) != 0 || temp .isZero() ){ sqfreetest= 0; }196 if (degree(temp,vf) != 0 || temp == temp.genZero() ){ sqfreetest= 0; } 199 197 else { sqfreetest= 1; } 200 198 DEBOUTLN(CERR, "sqrf_norm_sub: sqfreetest= ", sqfreetest); 201 199 } 202 200 else{ 203 DEBOUTMSG(CERR, "Starting isSqrFree(R)!");204 // Look at isSqrFree!201 DEBOUTMSG(CERR, "Starting SqrFreeTest(R)!"); 202 // Look at SqrFreeTest! 205 203 // (z+a^5+w)^4 with z<w<a should not give sqfreetest=1 ! 206 204 // for now we use this workaround with Factorize... … … 221 219 for ( i=testlist; i.hasItem(); i++) 222 220 if ( i.getItem().exp() > 1 && degree(i.getItem().factor(), R.mvar()) > 0) { sqfreetest=0; break; } 223 DEBOUTLN(CERR, " isSqrFree(R)= ", sqfreetest);221 DEBOUTLN(CERR, "SqrFreeTest(R)= ", sqfreetest); 224 222 } 225 223 if ( ! sqfreetest ){ … … 261 259 temp= gcd(R, R.deriv(vf)); 262 260 DEBOUTLN(CERR, "sqrf_norm_sub: temp= ", temp); 263 if (degree(temp,vf) != 0 || temp .isZero() ){ sqfreetest= 0; }261 if (degree(temp,vf) != 0 || temp == temp.genZero() ){ sqfreetest= 0; } 264 262 else { sqfreetest= 1; } 265 263 DEBOUTLN(CERR, "sqrf_norm_sub: sqfreetest= ", sqfreetest); 266 264 } 267 265 else{ 268 DEBOUTMSG(CERR, "Starting isSqrFree(R)!");269 // Look at isSqrFree!266 DEBOUTMSG(CERR, "Starting SqrFreeTest(R)!"); 267 // Look at SqrFreeTest! 270 268 // (z+a^5+w)^4 with z<w<a should not give sqfreetest=1 ! 271 269 // for now we use this workaround with Factorize... … … 286 284 for ( i=testlist; i.hasItem(); i++) 287 285 if ( i.getItem().exp() > 1 && degree(i.getItem().factor(), R.mvar()) > 0) { sqfreetest=0; break; } 288 DEBOUTLN(CERR, " isSqrFree(R)= ", sqfreetest);286 DEBOUTLN(CERR, "SqrFreeTest(R)= ", sqfreetest); 289 287 } 290 288 if ( ! sqfreetest ){ … … 357 355 358 356 if ( Astar.length() == 0 ) return 0; 359 for ( CFListIterator i=Astar; i.hasItem(); i++) 360 { 357 for ( CFListIterator i=Astar; i.hasItem(); i++){ 361 358 elem= i.getItem(); 362 if ( elem.deriv() .isZero() ) return Counter;359 if ( elem.deriv() == elem.genZero() ) return Counter; 363 360 else Counter += 1; 364 361 } … … 757 754 Fgcd= pp(Fgcd); Ggcd= pp(Ggcd); 758 755 DEBDECLEVEL(CERR,"newfactoras"); 759 return UnionCFFL(newfactoras(Fgcd,as,success) , newfactoras(Ggcd,as,success));756 return myUnion(newfactoras(Fgcd,as,success) , newfactoras(Ggcd,as,success)); 760 757 } 761 758 if ( getCharacteristic() > 0 ){ … … 826 823 output=newfactoras(i.getItem().factor(),as, success); 827 824 for ( CFFListIterator j=output; j.hasItem(); j++) 828 Output = appendCFFL(Output,CFFactor(j.getItem().factor(),j.getItem().exp()*i.getItem().exp()));825 Output = myappend(Output,CFFactor(j.getItem().factor(),j.getItem().exp()*i.getItem().exp())); 829 826 } 830 827 return Output; … … 833 830 /* 834 831 $Log: not supported by cvs2svn $ 835 Revision 1.19 2008/01/25 14:19:39 Singular836 *hannes: SqrFreeTest -> isSqrFree837 838 Revision 1.18 2008/01/22 09:51:36 Singular839 *hannes: sqrFree/InternalSqrFree -> factory840 841 832 Revision 1.17 2007/05/15 14:46:48 Singular 842 833 *hannes: factorize in Zp(a)[x...] -
libfac/charset/algfactor.cc
rca847b re89e56 3 3 // emacs edit mode for this file is -*- C++ -*- 4 4 //////////////////////////////////////////////////////////// 5 static char * rcsid = "$Id: algfactor.cc,v 1. 9 2008-01-22 09:51:37Singular Exp $";5 static char * rcsid = "$Id: algfactor.cc,v 1.10 2008-03-17 17:44:16 Singular Exp $"; 6 6 //////////////////////////////////////////////////////////// 7 7 // FACTORY - Includes … … 429 429 success= min(success,csuccess); 430 430 for ( CFFListIterator j=CERR; j.hasItem(); j++) 431 Output = appendCFFL(Output,CFFactor(j.getItem().factor(),j.getItem().exp()*i.getItem().exp()));431 Output = myappend(Output,CFFactor(j.getItem().factor(),j.getItem().exp()*i.getItem().exp())); 432 432 } 433 433 return Output;
Note: See TracChangeset
for help on using the changeset viewer.