Changeset ee586a in git
- Timestamp:
- Jun 1, 2008, 7:49:05 PM (15 years ago)
- Branches:
- (u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', 'a800fe4b3e9d37a38c5a10cc0ae9dfa0c15a4ee6')
- Children:
- f2b58394b7c0b28984794adfcef85f56f72e35bf
- Parents:
- 0b85fcff1722325fd8010e4185d911f83cd46c04
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
factory/fac_sqrfree.cc
r0b85fc ree586a 1 1 /* emacs edit mode for this file is -*- C++ -*- */ 2 /* $Id: fac_sqrfree.cc,v 1.1 1 2008-05-31 17:21:11Singular Exp $ */2 /* $Id: fac_sqrfree.cc,v 1.12 2008-06-01 17:49:05 Singular Exp $ */ 3 3 4 4 #include <config.h> … … 115 115 CFFList F; 116 116 117 while ( ! c.degree() == 0 ) { 117 while ( ! c.degree() == 0 ) 118 { 118 119 y = gcd( w, c ); z = w / y; 119 120 if ( degree( z ) > 0 ) … … 145 146 CFFList F; 146 147 Variable v = aa.mvar(); 147 while ( ! c.degree(v) == 0 ) { 148 while ( ! c.degree(v) == 0 ) 149 { 148 150 y = gcd( w, c ); z = w / y; 149 151 if ( degree( z, v ) > 0 ) … … 162 164 if ( ! cont.isOne() ) 163 165 F = Union( F, sqrFreeZ( cont ) ); 164 if ( lc( a ).sign() < 0 ) { 165 if ( F.getFirst().exp() == 1 ) { 166 if ( lc( a ).sign() < 0 ) 167 { 168 if ( F.getFirst().exp() == 1 ) 169 { 166 170 CanonicalForm f = F.getFirst().factor(); 167 171 CFFListIterator(F).getItem() = CFFactor( -f, 1 ); -
libfac/charset/charset.cc
r0b85fc ree586a 2 2 //////////////////////////////////////////////////////////// 3 3 // emacs edit mode for this file is -*- C++ -*- 4 /* $Id: charset.cc,v 1.1 5 2008-05-31 17:20:10Singular Exp $ */4 /* $Id: charset.cc,v 1.16 2008-06-01 17:48:13 Singular Exp $ */ 5 5 ///////////////////////////////////////////////////////////// 6 6 // FACTORY - Includes … … 547 547 if ( degree(elem) > 1 ) // linear poly's are irreduzible 548 548 { 549 //qs = Factorize2(elem,CanonicalForm(0));550 549 qs = Factorize(elem); 551 550 // remove a constant … … 587 586 { // search for a non linear elem 588 587 elem=i.getItem(); 589 if (as.length()==1)590 qs = Factorize2(elem,as.getFirst());591 else588 //if (as.length()==1) 589 // qs = Factorize2(elem,as.getFirst()); 590 //else 592 591 qs= newfactoras(elem,as,success); 593 592 if ( qs.length() > 1 || qs.getFirst().exp() > 1 ) … … 609 608 /* 610 609 $Log: not supported by cvs2svn $ 610 Revision 1.15 2008/05/31 17:20:10 Singular 611 hannes: minor irras changes 612 611 613 Revision 1.14 2008/04/08 16:19:09 Singular 612 614 *hannes: removed rcsid -
libfac/factor/Factor.cc
r0b85fc ree586a 1 1 /* Copyright 1996 Michael Messollen. All rights reserved. */ 2 2 /////////////////////////////////////////////////////////////////////////////// 3 /* $Id: Factor.cc,v 1.4 6 2008-05-31 17:20:10Singular Exp $ */3 /* $Id: Factor.cc,v 1.47 2008-06-01 17:48:14 Singular Exp $ */ 4 4 static const char * errmsg = "\nYou found a bug!\nPlease inform singular@mathematik.uni-kl.de\nPlease include above information and your input (the ideal/polynomial and characteristic) in your bug-report.\nThank you."; 5 5 /////////////////////////////////////////////////////////////////////////////// … … 880 880 CFFList Factorize(const CanonicalForm & F, int is_SqrFree ) 881 881 { 882 out_cf("Factorize ",F,"\n");882 //out_cf("Factorize ",F,"\n"); 883 883 CFFList Outputlist,SqrFreeList,Intermediatelist,Outputlist2; 884 884 ListIterator<CFFactor> i,j; … … 954 954 if ( g.isUnivariate() ) 955 955 { 956 out_cf("univ. poly: ",g,"\n");956 //out_cf("univ. poly: ",g,"\n"); 957 957 Intermediatelist=factorize(g,1); // poly is sqr-free! 958 958 for ( j=Intermediatelist; j.hasItem(); j++ ) … … 1335 1335 /* 1336 1336 $Log: not supported by cvs2svn $ 1337 Revision 1.46 2008/05/31 17:20:10 Singular 1338 hannes: minor irras changes 1339 1337 1340 Revision 1.45 2008/04/08 16:19:10 Singular 1338 1341 *hannes: removed rcsid -
libfac/factor/SqrFree.cc
r0b85fc ree586a 2 2 /////////////////////////////////////////////////////////////////////////////// 3 3 // emacs edit mode for this file is -*- C++ -*- 4 /* $Id: SqrFree.cc,v 1.2 1 2008-05-31 17:20:10Singular Exp $ */4 /* $Id: SqrFree.cc,v 1.22 2008-06-01 17:48:14 Singular Exp $ */ 5 5 static const char * errmsg = "\nYou found a bug!\nPlease inform singular@mathematik.uni-kl.de\n Please include above information and your input (the ideal/polynomial and characteristic) in your bug-report.\nThank you."; 6 6 /////////////////////////////////////////////////////////////////////////////// … … 150 150 151 151 if (getNumVars(f)==0) return 1 ; // a constant is SqrFree 152 if ( f.isUnivariate() ) { 152 if ( f.isUnivariate() ) 153 { 153 154 g= f.deriv(); 154 155 if ( getCharacteristic() > 0 && g.isZero() ) return 0 ; … … 224 225 if (getNumVars(f)==0 ) 225 226 { // just a constant; return it 226 Outputlist= myappend(Outputlist,CFFactor(f,1));227 Outputlist= CFFactor(f,1); 227 228 return Outputlist ; 228 229 } … … 235 236 { 236 237 g = swapvar(f,k,n); g = content(g); 237 if ( ! (g.isOne() || (-g).isOne() || degree(g)==0))238 if ( ! (g.isOne() || (-g).isOne() || (degree(g)==0) )) 238 239 { 239 240 g = swapvar(g,k,n); … … 325 326 f /= h; // Now we have split the poly into f and h 326 327 g = lc(f); 327 if ( g != f.genOne() && getNumVars(g) == 0 )328 if ( !g.isOne() && getNumVars(g) == 0 ) 328 329 { 329 330 Outputlist= myappend(Outputlist,CFFactor(g,1)) ; … … 455 456 /* 456 457 $Log: not supported by cvs2svn $ 458 Revision 1.21 2008/05/31 17:20:10 Singular 459 hannes: minor irras changes 460 457 461 Revision 1.20 2008/05/14 12:38:26 Singular 458 462 *hannes: swapvar ->replacevar
Note: See TracChangeset
for help on using the changeset viewer.