Changeset 8e0cdf in git
- Timestamp:
- Mar 18, 2008, 11:12:21 AM (15 years ago)
- Branches:
- (u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', '0604212ebb110535022efecad887940825b97c3f')
- Children:
- 632ebaadeab150457fe8f05a66d352685c6506af
- Parents:
- f12cd236d42ce7c576d7f5b8ea25484f5875c740
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libfac/factor/Factor.cc
rf12cd23 r8e0cdf 1 1 /* Copyright 1996 Michael Messollen. All rights reserved. */ 2 2 /////////////////////////////////////////////////////////////////////////////// 3 static char * rcsid = "$Id: Factor.cc,v 1.4 2 2008-03-17 17:44:16Singular Exp $ ";3 static char * rcsid = "$Id: Factor.cc,v 1.43 2008-03-18 10:12:21 Singular Exp $ "; 4 4 static char * errmsg = "\nYou found a bug!\nPlease inform (Michael Messollen) michael@math.uni-sb.de \nPlease include above information and your input (the ideal/polynomial and characteristic) in your bug-report.\nThank you."; 5 5 /////////////////////////////////////////////////////////////////////////////// … … 733 733 for ( int i=1; i<=level(F); i++) 734 734 { 735 if ( degree(f,Variable(i) ) == 1 ) 735 if ( degree(f,Variable(i) ) == 1 ) 736 736 //test trivial case; only true iff F is primitiv w.r.t every variable; else check (if F=ax+b) gcd(a,b)=1 ? 737 737 { … … 1035 1035 static bool fdivides2(const CanonicalForm &F, const CanonicalForm &G, const CanonicalForm &minpoly) 1036 1036 { 1037 if ( minpoly!=0)1037 if (!minpoly.isZero()) 1038 1038 { 1039 1039 #if 0 … … 1161 1161 Outputlist= factorize(F); 1162 1162 #else 1163 if ( minpoly!=0)1163 if (!minpoly.isZero()) 1164 1164 { 1165 1165 if ( F.isHomogeneous() ) … … 1174 1174 { 1175 1175 CFList as(minpoly); 1176 CFFList sqF=sqrFree(F); // sqrFreeZ 1176 //CFFList sqF=sqrFree(F); // sqrFreeZ 1177 CFFList sqF=SqrFreeMV(F,minpoly); 1178 if (sqF.isEmpty()) sqF=sqrFree(F); 1177 1179 CFFList G,H; 1178 1180 CanonicalForm fac; … … 1195 1197 } 1196 1198 } 1197 else 1199 else // minpoly==0 1198 1200 Outputlist=factorize(F); 1199 1201 #endif … … 1288 1290 DEBOUTLN(CERR, "Outputlist is ", Outputlist); 1289 1291 for ( i=Outputlist; i.hasItem(); i++ ) 1290 if ( level(i.getItem().factor()) > 0 ){ 1292 if ( level(i.getItem().factor()) > 0 ) 1293 { 1291 1294 unit = lc(i.getItem().factor()); 1292 1295 if ( getNumVars(unit) == 0 ){ // a constant; possibly 1 … … 1294 1297 g *=power(i.getItem().factor()/unit,i.getItem().exp()); 1295 1298 } 1296 else{ 1299 else 1300 { 1297 1301 Outputlist2.append(i.getItem()); 1298 1302 g *=power(i.getItem().factor(),i.getItem().exp()); … … 1331 1335 /* 1332 1336 $Log: not supported by cvs2svn $ 1337 Revision 1.42 2008/03/17 17:44:16 Singular 1338 *hannes: fact.tst 1339 1333 1340 Revision 1.38 2008/01/07 13:34:56 Singular 1334 1341 *hannes: omse optiomzations(isOne)
Note: See TracChangeset
for help on using the changeset viewer.