Developer documentation

contfrac.hpp
Go to the documentation of this file.
1 /*******************************************************************
2  * This file is part of the source code of the realroot kernel.
3  * Author(s):
4  * E. Tsigaridas <et@di.uoa.gr>
5  * Department of Informatics and Telecommunications
6  * University of Athens (Greece).
7  * Modification:
8  * B. Mourrain, GALAAD, INRIA
9  * V. Sharma, GALAAD, INRIA
10  ********************************************************************/
11 
12 
13 #ifndef _realroot_SOLVE_CONTFRAC_HPP_
14 #define _realroot_SOLVE_CONTFRAC_HPP_
15 
16 #include <realroot/Interval.hpp>
17 //#include <realroot/traits.hpp>
18 #include <realroot/upoldse.hpp>
19 #include <realroot/upoldse_bound.hpp>
20 #include <realroot/sign.hpp>
21 #include <realroot/Seq.hpp>
22 
25 
26 
27 
28 namespace mmx {
29 
30 
31  namespace meta {
32 
34  {
35 
36  public:
40 
41 
42  template <typename NT>
43  long upper( const upoldse<NT>& p)
44  {
45  return foo( p.begin(), p.end());
46  // return foo( begin( p), end( p));
47  }
48 
49  template <typename NT>
50  long lower( const upoldse<NT>& p)
51  {
52  return -foo( p.rbegin(), p.rend());
53  }
54 
55  template <class IT>
56  long foo( IT first, IT last)
57  {
58  typedef typename std::iterator_traits<IT>::difference_type size_type;
59 
60  size_type deg = std::distance( first, last);
61  assert( deg > 0 );
62 
63  int s = sign( *(last-1));
64  long lan = bitsize( *(last-1));
65 
66  bool first_time = true;
67  long maxpow = 0;
68 
69  int i = 1;
70  for ( IT it = (last-2); it != first-1; --it, ++i) {
71  if ( s * sign( *it) < 0) {
72  long p = bitsize( abs( *it)) - lan - 1;
73  long q = p / i;
74  if ( first_time ) {
75  first_time = false;
76  maxpow = q + 2;
77  } else {
78  maxpow = std::max( maxpow, q + 2);
79  }
80  }
81  }
82  return maxpow;
83  }
84  };
85 
86  template <typename T>
87  void times_2_to_k( T& r, const T& a, long k = 1)
88  {
89  r = a << k;
90 
91  }
92 
93  template <typename T>
94  unsigned long int bitsize( const T& a)
95  {
96  return std::log( static_cast<double>(a));
97  }
98 
99 #define __GMP_EXPR ::__gmp_expr<T, U>
100 #define TMPL template <class T, class U> inline
101 
102  TMPL
103  mpz_class times_2_to_k( const __GMP_EXPR& a, long k = 1)
104  {
105  mpz_class b;
106  mpz_mul_2exp( b.get_mpz_t(), a.get_mpz_t(), k );
107  return b;
108  }
109 
110  TMPL
111  void times_2_to_k( __GMP_EXPR& r, const __GMP_EXPR& a, long k = 1)
112  {
113  mpz_mul_2exp( r.get_mpz_t(), a.get_mpz_t(), k );
114  }
115 
116  TMPL
117  unsigned long int bitsize( const __GMP_EXPR& a)
118  {
119  return mpz_sizeinbase( mpz_class( a).get_mpz_t(), 2 );
120  }
121 
122 #undef TMPL
123 #undef __GMP_EXPR
124 
125 
126 
127  template < typename RT, typename Poly > inline
128  void do_scale( IntervalData<RT,Poly>& ID, long k)
129  {
130  assert( k > 0 );
131 
132  for (int i = 0; i <= degree( ID.p); ++i) {
133  times_2_to_k( ID.p[i], ID.p[i], k*i);
134  }
135  times_2_to_k( ID.a, ID.a, k);
136  times_2_to_k( ID.c, ID.c, k);
137  }
138 
139  } //meta
140 
141 
142  template<class C> typename meta::rationalof<C>::T to_rational(const C& a, const C& b)
143  {
144  typedef typename meta::rationalof<C>::T rational;
145  return (rational(a)/b);
146  }
147 
149  template < class NT , class LowerBound = AkritasBound<NT> >
150  struct ContFrac_t
151  {
152  typedef NT RT;
153  typedef typename meta::rationalof<RT>::T FT;
154  typedef Interval<FT> FIT;
156  typedef upoldse<NT> Poly;
157  typedef LowerBound bound;
159  };
160 
161 
162  template < class NT, class LB > inline
165  {
166  typedef ContFrac<NT,LB> K;
167  typedef typename K::root_t root_t;
168 
169  Seq<root_t> sol;
170  // std::cout << "**In this" << std::endl;
171  solve_contfrac(f, std::back_inserter(sol.rep()), K());
172  // std::stable_sort( sol.begin(), sol.end(), ALGEBRAIC::Refine_compare());
173 
174  return sol;
175  }
176 
177 
178  template < typename K >
179  void
180  CF_positive( const typename K::Poly& f, Seq< typename K::FIT>& RL, bool posneg, K)
181  {
182  // std::cout << __FUNCTION__ << std::endl;
183  typedef typename K::RT RT;
184  typedef typename K::FT FT;
185  typedef typename K::FT rational_t;
186  typedef typename K::FIT FIT;
187  typedef typename K::Poly Poly;
188 
190 
192 
193 
194  int iters = 0;
195  const RT One( 1);
196  FT Zero(0);
197 
198  // FT B = bound_root( f, Cauchy<RT>());
199 
200  FT B = meta::times_2_to_k( RT( 1), bound.upper( f));
201 
202 
203  unsigned long s = sign_variation(f);
204 
205  if ( s == 0 ) { return; }
206  if ( s == 1 ) {
207  // std::cout << "A) Sign variation: 1"<<std::endl;;
208  if ( posneg )
209  {
210  // std::cout<<to_FIT( FT(0), B)<<std::endl;;
211  RL.push_back( to_FIT( FT(0), B));
212  }
213  else RL.push_back( to_FIT( FT(0), FT(-B)));
214  return;
215  }
216  Poly X(2, AsSize()); X[1] = RT(1); X[0]=RT(0);
217 
218  std::stack< IntervalData > S;
219  if ( posneg) S.push( IntervalData( 1, 0, 0, 1, f, s));
220  else S.push( IntervalData( -1, 0, 0, 1, f, s));
221 
222  while ( !S.empty() ) {
223  ++iters;
224  IntervalData ID = S.top();
225  S.pop();
226 
227  //std::cout << "Polynomial is " << ID.p << std::endl;
228  // Steps 3 - 4: Choose the method for computing the lower bound
229 
230 
231  //typename K::bound Bd;
232  // Cauchy<RT> Bd;
233  //HongBound<RT> Bd;
234 
235 
236  // RT M = Bd.upper(ID.p);
237  // scale(ID,M);
238  // reverse(ID);
239  // translate_by_1(ID);
240  // reverse(ID);
241 
242  // Interval<rational_t> q=Bd.range(ID.p);
243  // std::cout<<"Sign var: "<< sign_variation(ID.p)<<" ";
244  // RT a, b;
245  // if(q<0)
246  // {
247  // continue;
248  // }
249  // else if(q!=0)
250  // {
251  // a=numerator(q.lower());
252  // b=denominator(q.lower());
253  // inv_scale(ID,b);
254  // shift(ID, a);
255  // scale(ID,b);
256  // let::assign(a,rational_t(q.upper()-q.lower()));
257  // shift(ID,a);
258  // a=One;
259  // }
260 
261  // std::cout<<"("<< sign_variation(ID.p)<<")"<<std::endl;;
262 
263 
264  // RT a = Bd.lower(ID.p);
265  //long k = bound.lower( ID.p);
266  long k = AkritasBound<RT>().lower_power_2( ID.p);
267  // std::cout << "k: " << k << std::endl;
268  // std::cout<< "\t Lower bound is "<< a<< std::endl;
269 
270  if (k > 0) {
271  meta::do_scale( ID, k);
272  }
273 
274  // if ( a > One ) { scale(ID,a); a = One; }
275 
276  // Step 5 //
277  // if ( a >= One )
278  if ( k >= 0 ) {
279  shift_by_1(ID);
280  //shift(ID, a);
281 
282  if ( ID.p[0] == RT(0)) {
283  RL.push_back( to_FIT( to_rational( ID.b, ID.d), to_rational( ID.b, ID.d )));
284  ID.p /= X;
285  }
286  ID.s = sign_variation( ID.p);
287  if ( ID.s == 0 ) { continue; }
288  if ( ID.s == 1 ) {
289  // std::cout << "B) Sign variation: 1"<<std::endl;
290  RL.push_back( to_FIT<K>( ID.a, ID.b, ID.c, ID.d, B));
291  continue;
292  }
293  }
294 
295  // Step 6
296  IntervalData I1;
297  shift_by_1( I1, ID);
298 
299  unsigned long r = 0;
300 
301  if (I1.p[0] == RT(0)) {
302  // std::cout << "Zero at end point"<<std::endl;;
303  RL.push_back( to_FIT( to_rational( I1.b, I1.d), to_rational(I1.b, I1.d) ));
304  I1.p /= X;
305  r = 1;
306  }
307  I1.s = sign_variation( I1.p);
308 
309  IntervalData I2;
310 
311  I2.s = ID.s - I1.s - r;
312 
313  I2.a = ID.b;
314  I2.b = ID.a + ID.b;
315  I2.c = ID.d;
316  I2.d = ID.c + ID.d;
317 
318  // Step 7;
319  if ( I2.s > 1 ) {
320  //p2 = p2( 1 / (x+1));
321  reverse( I2.p, ID.p);
322  shift_by_1( I2.p);
323 
324  if ( I2.p[0] == 0) {
325  I2.p /= X;
326  }
327  I2.s = sign_variation( I2.p);
328  }
329 
330  // Step 8
331  if ( I1.s < I2.s ) {
332  std::swap( I1, I2);
333  }
334 
335  // Step 9
336  if ( I1.s == 1 ) {
337  // std::cout << "C) Sign variation: 1"<<std::endl;;
338  RL.push_back( to_FIT<K>( I1.a, I1.b, I1.c, I1.d, B));
339  } else if ( I1.s > 1) {
340  S.push( IntervalData( I1.a, I1.b, I1.c, I1.d, I1.p, I1.s));
341  }
342 
343  // Step 10
344  if ( I2.s == 1 ) {
345  // std::cout << "D) Sign variation: 1"<<std::endl;;
346  RL.push_back( to_FIT<K>( I2.a, I2.b, I2.c, I2.d, B));
347  } else if ( I2.s > 1) {
348  S.push( IntervalData( I2.a, I2.b, I2.c, I2.d, I2.p, I2.s));
349  }
350  } // while
351  // std::cout << "-------------------- iters: " << iters << std::endl;
352  return;
353  }
354 
355  // A continued fraction algorithm that combines the Descartes method and
356  // Akritas' algorithm. The basic idea is to take the better of performing
357  // a Taylor shift or subdividing into half.
358  template < typename K >
359  void
360  MCF_positive( const typename K::Poly& f, Seq< typename K::root_t>& RL, bool posneg, K)
361  {
362  // std::cout << __FUNCTION__ << std::endl;
363  typedef typename K::RT RT;
364  typedef typename K::FT FT;
365  typedef typename K::root_t FIT;
366  typedef typename K::Poly Poly;
367 
369 
370  int iters = 0;
371  //std::cout <<"Polynomial is "<< f << std::endl;
372 
373  FT B = bound_root( f, Cauchy<FT>());
374  // std::cout << "Upper bound is "<< B << " Positive or negative " << posneg << std::endl;
375  unsigned long s = sign_variation( f);
376  if ( s == 0 ) { return; }
377  if ( s == 1 ) {
378  if ( posneg ) RL.push_back( to_FIT( FT(0), B));
379  else RL.push_back( to_FIT( FT(0), FT(-B)));
380  return;
381  }
382 
383  Poly X(2, AsSize()); X[1] = RT(1);
384 
385  std::stack< IntervalData > S;
386  if ( posneg) S.push( IntervalData( 1, 0, 0, 1, f, s));
387  else S.push( IntervalData( -1, 0, 0, 1, f, s));
388 
389  IntervalData ID, I1, I2;// ID is the data associated with the parent and
390  // I1, I2 are the data associated with its children
391 
392  RT lowerBound;
393  FT midpoint; // The point corresponding to the midpoint of the interval
394  // with endpoints (a/c), (b/d).
395  FT temp; // A temporary variable
396  unsigned long mult = 0; // multiplicity of an exact root.
397 
398  while ( !S.empty() ) {
399  ++iters;
400  ID = S.top();
401  S.pop();
402  // std::cout <<"Transformation is " << ID.a << ":" << ID.b << ":"<< ID.c << ":" << ID.d << std::endl;
403 
404  // Steps 3 - 4
405  lowerBound = CauchyMinimumBound( ID.p);
406  std::cout << "lower bound is "<< lowerBound << std::endl;
407 
408  if(ID.c == 0){// then ID.a is not equal to zero
409  midpoint = FT(ID.d * B - ID.b*sign(ID.a), 2* abs(ID.a));
410  //std::cout << "Midpoint = " << midpoint << std::endl;
411  }else if (ID.d > ID.c ){
412  midpoint = FT(ID.d, ID.c);
413  }else{}
414 
415  if(midpoint < 1) midpoint = 1;
416  std::cout << "Midpoint = " << midpoint << std::endl;
417 
418  if(lowerBound >= midpoint){
419  if ( lowerBound > 1 ) {
420  UPOLDSE::scale( ID.p, ID.p, lowerBound);
421  ID.a *= lowerBound;
422  ID.c *= lowerBound;
423  lowerBound = 1;
424  }
425 
426  if ( lowerBound == 1 ) {
427  shift_by_1( ID.p, ID.p);// If we scaled above then this is required
428  ID.b += ID.a; // to bring the origin to lowerBound
429  ID.d += ID.c;
430 
431  if ( ID.p[0] == RT(0)) {
432  RL.push_back( to_FIT( FT( ID.b, ID.d), FT( ID.b, ID.d)));
433  ID.p /= X;
434  }
435  ID.s = sign_variation( ID.p);
436  if ( ID.s == 0 ) { continue; }
437  if ( ID.s == 1 ) {
438  RL.push_back( to_FIT<K>( ID.a, ID.b, ID.c, ID.d, B));
439  continue;
440  }
441  }
442 
443  shift_by_1( I1.p, ID.p);
444  I1.a = ID.a;
445  I1.b = ID.a + ID.b;
446  I1.c = ID.c;
447  I1.d = ID.c + ID.d;
448 
449  if (I1.p[0] == RT(0)) {
450  RL.push_back( to_FIT( FT( I1.b, I1.d), FT( I1.b, I1.d)));
451  I1.p /= X;
452  mult = 1;
453  }
454  I1.s = sign_variation( I1.p);
455 
456  I2.s = ID.s - I1.s - mult;
457  I2.a = ID.b;
458  I2.b = ID.a + ID.b;
459  I2.c = ID.d;
460  I2.d = ID.c + ID.d;
461 
462  if ( I2.s > 1 ) {
463  //p2 = p2( 1 / (x+1));
464  reverse( I2.p, ID.p);
465  shift_by_1( I2.p);
466  }
467  }else{// midpoint > lowerbound, so perform subdivision like the Descartes method
468  // Construct the polynomial p(X+midpoint)
469  // std::cout << "Performing shift by midpoint " << std::endl;
470  UPOLDSE::shift(I1.p, ID.p, RT(midpoint));
471  I1.a = ID.a;
472  I1.b = ID.a * RT(midpoint) + ID.b;
473  I1.c = ID.c;
474  I1.d = ID.c * RT(midpoint) + ID.d;
475  mult = 0;
476  // std::cout <<"Transformation is " << I1.a << ":" << I1.b << ":"<< I1.c << ":" << I1.d << std::endl;
477 
478  if (I1.p[0] == RT(0)) {
479  RL.push_back( to_FIT( FT( I1.b, I1.d), FT( I1.b, I1.d)));
480  I1.p /= X;
481  mult = 1;
482  }
483  I1.s = sign_variation( I1.p);
484 
485  I2.a = ID.b;
486  I2.b = ID.b + ID.a * RT(midpoint);
487  I2.c = ID.d;
488  I2.d = ID.d + ID.c * RT(midpoint);
489  I2.s = ID.s - I1.s - mult;
490 
491  // std::cout <<"Transformation is " << I2.a << ":" << I2.b << ":"<< I2.c << ":" << I2.d << std::endl;
492  // std::cout << "Predicted sign variations of I2 " << ID.s - I1.s - mult << std::endl;
493 
494  if( I2.s > 1){// Construct the polynomial (X+1)^n p(midpoint/(X+1))
495  // std::cout << "Before scaling by " << RT(midpoint) << "poly is "<< ID.p << std::endl;
496  UPOLDSE::scale( I2.p, ID.p, RT(midpoint));
497  // std::cout << "After scaling poly is "<< I2.p << std::endl;
498  // std::cout << "Sign variations of I2 " << sign_variation(I2.p) << std::endl;
499  reverse(I2.p);
500  // std::cout << "poly is " << I2.p << std::endl;
501  shift_by_1(I2.p);
502  // std::cout << "After shift poly is " << I2.p << std::endl;
503  }
504  }// end of else
505 
506  if(I2.s > 1){
507  if ( I2.p[0] == 0) {//If I2.p[0] = 0 then so is I1.p[0]; so avoid recounting
508  I2.p /= X;
509  }
510  I2.s = sign_variation( I2.p);
511  }
512  // std::cout <<"Sign variations " << I1.s << ":" << I2.s << std::endl;
513 
514  if ( I1.s < I2.s ) {
515  std::swap( I1, I2);
516  }
517 
518  if ( I1.s == 1 ) {
519  RL.push_back( to_FIT<K>( I1.a, I1.b, I1.c, I1.d, B));
520  } else if ( I1.s > 1) {
521  S.push( IntervalData( I1.a, I1.b, I1.c, I1.d, I1.p, I1.s));
522  }
523 
524  if ( I2.s == 1 ) {
525  RL.push_back( to_FIT<K>( I2.a, I2.b, I2.c, I2.d, B));
526  } else if ( I2.s > 1) {
527  S.push( IntervalData( I2.a, I2.b, I2.c, I2.d, I2.p, I2.s));
528  }
529  } // while
530  std::cout << "---------------- iters: " << iters << std::endl;
531  return;
532  }
533 
534 
535 
536  template < typename OutputIterator, typename K >
537  OutputIterator
538  CF_solve( const typename K::Poly& f, OutputIterator sol, int mult, K)
539  {
540  typedef typename K::Poly Poly;
541  typedef typename K::FIT FIT;
542 
543  Seq < FIT > isolating_intervals;
544 
545  // Check if 0 is a root
546  int idx;
547  for (idx = 0; idx <= degree( f); ++idx) {
548  if ( f[idx] != 0 ) break;
549  }
550 
551  Poly p;
552  if ( idx == 0 ) { p = f; }
553  else {
554  p.resize( degree(f) + 1 - idx);
555  for (int j = idx; j <= degree( f); ++j)
556  p[j-idx] = f[j];
557  }
558 
559  //std::cout << "Solving: " << p << std::endl;
560  // Isolate the negative roots
561  for (int i = 1; i <= degree(p); i+=2) p[i] *= -1;
562 
563  CF_positive( p, isolating_intervals, false, K());
564 
565  // std::cout << "Ok negative" << std::endl;
566 
567  // Is 0 a root?
568  if (idx != 0) isolating_intervals.push_back( FIT( 0, 0));
569 
570  // Isolate the positive roots
571  for (int i = 1; i <= degree(p); i+=2) p[i] *= -1;
572 
573  CF_positive( p, isolating_intervals, true, K());
574 
575  // std::cout << "Ok, positive" << std::endl;
576 
577  // sort( isolating_intervals.begin(), isolating_intervals.end(), CompareFIT());
578 
579  // std::cout << "ok sorting" << std::endl;
580 
581  // for (unsigned i = 0 ; i < isolating_intervals.size(); ++i) {
582 // if ( singleton( isolating_intervals[i]) ) {
583 // if ( lower( isolating_intervals[i]) == 0 ) continue;
584 
585 // Poly t( 2, AsSize());
586 // t[1] = denominator( isolating_intervals[i].lower());
587 // t[0] = - numerator( isolating_intervals[i].lower());
588 
589 // Poly dummy;
590 // UPOLDSE::div_rem( dummy, p, t);
591 // p = dummy;
592 // }
593 // }
594 
595  // std::cout << "now p: " << p << ", #nr: " << isolating_intervals.size() << std::endl;
596 
597  // std::cout << "Done...." << std::endl;
598  for (unsigned i = 0 ; i < isolating_intervals.size(); ++i) {*sol++ = isolating_intervals[i];}
599  return sol;
600  }
601 
602 
603 
604 
605 
606  template < typename K,
607  typename OutputIterator > inline
608  OutputIterator
609  solve_contfrac( const typename K::Poly& h, OutputIterator sol, K)
610  {
611  CF_solve( h, sol, 1, K());
612  return sol;
613  }
614 
615 
616 
617 } //namespace mmx
618 
619 
620 #endif // _realroot_SOLVE_CONTFRAC_HPP_
621 
Cauchy bound.
Definition: univariate_bounds.hpp:163
Sequence of terms with reference counter.
Definition: Seq.hpp:28
void resize(size_type i)
Definition: Seq.hpp:169
OutputIterator CF_solve(const typename K::Poly &f, OutputIterator sol, int mult, K)
Definition: contfrac.hpp:538
const C & b
Definition: Interval_glue.hpp:25
Definition: univariate_bounds.hpp:409
TMPL X
Definition: polynomial_operators.hpp:148
dynamic_exp< E >::degree_t degree(const dynamic_exp< E > &t)
Definition: dynamicexp.hpp:191
void shift(IntervalData< RT, Poly > &ID, const RT &a)
Definition: contfrac_intervaldata.hpp:257
long upper(const upoldse< NT > &p)
Definition: contfrac.hpp:43
Interval< FT > root_t
Definition: contfrac.hpp:155
Definition: solver_uv_continued_fraction.hpp:78
OutputIterator solve_contfrac(const typename K::Poly &h, OutputIterator sol, K)
Definition: contfrac.hpp:609
Definition: solver_binary.hpp:51
MP swap(const MP &P, int var_i, int var_j)
Definition: sparse_monomials.hpp:988
Interval< FT > to_FIT(const FT &a, const FT &b)
Definition: contfrac_intervaldata.hpp:103
void scale(IntervalData< RT, Poly > &ID, const RT &a)
Definition: contfrac_intervaldata.hpp:221
self_t & push_back(const C &x)
Definition: Seq.hpp:110
void CF_positive(const typename K::Poly &f, Seq< typename K::FIT > &RL, bool posneg, K)
Definition: contfrac.hpp:180
FT bound_root(const POLY &p, const Cauchy< FT > &m)
Definition: univariate_bounds.hpp:325
upoldse< NT > Poly
Definition: contfrac.hpp:156
Definition: contfrac.hpp:33
#define __GMP_EXPR
Definition: contfrac.hpp:99
RT a
Definition: contfrac_intervaldata.hpp:22
long lower(const upoldse< NT > &p)
Definition: contfrac.hpp:50
#define TMPL
Definition: contfrac.hpp:100
NT RT
Definition: contfrac.hpp:152
void reverse(Poly &R, const Poly &P)
Definition: contfrac_intervaldata.hpp:139
Seq< typename ContFrac< NT, LB >::root_t > solve(const typename ContFrac< NT >::Poly &f, ContFrac< NT, LB >)
Definition: contfrac.hpp:164
RT b
Definition: contfrac_intervaldata.hpp:22
RT c
Definition: contfrac_intervaldata.hpp:22
Definition: contfrac_intervaldata.hpp:17
Definition: xml.hpp:109
unsigned long s
Definition: contfrac_intervaldata.hpp:24
size_type size() const
Definition: Seq.hpp:166
RT d
Definition: contfrac_intervaldata.hpp:22
meta::rationalof< C >::T to_rational(const C &a, const C &b)
Definition: contfrac.hpp:142
void shift_by_1(Poly &R, const Poly &P)
Definition: contfrac_intervaldata.hpp:168
Definition: shared_object.hpp:61
void do_scale(IntervalData< RT, Poly > &ID, long k)
Definition: contfrac.hpp:128
void abs(Interval< C, r > &x, const Interval< C, r > &a)
Definition: Interval_fcts.hpp:185
void MCF_positive(const typename K::Poly &f, Seq< typename K::root_t > &RL, bool posneg, K)
Definition: contfrac.hpp:360
void times_2_to_k(T &r, const T &a, long k=1)
Definition: contfrac.hpp:87
R & rep()
Definition: Seq.hpp:62
Generic class for intervals.
Definition: Interval.hpp:44
ContFrac_t self_t
Definition: contfrac.hpp:158
Class.
Definition: contfrac.hpp:150
Poly p
Definition: contfrac_intervaldata.hpp:23
meta::rationalof< RT >::T FT
Definition: contfrac.hpp:153
double C
Definition: solver_mv_fatarcs.cpp:16
unsigned long int bitsize(const T &a)
Definition: contfrac.hpp:94
long foo(IT first, IT last)
Definition: contfrac.hpp:56
int sign(const QQ &a)
Definition: GMP.hpp:60
LowerBound bound
Definition: contfrac.hpp:157
unsigned sign_variation(Iterator b, Iterator e)
Definition: sign_variation.hpp:27
Interval< T, r > max(const Interval< T, r > &a, const Interval< T, r > &b)
Definition: Interval_fcts.hpp:135
Definition: array.hpp:12
size_t log(const scalar< MPF > &b)
Definition: scalar_floating.hpp:506
Interval< FT > FIT
Definition: contfrac.hpp:154
Kioustelidis_bound_1()
Definition: contfrac.hpp:39
#define assert(expr, msg)
Definition: shared_object.hpp:57
Home