 Timestamp:
 Jun 18, 1996, 2:22:54 PM (28 years ago)
 Branches:
 (u'spielwiese', '82fc009ea2b0098c1a4896c841bb70860976bdfc')
 Children:
 e6cc6869a80f3829d41e2482196f1181e9328e68
 Parents:
 cc2b49426a297bb36dc03b3dd6744400011e8b3a
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

factory/cf_gcd.cc
rcc2b49 r4bca3e 1 1 // emacs edit mode for this file is * C++ * 2 // $Id: cf_gcd.cc,v 1. 2 19960613 08:18:34 stobbe Exp $2 // $Id: cf_gcd.cc,v 1.3 19960618 12:22:54 stobbe Exp $ 3 3 4 4 /* 5 5 $Log: not supported by cvs2svn $ 6 Revision 1.2 1996/06/13 08:18:34 stobbe 7 "balance: Now balaces polynomials even if the coefficient sizes are higher 8 than the bound. 9 gcd: Now returns the results with positive leading coefficient. 10 The isOne test is now performed if pi or pi1 is multivariate. 11 " 12 6 13 Revision 1.1 1996/06/03 08:32:56 stobbe 7 14 "gcd_poly: now uses new function gcd_poly_univar0 to compute univariate … … 247 254 BB = power(CanonicalForm(2),tmin(f.degree(),g.degree()))*M; 248 255 q = 0; 249 i = 1; 250 n = cf_getNumBigPrimes(); 256 i = cf_getNumSmallPrimes()  1; 251 257 while ( true ) { 252 258 B = BB; 253 while ( i < n&& q < B ) {254 p = cf_get BigPrime( i );255 i ++;256 while ( i < n&& mod( cl, p ) == 0 ) {257 p = cf_get BigPrime( i );258 i ++;259 while ( i >= 0 && q < B ) { 260 p = cf_getSmallPrime( i ); 261 i; 262 while ( i >= 0 && mod( cl, p ) == 0 ) { 263 p = cf_getSmallPrime( i ); 264 i; 259 265 } 260 266 setCharacteristic( p ); … … 283 289 } 284 290 } 285 if ( i < n) {291 if ( i >= 0 ) { 286 292 // now balance D mod q 287 293 D = pp( balance( cg * D, q ) );
Note: See TracChangeset
for help on using the changeset viewer.