Changeset dff969 in git
- Timestamp:
- Oct 9, 1997, 4:39:02 PM (26 years ago)
- Branches:
- (u'spielwiese', '5b153614cbc72bfa198d75b1e9e33dab2645d9fe')
- Children:
- 5cf721fd6f055b1dafc770f3b5de911f53ce5fb9
- Parents:
- dbf92f4b21fb5e2527dd8e6e58d284a85b3281b5
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
factory/cf_algorithm.cc
rdbf92f rdff969 1 1 /* emacs edit mode for this file is -*- C++ -*- */ 2 /* $Id: cf_algorithm.cc,v 1. 2 1997-09-08 16:02:02 schmidt Exp $ */2 /* $Id: cf_algorithm.cc,v 1.3 1997-10-09 14:39:02 schmidt Exp $ */ 3 3 4 4 //{{{ docu … … 163 163 } 164 164 //}}} 165 166 //{{{ bool divides ( const CanonicalForm & f, const CanonicalForm & g ) 167 //{{{ docu 168 // 169 // divides() - check whether f divides g. 170 // 171 // Uses some extra checks to avoid polynomial division. 172 // 173 //}}} 174 bool 175 divides ( const CanonicalForm & f, const CanonicalForm & g ) 176 { 177 if ( g.level() > 0 && g.level() == f.level() ) 178 if ( divides( f.tailcoeff(), g.tailcoeff() ) && divides( f.LC(), g.LC() ) ) { 179 CanonicalForm q, r; 180 bool ok = divremt( g, f, q, r ); 181 return ok && r == 0; 182 } 183 else 184 return false; 185 else { 186 CanonicalForm q, r; 187 bool ok = divremt( g, f, q, r ); 188 return ok && r == 0; 189 } 190 }
Note: See TracChangeset
for help on using the changeset viewer.