realroot_doc 0.1.1
|
unsigned long int mmx::meta::bitsize | ( | const T & | a | ) |
Definition at line 94 of file contfrac.hpp.
References mmx::log().
Referenced by Kioustelidis_bound_1::foo().
{ return std::log( static_cast<double>(a)); }
unsigned long int mmx::meta::bitsize | ( | const ::__gmp_expr< T, U > & | a | ) | [inline] |
Definition at line 117 of file contfrac.hpp.
{
return mpz_sizeinbase( mpz_class( a).get_mpz_t(), 2 );
}
void mmx::meta::do_scale | ( | IntervalData< RT, Poly > & | ID, |
long | k | ||
) | [inline] |
Definition at line 128 of file contfrac.hpp.
References IntervalData< RT, Poly >::a, assert, IntervalData< RT, Poly >::c, mmx::degree(), IntervalData< RT, Poly >::p, and times_2_to_k().
Referenced by mmx::CF_positive().
{ assert( k > 0 ); for (int i = 0; i <= degree( ID.p); ++i) { times_2_to_k( ID.p[i], ID.p[i], k*i); } times_2_to_k( ID.a, ID.a, k); times_2_to_k( ID.c, ID.c, k); }
void mmx::meta::times_2_to_k | ( | ::__gmp_expr< T, U > & | r, |
const ::__gmp_expr< T, U > & | a, | ||
long | k = 1 |
||
) | [inline] |
Definition at line 111 of file contfrac.hpp.
{ mpz_mul_2exp( r.get_mpz_t(), a.get_mpz_t(), k ); }
void mmx::meta::times_2_to_k | ( | T & | r, |
const T & | a, | ||
long | k = 1 |
||
) |
Definition at line 87 of file contfrac.hpp.
Referenced by mmx::CF_positive(), and do_scale().
{ r = a << k; }
mpz_class mmx::meta::times_2_to_k | ( | const ::__gmp_expr< T, U > & | a, |
long | k = 1 |
||
) | [inline] |
Definition at line 103 of file contfrac.hpp.
{
mpz_class b;
mpz_mul_2exp( b.get_mpz_t(), a.get_mpz_t(), k );
return b;
}