#include <univariate_bounds.hpp>
A lower bound based upon the upper bound given by Hong. This should be the best possible, since Hong's bound is better than Kioustelidis' bound. The problem is that it is a procedure.
Definition at line 357 of file univariate_bounds.hpp.
static RT lower_bound | ( | const Poly & | f | ) | [inline, static] |
Definition at line 360 of file univariate_bounds.hpp.
References mmx::abs(), mmx::bit_size(), mmx::degree(), mmx::univariate::degree(), and mmx::sign().
00361 { 00362 using univariate::degree; 00363 00364 unsigned deg = degree(f); 00365 00366 long lB=0, gB=0; 00367 bool localBoundSet = false, globalBoundSet = false; 00368 long temp, q; 00369 int s = sign(f[0]); 00370 //std::cout << "f[0]= " << f[0] << std::endl; 00371 for(int i= deg; i > 0; i--){ 00372 //std::cout << "f["<< i << "]" << " = " << f[i] << std::endl; 00373 if(sign(f[i]) * s < 0){ 00374 for(int k=i-1; k >= 0; k--){ 00375 if(sign(f[k]) * s > 0){ 00376 temp = bit_size( RT(f[i]) ) - bit_size( RT(f[k]) ) - 1; 00377 q = temp /(i-k); 00378 if(!localBoundSet || lB > q + 2){// Choose the minimum among localBounds 00379 localBoundSet = true; 00380 lB = q+2; 00381 } 00382 } 00383 } 00384 localBoundSet = false; 00385 if(!globalBoundSet || gB < lB){// Choose the maximum among globalBounds 00386 globalBoundSet = true; 00387 gB = lB; 00388 } 00389 } 00390 //std::cout << "Cout gb after " << i << " loop = "<< gB << std::endl; 00391 } 00392 if ( gB+1 < 0 ) return pow2<RT>( abs( gB+1) ); 00393 return 0; 00394 }