# Changeset 80532d7 in git for factory

Ignore:
Timestamp:
Mar 12, 1998, 3:32:54 PM (26 years ago)
Branches:
Children:
e0bc8f01c31b06f5bd5223a76007232d262923ac
Parents:
2f58625cdc1cde42e7673759b68e29a39e705314
Message:
```	* fac_univar.cc (norm): function removed.  All references replaced
by `euclideanNorm()'.

File:
1 edited

Unmodified
Removed
• ## factory/fac_univar.cc

 r2f5862 /* emacs edit mode for this file is -*- C++ -*- */ /* \$Id: fac_univar.cc,v 1.16 1998-02-02 08:58:49 schmidt Exp \$ */ /* \$Id: fac_univar.cc,v 1.17 1998-03-12 14:32:54 schmidt Exp \$ */ #include return res; } //{{{ static CanonicalForm norm ( const CanonicalForm & f ) //{{{ docu // // norm() - return euclidean norm of f. // // That is, returns the largest integer smaller or equal // norm(f) = sqrt(sum( f[i]^2 )).  f should be an univariate // polynomial over Z. // // Used by kbound(). // //}}} static CanonicalForm norm ( const CanonicalForm & f ) { CFIterator i; CanonicalForm sum = 0; for ( i = f; i.hasTerms(); i++ ) sum += i.coeff() * i.coeff(); DEBOUTLN( cerr, "sum = " << sum ); return sqrt( sum ); } //}}} //{{{ static int kBound ( const CanonicalForm & f, int p ) kBound ( const CanonicalForm & f, int p ) { return (int)(f.degree() + (double)(ilog2( norm(f)+1 ) + 1) / (double)ilog2(p)) + 1; return (int)(f.degree() + (double)(ilog2( euclideanNorm(f)+1 ) + 1) / (double)ilog2(p)) + 1; } //}}}
Note: See TracChangeset for help on using the changeset viewer.