- Timestamp:
- Mar 12, 1998, 3:32:36 PM (26 years ago)
- Branches:
- (u'spielwiese', '2fa36c576e6a4ddbb1093b43c7f8e9835e17e52a')
- Children:
- 80532d7b76621cdf9061c0414552a3235508e084
- Parents:
- 195424a9a77b57c412c3492fea3a288b9e27eb68
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
factory/cf_gcd.cc
r195424 r2f5862 1 1 /* emacs edit mode for this file is -*- C++ -*- */ 2 /* $Id: cf_gcd.cc,v 1. 19 1998-03-12 10:27:48schmidt Exp $ */2 /* $Id: cf_gcd.cc,v 1.20 1998-03-12 14:32:36 schmidt Exp $ */ 3 3 4 4 #include <config.h> … … 57 57 } 58 58 59 //{{{ static CanonicalForm maxnorm ( const CanonicalForm & f )60 //{{{ docu61 //62 // maxnorm() - return the maximum of the absolute values of all63 // coefficients of f.64 //65 // The absolute value and the maximum are calculated with respect66 // to operator < on canonical forms which is most meaningful for67 // rational numbers and integers.68 //69 // Used by gcd_poly_univar0().70 //71 //}}}72 static CanonicalForm73 maxnorm ( const CanonicalForm & f )74 {75 CanonicalForm m = 0;76 CFIterator i;77 for ( i = f; i.hasTerms(); i++ )78 m = tmax( m, abs( i.coeff() ) );79 return m;80 }81 //}}}82 83 59 //{{{ static CanonicalForm balance ( const CanonicalForm & f, const CanonicalForm & q ) 84 60 //{{{ docu … … 214 190 // maxnorm(g)*power(CanonicalForm(2),g.degree())*isqrt(g.degree()+1) 215 191 // )+1; 216 M = tmin( max norm(f), maxnorm(g) );192 M = tmin( maxNorm(f), maxNorm(g) ); 217 193 BB = power(CanonicalForm(2),tmin(f.degree(),g.degree()))*M; 218 194 q = 0;
Note: See TracChangeset
for help on using the changeset viewer.