2 #ifndef _synaps_usolve_contfrac_lower_bound_h_
3 #define _synaps_usolve_contfrac_lower_bound_h_
21 template <
typename Poly >
25 typedef typename Poly::value_type RT;
36 RT lowerBoundN =-1, lowerBoundD=1;
38 for(
int i=1; i <= deg; i++){
39 if(sn *
sign(bz[i]) < 0){
45 if(lowerBoundN * deg *(bz[0]-bz[i]) > bz[0]*i*lowerBoundD
46 || lowerBoundN == -1){
47 lowerBoundN = bz[0]*i;
48 lowerBoundD = deg*(bz[0]-bz[i]);
52 lowerBoundD -= lowerBoundN;
56 else if(lowerBoundN == lowerBoundD)
59 return pow( RT(2), K);
67 #endif //_synaps_usolve_contfrac_lower_bound_h_
T pow(const T &a, int i)
Definition: binomials.hpp:12
dynamic_exp< E >::degree_t degree(const dynamic_exp< E > &t)
Definition: dynamicexp.hpp:191
Definition: contfrac_lowerbound.hpp:19
long int bit_size(const ZZ &z)
Definition: GMPXX.hpp:32
int sign(const QQ &a)
Definition: GMP.hpp:60
void assign(A &a, const B &b)
Generic definition of the assignement function.
Definition: assign.hpp:97
Definition: tensor_bernstein.hpp:13
Poly::value_type lower_bound(const Poly &f)
Definition: contfrac_lowerbound.hpp:22