realroot_doc 0.1.1
scalar< T > Struct Template Reference

#include <scalar.hpp>

List of all members.

Public Member Functions

Public Attributes


Detailed Description

template<class T>
struct mmx::scalar< T >

The general interface for scalars.

Examples:

solver_uv_all_test.cpp, solver_uv_bernstein_binary_test.cpp, and solver_uv_test.cpp.

Definition at line 24 of file scalar.hpp.


Constructor & Destructor Documentation

scalar ( ) [inline]

Definition at line 37 of file scalar.hpp.

{this->init();};
scalar ( const scalar< T > &  b)
scalar ( const scalar< R > &  x) [inline]

Definition at line 40 of file scalar.hpp.

References mmx::assign().

{ this->init(); let::assign(*this,x); }
scalar ( double  d) [inline]

Definition at line 41 of file scalar.hpp.

References mmx::assign().

                   {this->init();
      let::assign(*this,d);
      //data=T(d);
  };
scalar ( signed long  sl)
scalar ( unsigned long  ul)
scalar ( int  si)
scalar ( unsigned  x) [inline]

Definition at line 48 of file scalar.hpp.

References mmx::assign().

{this->init(); let::assign(*this,x);};
scalar ( const char *  string,
unsigned int  b = 10 
)
~scalar ( ) [inline]

Definition at line 51 of file scalar.hpp.

{}
scalar ( ) [inline]

Definition at line 27 of file scalar_floating.hpp.

References mmx::rep().

                                         {
  //  cout<<"default construct "<<endl;
mpf_init(&rep());}
scalar ( const scalar< MPF > &  rhs) [inline]

Definition at line 32 of file scalar_floating.hpp.

References scalar< T >::rep(), and mmx::rep().

{
  //cout<<"const SCl "<<endl;
  mpf_init_set(&rep(),&rhs.rep()); 
}
scalar ( signed long int  sl) [inline]

Definition at line 48 of file scalar_floating.hpp.

References mmx::rep().

{mpf_init_set_si(&rep(),sl);}
scalar ( unsigned long int  ul) [inline]

Definition at line 51 of file scalar_floating.hpp.

References mmx::rep().

{mpf_init_set_ui(&rep(),ul);}
scalar ( int  si) [inline]

Definition at line 54 of file scalar_floating.hpp.

References mmx::rep().

                                         {
  // cout<<"init set si "<<endl;
mpf_init_set_si(&rep(), si);}
scalar ( const char *  string,
unsigned int  base 
) [inline]

Definition at line 59 of file scalar_floating.hpp.

References mmx::rep().

{
  if (mpf_init_set_str(&rep(), string, base))
    std::cerr << "scalar<MPF>: The string " << string 
              << " is not a valid number in base " << base << std::endl;
}
scalar ( double  d) [inline]

Definition at line 66 of file scalar_floating.hpp.

References mmx::rep().

{
  //cout<<"je passe dans construct double "<<endl;
  mpf_init_set_d(&rep(),d);
}
~scalar ( ) [inline]

Definition at line 72 of file scalar_floating.hpp.

References mmx::rep().

{mpf_clear(&rep());}
~scalar ( ) [inline]

Definition at line 27 of file scalar_integer.hpp.

References mmx::rep().

{ 
  //COUT <<"Delete mpz"<<endl;
  mpz_clear(&rep());
}
scalar ( ) [inline]

Definition at line 40 of file scalar_integer.hpp.

References mmx::rep().

{
  mpz_init(&rep());
}
scalar ( signed long int  sl) [inline]

Definition at line 46 of file scalar_integer.hpp.

References scalar< T >::rep().

: data()  {mpz_init_set_si(&rep(),sl);}
scalar ( unsigned long int  ul) [inline]

Definition at line 49 of file scalar_integer.hpp.

References scalar< T >::rep().

: data() {mpz_init_set_ui(&rep(),ul);}
scalar ( int  si) [inline]

Definition at line 52 of file scalar_integer.hpp.

References scalar< T >::rep().

: data()               {mpz_init_set_si(&rep(), si);}
scalar ( const char *  s,
unsigned int  base 
) [inline]

Definition at line 55 of file scalar_integer.hpp.

References scalar< T >::rep().

                                                    : data()
{
  if (mpz_init_set_str(&rep(), s, base))
    std::cerr << "scalar<MPZ>: The string " << s 
              << " is not a valid number in base " << base << std::endl;
}
scalar ( const scalar< MPZ > &  rhs) [inline]

Definition at line 63 of file scalar_integer.hpp.

References scalar< T >::rep(), and mmx::rep().

{
  //COUT <<"Init mpz"<<endl;
  //COUNT<MPZ>('c');
  mpz_init_set(&rep(), &rhs.rep());      
}
scalar ( ) [inline]

Definition at line 25 of file scalar_rational.hpp.

References mmx::rep().

{mpq_init(&rep());}
~scalar ( ) [inline]

Definition at line 27 of file scalar_rational.hpp.

References mmx::rep().

{mpq_clear(&rep());}
scalar ( int  si) [inline]

Definition at line 30 of file scalar_rational.hpp.

References mmx::rep().

     {mpq_init(&rep());mpq_set_si(&rep(),si,1);}
scalar ( unsigned  si) [inline]

Definition at line 34 of file scalar_rational.hpp.

References mmx::rep().

     {mpq_init(&rep());mpq_set_ui(&rep(),si,1);}
scalar ( const char *  string,
unsigned int  base 
) [inline]

Definition at line 38 of file scalar_rational.hpp.

References mmx::rep().

{
  MP_INT tmp;
  mpz_init_set_str(&tmp, string, base);
  mpq_init(&rep());
  mpq_set_z(&rep(),&tmp);      
}
scalar ( signed long int  sl) [inline]

Definition at line 47 of file scalar_rational.hpp.

References mmx::rep().

     {mpq_init(&rep());mpq_set_si(&rep(),sl,1);}
scalar ( unsigned long int  ul) [inline]

Definition at line 51 of file scalar_rational.hpp.

References mmx::rep().

     {mpq_init(&rep());mpq_set_ui(&rep(),ul,1);}
scalar ( const scalar< MPQ > &  rhs) [inline]

Definition at line 55 of file scalar_rational.hpp.

References scalar< T >::rep(), and mmx::rep().

{
  mpz_init_set(&rep()._mp_num, &rhs.rep()._mp_num); 
  mpz_init_set(&rep()._mp_den, &rhs.rep()._mp_den); 
}
scalar ( double  rhs) [inline]

Definition at line 62 of file scalar_rational.hpp.

References mmx::rep().

{
  mpq_init(&rep());
  mpq_set_d(&rep(), rhs); 
}

Member Function Documentation

void abs ( )
void abs ( ) [inline]

Definition at line 492 of file scalar_integer.hpp.

References mmx::rep().

{
  if (rep()._mp_size < 0)
    rep()._mp_size = - rep()._mp_size;
}
void abs ( ) [inline]

Definition at line 485 of file scalar_floating.hpp.

References mmx::rep().

{
  if (mpf_sgn(&rep()) < 0)
    mpf_neg(&rep(),&rep());
}
void abs ( ) [inline]

Definition at line 502 of file scalar_rational.hpp.

References mmx::rep().

{
  if (rep()._mp_num._mp_size < 0) rep()._mp_num._mp_size = - rep()._mp_num._mp_size;
}
void Div2Exp ( unsigned long  exponent_of_2)
void Div2Exp ( unsigned long  exponent_of_2) [inline]

Definition at line 455 of file scalar_integer.hpp.

References mmx::rep().

{
  mpz_div_2exp(&rep(), &rep(), exponent_of_2);
}
void Div2Exp ( unsigned long  exponent_of_2) [inline]

Definition at line 479 of file scalar_floating.hpp.

References mmx::rep().

{
  mpf_div_2exp(&rep(), &rep(), exponent_of_2);
}
void factorial ( unsigned long  n)

Referenced by mmx::BigIntFactorial().

void factorial ( unsigned long  n) [inline]

Definition at line 499 of file scalar_integer.hpp.

References mmx::rep().

{
  mpz_fac_ui(&rep(), n);
}
void GCD ( const scalar< MPZ > &  b2) [inline]

Definition at line 461 of file scalar_integer.hpp.

References scalar< T >::rep(), and mmx::rep().

{
    mpz_gcd (&rep(), &rep(), &b2.rep());
}
void GCD ( const scalar< T > &  b2)
void Mod2Exp ( unsigned long  exponent_of_2) [inline]

Definition at line 468 of file scalar_integer.hpp.

References mmx::rep().

{
  mpz_mod_2exp(&rep(), &rep(), exponent_of_2);
}
void Mod2Exp ( unsigned long  exponent_of_2)
void Mul2Exp ( unsigned long  exponent_of_2) [inline]

Definition at line 474 of file scalar_integer.hpp.

References mmx::rep().

{
  mpz_mul_2exp(&rep(), &rep(), exponent_of_2);
}
void Mul2Exp ( unsigned long  exponent_of_2)
scalar<T>& negate ( )
scalar< MPZ > & negate ( ) [inline]

Definition at line 505 of file scalar_integer.hpp.

References mmx::rep().

{
  rep()._mp_size = - rep()._mp_size; return *this;
}
scalar< MPQ > & negate ( ) [inline]

Definition at line 508 of file scalar_rational.hpp.

References mmx::rep().

{
  rep()._mp_num._mp_size = - rep()._mp_num._mp_size; return *this;
}
scalar< MPF > & negate ( ) [inline]

Definition at line 492 of file scalar_floating.hpp.

References mmx::rep().

{
  mpf_neg(&rep(),&rep());
  //&rep()._mp_size = - &rep()._mp_size; 
  return *this;
}
bool operator!= ( int  si) const
bool operator!= ( const scalar< MPZ > &  rhs) const [inline]

Definition at line 110 of file scalar_integer.hpp.

References scalar< T >::rep(), and mmx::rep().

{
  return mpz_cmp(&rep(), &rhs.rep()) != 0;
}
bool operator!= ( long  sl) const [inline]

Definition at line 116 of file scalar_integer.hpp.

References mmx::rep().

                                            {
  return mpz_cmp_si(&rep(), sl) != 0;
}
bool operator!= ( int  si) const [inline]

Definition at line 121 of file scalar_integer.hpp.

References mmx::rep().

                                           {
  return mpz_cmp_si(&rep(), (long) si) != 0;
}
bool operator!= ( long  sl) const
bool operator!= ( unsigned long  ul) const [inline]

Definition at line 126 of file scalar_integer.hpp.

References mmx::rep().

{
  return mpz_cmp_ui(&rep(), ul) != 0;
}
bool operator!= ( unsigned long  ul) const
bool operator!= ( long  sl) const [inline]

Definition at line 104 of file scalar_floating.hpp.

References mmx::rep().

                                            {
  return mpf_cmp_si(&rep(), sl) != 0;
}
bool operator!= ( int  si) const [inline]

Definition at line 109 of file scalar_floating.hpp.

References mmx::rep().

                                           {
  return mpf_cmp_si(&rep(), (long) si) != 0;
}
bool operator!= ( const scalar< MPF > &  rhs) const [inline]

Definition at line 98 of file scalar_floating.hpp.

References scalar< T >::rep(), and mmx::rep().

{
  return mpf_cmp(&rep(), &rhs.rep()) != 0;
}
bool operator!= ( unsigned long  ul) const [inline]

Definition at line 114 of file scalar_floating.hpp.

References mmx::rep().

{
  return mpf_cmp_ui(&rep(), ul) != 0;
}
bool operator!= ( const scalar< MPQ > &  rhs) const [inline]

Definition at line 105 of file scalar_rational.hpp.

References scalar< T >::rep(), and mmx::rep().

{
  return mpq_cmp(&rep(), &rhs.rep()) != 0;
}
bool operator!= ( long  sl) const [inline]

Definition at line 111 of file scalar_rational.hpp.

References assert, and mmx::rep().

                                            {
  assert(sl>=0);
  return mpq_cmp_ui(&rep(), sl,1) != 0;
}
bool operator!= ( int  si) const [inline]

Definition at line 117 of file scalar_rational.hpp.

References assert, and mmx::rep().

                                           {
  assert(si>=0);
  return mpq_cmp_ui(&rep(), (long) si,1) != 0;
}
bool operator!= ( unsigned long  ul) const [inline]

Definition at line 123 of file scalar_rational.hpp.

References mmx::rep().

{
  return mpq_cmp_ui(&rep(), ul,1) != 0;
}
bool operator!= ( const scalar< T > &  rhs) const
scalar<T>& operator%= ( const scalar< T > &  rhs)
scalar<T>& operator%= ( unsigned  rhs)
scalar< MPZ > & operator%= ( const scalar< MPZ > &  rhs) [inline]

Definition at line 363 of file scalar_integer.hpp.

References scalar< T >::rep(), and mmx::rep().

{
  mpz_mod(&rep(), &rep(), &rhs.rep()); return *this;
}
scalar< MPZ > & operator%= ( unsigned long  ul) [inline]

Definition at line 369 of file scalar_integer.hpp.

References mmx::rep().

{
  mpz_mod_ui(&rep(), &rep(), ul); return *this;
}
scalar<T>& operator%= ( int  rhs)
scalar<T>& operator%= ( unsigned long  rhs)
scalar<T>& operator*= ( unsigned  rhs)
scalar< MPZ > & operator*= ( const scalar< MPZ > &  rhs) [inline]

Definition at line 302 of file scalar_integer.hpp.

References scalar< T >::rep(), and mmx::rep().

{
  mpz_mul(&rep(), &rep(), &rhs.rep()); return *this;
}
scalar< MPZ > & operator*= ( unsigned long  ul) [inline]

Definition at line 307 of file scalar_integer.hpp.

References mmx::rep().

{
  mpz_mul_ui(&rep(), &rep(), ul); return *this;
}
scalar<T>& operator*= ( int  rhs)
scalar< MPZ > & operator*= ( long  sl) [inline]

Definition at line 312 of file scalar_integer.hpp.

References mmx::rep().

{
  if (sl >= 0)
    mpz_mul_ui(&rep(), &rep(), (unsigned long) sl);
  else
    {
      rep()._mp_size = -rep()._mp_size;
      mpz_mul_ui(&rep(), &rep(), ((unsigned long) -sl));
    }
  return *this; 
}
scalar< MPZ > & operator*= ( int  ul) [inline]

Definition at line 324 of file scalar_integer.hpp.

References mmx::rep().

{
   if (ul >= 0)
     mpz_mul_ui(&rep(), &rep(), (unsigned long) ul);
   else {
     mpz_mul_ui(&rep(), &rep(), (unsigned long) (-ul));
     mpz_neg(&rep(), &rep());
   }
   return *this;
}
scalar< MPQ > & operator*= ( unsigned long  ul) [inline]

Definition at line 330 of file scalar_rational.hpp.

References mmx::rep().

{
  mpq_mul(&rep(), &rep(), &scalar<MPQ>(ul).rep()); 
  return *this;
}
scalar<T>& operator*= ( const scalar< T > &  rhs)
scalar<T>& operator*= ( unsigned long  rhs)
scalar<T>& operator*= ( double  rhs)
scalar< MPF > & operator*= ( unsigned long  ul) [inline]

Definition at line 300 of file scalar_floating.hpp.

References mmx::rep().

{
  mpf_mul_ui(&rep(), &rep(), ul); return *this;
}
scalar< MPQ > & operator*= ( const scalar< MPQ > &  rhs) [inline]

Definition at line 317 of file scalar_rational.hpp.

References scalar< T >::rep(), and mmx::rep().

{
  mpq_mul(&rep(), &rep(), &rhs.rep()); 
  return *this;
}
scalar< MPF > & operator*= ( long  sl) [inline]

Definition at line 305 of file scalar_floating.hpp.

References mmx::rep().

{
  if (sl >= 0)
    mpf_mul_ui(&rep(), &rep(), (unsigned long) sl);
  else
    {
      mpf_neg(&rep(),&rep());
      mpf_mul_ui(&rep(), &rep(),(unsigned long)(-sl));
    }
  return *this; 
}
scalar< MPQ > & operator*= ( int  ul) [inline]

Definition at line 324 of file scalar_rational.hpp.

References mmx::rep().

{
  mpq_mul(&rep(), &rep(), &scalar<MPQ>(ul).rep()); 
  return *this;
}
scalar< MPF > & operator*= ( double  d) [inline]

Definition at line 317 of file scalar_floating.hpp.

{
  return *this*=(scalar<MPF>)d;
}
scalar< MPF > & operator*= ( const scalar< MPF > &  rhs) [inline]

Definition at line 295 of file scalar_floating.hpp.

References scalar< T >::rep(), and mmx::rep().

{
  mpf_mul(&rep(), &rep(), &rhs.rep()); return *this;
}
scalar< MPF > & operator*= ( int  ul) [inline]

Definition at line 323 of file scalar_floating.hpp.

References mmx::rep().

{
   if (ul >= 0)
     mpf_mul_ui(&rep(), &rep(), (unsigned long) ul);
   else {
     mpf_mul_ui(&rep(), &rep(), (unsigned long) (-ul));
     mpf_neg(&rep(), &rep());
   }
   return *this;
}
scalar<T>& operator*= ( long  rhs)
scalar< MPQ > & operator*= ( long  sl) [inline]

Definition at line 336 of file scalar_rational.hpp.

References mmx::rep().

{
  mpq_mul(&rep(), &rep(), &scalar<MPQ>(sl).rep());
  //mpq_canonicalize(&rep());
  return *this; 
}
void operator++ ( ) [inline]

Definition at line 418 of file scalar_integer.hpp.

References mmx::rep().

{
  mpz_add_ui(&rep(), &rep(), 1);
}
void operator++ ( ) [inline]

Definition at line 456 of file scalar_rational.hpp.

References mmx::rep().

{
  mpq_add(&rep(), &rep(), &scalar<MPQ>(1).rep());
  //mpq_canonicalize(&rep());
}
void operator++ ( )
void operator++ ( ) [inline]

Definition at line 421 of file scalar_floating.hpp.

References mmx::rep().

{
  mpf_add_ui(&rep(), &rep(), 1);
}
scalar<T>& operator+= ( unsigned  rhs)
scalar< MPZ > & operator+= ( const scalar< MPZ > &  rhs) [inline]

Definition at line 245 of file scalar_integer.hpp.

References scalar< T >::rep(), and mmx::rep().

{
  mpz_add(&rep(), &rep(), &rhs.rep());  return *this;
}
scalar< MPZ > & operator+= ( unsigned long  ul) [inline]

Definition at line 251 of file scalar_integer.hpp.

References mmx::rep().

{
  mpz_add_ui(&rep(), &rep(), ul); return *this;
}
scalar< MPZ > & operator+= ( long  sl) [inline]

Definition at line 257 of file scalar_integer.hpp.

References mmx::rep().

{
  if (sl >= 0)
    mpz_add_ui(&rep(), &rep(), (unsigned long) sl);
  else
    mpz_sub_ui(&rep(), &rep(), ((unsigned long) -sl));
  return *this;
}
scalar< MPZ > & operator+= ( int  ul) [inline]

Definition at line 267 of file scalar_integer.hpp.

{
  *this += scalar<MPZ>(ul);  return *this;
}
scalar<T>& operator+= ( int  rhs)
scalar<T>& operator+= ( unsigned long  rhs)
scalar<T>& operator+= ( double  rhs)
scalar< MPF > & operator+= ( const scalar< MPF > &  rhs) [inline]

Definition at line 233 of file scalar_floating.hpp.

References mmx::rep(), and scalar< T >::rep().

{
  scalar<MPF> tmp;
  //mpf_init(tmp.&rep());
  mpf_add(&tmp.rep(), &rep(), &rhs.rep());  
  mpf_swap(&tmp.rep(),&rep());
  return *this;

}
scalar< MPF > & operator+= ( unsigned long  ul) [inline]

Definition at line 244 of file scalar_floating.hpp.

References mmx::rep().

{
  mpf_add_ui(&rep(), &rep(), ul); return *this;
}
scalar< MPF > & operator+= ( long  sl) [inline]

Definition at line 250 of file scalar_floating.hpp.

References mmx::rep().

{
  if (sl >= 0)
    mpf_add_ui(&rep(), &rep(), (unsigned long) sl);
  else
    mpf_sub_ui(&rep(), &rep(), ((unsigned long) -sl));
  return *this;
}
scalar< MPF > & operator+= ( int  ul) [inline]

Definition at line 260 of file scalar_floating.hpp.

{
  *this += scalar<MPF>(ul);  return *this;
}
scalar<T>& operator+= ( long  rhs)
scalar< MPQ > & operator+= ( const scalar< MPQ > &  rhs) [inline]

Definition at line 249 of file scalar_rational.hpp.

References mmx::rep(), and scalar< T >::rep().

{
  scalar<MPQ> tmp;
  mpq_add(&tmp.rep(), &rep(), &rhs.rep());  
  mpq_swap(&tmp.rep(),&rep());
  //  mpq_canonicalize(&rep());
  return *this;
}
scalar< MPQ > & operator+= ( unsigned long  ul) [inline]

Definition at line 259 of file scalar_rational.hpp.

References mmx::rep().

{
  mpq_add(&rep(), &rep(), &scalar<MPQ>(ul).rep());
  //  mpq_canonicalize(&rep());
  return *this;
}
scalar< MPQ > & operator+= ( long  sl) [inline]

Definition at line 267 of file scalar_rational.hpp.

References mmx::rep().

{
  mpq_add(&rep(), &rep(), &scalar<MPQ>(sl).rep());
  //mpq_canonicalize(&rep());
  return *this;
}
scalar< MPQ > & operator+= ( int  ul) [inline]

Definition at line 275 of file scalar_rational.hpp.

{
  scalar<MPQ> tmp(ul);
  *this += tmp;  
  //mpq_canonicalize(&rep());
  return *this;
}
scalar<T>& operator+= ( const scalar< T > &  rhs)
void operator-- ( ) [inline]

Definition at line 425 of file scalar_integer.hpp.

References mmx::rep().

{
  mpz_sub_ui(&rep(), &rep(), 1);
}
void operator-- ( )
void operator-- ( ) [inline]

Definition at line 428 of file scalar_floating.hpp.

References mmx::rep().

{
  mpf_sub_ui(&rep(), &rep(), 1);
}
void operator-- ( ) [inline]

Definition at line 464 of file scalar_rational.hpp.

References mmx::rep().

{
  mpq_sub(&rep(), &rep(), &scalar<MPQ>(1).rep());
  //mpq_canonicalize(&rep());
}
scalar<T>& operator-= ( long  rhs)
scalar< MPF > & operator-= ( unsigned long  ul) [inline]

Definition at line 273 of file scalar_floating.hpp.

References mmx::rep().

{
  mpf_sub_ui(&rep(), &rep(), ul); return *this;
}
scalar< MPF > & operator-= ( long  sl) [inline]

Definition at line 279 of file scalar_floating.hpp.

References mmx::rep().

{
  if (sl >= 0)
    mpf_sub_ui(&rep(), &rep(), (unsigned long) sl);
  else
    mpf_add_ui(&rep(), &rep(), (unsigned long) sl);
  return *this;
}
scalar<T>& operator-= ( unsigned  rhs)
scalar<T>& operator-= ( int  rhs)
scalar< MPZ > & operator-= ( const scalar< MPZ > &  rhs) [inline]

Definition at line 274 of file scalar_integer.hpp.

References scalar< T >::rep(), and mmx::rep().

{
  mpz_sub(&rep(), &rep(), &rhs.rep()); return *this;
}
scalar< MPZ > & operator-= ( unsigned long  ul) [inline]

Definition at line 280 of file scalar_integer.hpp.

References mmx::rep().

{
  mpz_sub_ui(&rep(), &rep(), ul); return *this;
}
scalar< MPZ > & operator-= ( long  sl) [inline]

Definition at line 286 of file scalar_integer.hpp.

References mmx::rep().

{
  if (sl >= 0)
    mpz_sub_ui(&rep(), &rep(), (unsigned long) sl);
  else
    mpz_add_ui(&rep(), &rep(), (unsigned long) sl);
  return *this;
}
scalar< MPZ > & operator-= ( int  ul) [inline]

Definition at line 296 of file scalar_integer.hpp.

{
  *this -= scalar<MPZ>(ul); return *this;
}
scalar< MPQ > & operator-= ( long  sl) [inline]

Definition at line 301 of file scalar_rational.hpp.

References mmx::rep().

{
  mpq_sub(&rep(), &rep(), &scalar<MPQ>(sl).rep());
  //mpq_canonicalize(&rep());
  return *this;
}
scalar<T>& operator-= ( unsigned long  rhs)
scalar< MPF > & operator-= ( int  ul) [inline]

Definition at line 289 of file scalar_floating.hpp.

{
  *this -= scalar<MPF>(ul); return *this;
}
scalar< MPF > & operator-= ( const scalar< MPF > &  rhs) [inline]

Definition at line 267 of file scalar_floating.hpp.

References scalar< T >::rep(), and mmx::rep().

{
  mpf_sub(&rep(), &rep(), &rhs.rep()); return *this;
}
scalar< MPQ > & operator-= ( unsigned long  ul) [inline]

Definition at line 293 of file scalar_rational.hpp.

References mmx::rep().

{
  mpq_sub(&rep(), &rep(), &scalar<MPQ>(ul).rep()); 
  //mpq_canonicalize(&rep());
  return *this;
}
scalar< MPQ > & operator-= ( int  ul) [inline]

Definition at line 309 of file scalar_rational.hpp.

{
  *this -= scalar<MPQ>(ul); 
  //mpq_canonicalize(&rep());
  return *this;
}
scalar<T>& operator-= ( const scalar< T > &  rhs)
scalar< MPQ > & operator-= ( const scalar< MPQ > &  rhs) [inline]

Definition at line 285 of file scalar_rational.hpp.

References scalar< T >::rep(), and mmx::rep().

{
  mpq_sub(&rep(), &rep(), &rhs.rep()); 
  //mpq_canonicalize(&rep());
  return *this;
}
scalar< MPQ > & operator/= ( long int  sl) [inline]

Definition at line 373 of file scalar_rational.hpp.

References mmx::rep().

{
  
  mpq_div(&rep(), &rep(),  &scalar<MPQ>(sl).rep());
  //mpq_canonicalize(&rep());
  return *this;
}
scalar<T>& operator/= ( unsigned  rhs)
scalar< MPZ > & operator/= ( const scalar< MPZ > &  rhs) [inline]

Definition at line 336 of file scalar_integer.hpp.

References scalar< T >::rep(), and mmx::rep().

{
  mpz_div(&rep(), &rep(), &rhs.rep());
  //mpz_divexact(&rep(), &rep(), &rhs.rep()); 
  return *this;
}
scalar< MPZ > & operator/= ( unsigned long  ul) [inline]

Definition at line 343 of file scalar_integer.hpp.

References mmx::rep().

{
  mpz_div_ui(&rep(), &rep(), ul); return *this;
}
scalar< MPZ > & operator/= ( long  sl) [inline]

Definition at line 349 of file scalar_integer.hpp.

References mmx::rep().

{
  if (sl >= 0)
    mpz_div_ui(&rep(), &rep(), (unsigned long) sl);
  else
    {
      rep()._mp_size = -rep()._mp_size;
      mpz_div_ui(&rep(), &rep(), ((unsigned long) -sl));
    }
  return *this;
}
scalar<T>& operator/= ( int  rhs)
scalar< MPQ > & operator/= ( const scalar< MPQ > &  rhs) [inline]

Definition at line 345 of file scalar_rational.hpp.

References scalar< T >::rep(), and mmx::rep().

{
  mpq_div(&rep(), &rep(), &rhs.rep());
  return *this;
}
scalar< MPQ > & operator/= ( int  sl) [inline]

Definition at line 359 of file scalar_rational.hpp.

References mmx::rep().

{
  mpq_div(&rep(), &rep(),  &scalar<MPQ>(sl).rep());
  return *this;
}
scalar< MPF > & operator/= ( unsigned long  ul) [inline]

Definition at line 342 of file scalar_floating.hpp.

References mmx::rep().

{
  mpf_div_ui(&rep(), &rep(), ul); return *this;
}
scalar<T>& operator/= ( unsigned long  rhs)
scalar< MPQ > & operator/= ( unsigned  sl) [inline]

Definition at line 352 of file scalar_rational.hpp.

References mmx::rep().

{
  mpq_div(&rep(), &rep(),  &scalar<MPQ>(sl).rep());
  return *this;
}
scalar< MPF > & operator/= ( const scalar< MPF > &  rhs) [inline]

Definition at line 335 of file scalar_floating.hpp.

References scalar< T >::rep(), and mmx::rep().

{
  mpf_div(&rep(), &rep(), &rhs.rep());
  //mpf_divexact(&rep(), &rep(), &rhs.rep()); 
  return *this;
}
scalar< MPF > & operator/= ( long  sl) [inline]

Definition at line 348 of file scalar_floating.hpp.

References mmx::rep().

{
  if (sl >= 0)
    mpf_div_ui(&rep(), &rep(), (unsigned long) sl);
  else
    {
      mpf_neg(&rep(),&rep());
      mpf_div_ui(&rep(), &rep(), ((unsigned long) -sl));
    }
  return *this;
}
scalar< MPF > & operator/= ( int  sl) [inline]

Definition at line 360 of file scalar_floating.hpp.

References mmx::rep().

{
  if (sl >= 0)
    mpf_div_ui(&rep(), &rep(), (unsigned long) sl);
  else
    {
      mpf_neg(&rep(),&rep());
      mpf_div_ui(&rep(), &rep(), ((unsigned long) -sl));
    }
  return *this;
}
scalar< MPQ > & operator/= ( unsigned long  ul) [inline]

Definition at line 366 of file scalar_rational.hpp.

References mmx::rep().

{
  mpq_div(&rep(), &rep(), &scalar<MPQ>(ul).rep()); 
  return *this;
}
scalar<T>& operator/= ( const scalar< T > &  rhs)
scalar<T>& operator/= ( long  rhs)
bool operator< ( const scalar< T > &  rhs) const
bool operator< ( const scalar< MPZ > &  rhs) const [inline]

Definition at line 178 of file scalar_integer.hpp.

References scalar< T >::rep(), and mmx::rep().

{
  return mpz_cmp(&rep(), &rhs.rep()) < 0;
}
bool operator< ( long  sl) const [inline]

Definition at line 184 of file scalar_integer.hpp.

References mmx::rep().

                                           {
  return mpz_cmp_si(&rep(), sl) < 0;
}
bool operator< ( int  si) const [inline]

Definition at line 189 of file scalar_integer.hpp.

References mmx::rep().

{
  return mpz_cmp_si(&rep(), (long) si) < 0;
}
bool operator< ( int  si) const
bool operator< ( unsigned long  ul) const [inline]

Definition at line 195 of file scalar_integer.hpp.

References mmx::rep().

{
  return mpz_cmp_ui(&rep(), ul) < 0;
}
bool operator< ( unsigned long  ul) const [inline]

Definition at line 197 of file scalar_rational.hpp.

References mmx::rep().

{
  return mpq_cmp_ui(&rep(), ul, 1) < 0;
}
bool operator< ( const scalar< MPF > &  rhs) const [inline]

Definition at line 166 of file scalar_floating.hpp.

References scalar< T >::rep(), and mmx::rep().

{
  return mpf_cmp(&rep(), &rhs.rep()) < 0;
}
bool operator< ( long  sl) const [inline]

Definition at line 172 of file scalar_floating.hpp.

References mmx::rep().

                                           {
  return mpf_cmp_si(&rep(), sl) < 0;
}
bool operator< ( int  si) const [inline]

Definition at line 177 of file scalar_floating.hpp.

References mmx::rep().

{
  return mpf_cmp_si(&rep(), (long) si) < 0;
}
bool operator< ( unsigned long  ul) const [inline]

Definition at line 183 of file scalar_floating.hpp.

References mmx::rep().

{
  return mpf_cmp_ui(&rep(), ul) < 0;
}
bool operator< ( long  sl) const
bool operator< ( unsigned long  ul) const
bool operator< ( long  sl) const [inline]

Definition at line 185 of file scalar_rational.hpp.

References mmx::rep().

                                           {
  return mpq_cmp_ui(&rep(), sl, 1) < 0;
}
bool operator< ( const scalar< MPQ > &  rhs) const [inline]

Definition at line 179 of file scalar_rational.hpp.

References scalar< T >::rep(), and mmx::rep().

{
  return mpq_cmp(&rep(), &rhs.rep()) < 0;
}
bool operator< ( int  si) const [inline]

Definition at line 190 of file scalar_rational.hpp.

References assert, and mmx::rep().

{
  assert(si>=0);
  return mpq_cmp_ui(&rep(), (long) si, 1) < 0;
}
bool operator<= ( long  sl) const [inline]

Definition at line 209 of file scalar_integer.hpp.

References mmx::rep().

                                            {
  return mpz_cmp_si(&rep(), sl) <= 0;
}
bool operator<= ( unsigned long  ul) const [inline]

Definition at line 220 of file scalar_integer.hpp.

References mmx::rep().

{
  return mpz_cmp_ui(&rep(), ul) <= 0;
}
bool operator<= ( int  si) const [inline]

Definition at line 217 of file scalar_rational.hpp.

References assert, and mmx::rep().

{
  assert(si>=0);
  return mpq_cmp_ui(&rep(), (long) si, 1) <= 0;
}
bool operator<= ( int  si) const [inline]

Definition at line 214 of file scalar_integer.hpp.

References mmx::rep().

{
  return mpz_cmp_si(&rep(), (long) si) <= 0;
}
bool operator<= ( const scalar< MPZ > &  rhs) const [inline]

Definition at line 203 of file scalar_integer.hpp.

References scalar< T >::rep(), and mmx::rep().

{
  return mpz_cmp(&rep(), &rhs.rep()) <= 0;
}
bool operator<= ( int  si) const [inline]

Definition at line 202 of file scalar_floating.hpp.

References mmx::rep().

{
  return mpf_cmp_si(&rep(), (long) si) <= 0;
}
bool operator<= ( unsigned long  ul) const
bool operator<= ( long  sl) const [inline]

Definition at line 197 of file scalar_floating.hpp.

References mmx::rep().

                                            {
  return mpf_cmp_si(&rep(), sl) <= 0;
}
bool operator<= ( long  sl) const [inline]

Definition at line 211 of file scalar_rational.hpp.

References assert, and mmx::rep().

                                            {
  assert(sl>=0);
  return mpq_cmp_ui(&rep(), sl,1) <= 0;
}
bool operator<= ( unsigned long  ul) const [inline]

Definition at line 224 of file scalar_rational.hpp.

References mmx::rep().

{
  return mpq_cmp_ui(&rep(), ul, 1) <= 0;
}
bool operator<= ( const scalar< T > &  rhs) const
bool operator<= ( long  sl) const
bool operator<= ( const scalar< MPF > &  rhs) const [inline]

Definition at line 191 of file scalar_floating.hpp.

References scalar< T >::rep(), and mmx::rep().

{
  return mpf_cmp(&rep(), &rhs.rep()) <= 0;
}
bool operator<= ( unsigned long  ul) const [inline]

Definition at line 208 of file scalar_floating.hpp.

References mmx::rep().

{
  return mpf_cmp_ui(&rep(), ul) <= 0;
}
bool operator<= ( const scalar< MPQ > &  rhs) const [inline]

Definition at line 205 of file scalar_rational.hpp.

References scalar< T >::rep(), and mmx::rep().

{
  return mpq_cmp(&rep(), &rhs.rep()) <= 0;
}
bool operator<= ( int  si) const
scalar< MPZ > & operator= ( unsigned  rhs) [inline]

Definition at line 79 of file scalar_integer.hpp.

References mmx::rep().

{
  //COUNT<MPZ>('=');
  mpz_set_ui(&rep(), rhs); 
  return *this;
}
scalar< MPZ > & operator= ( unsigned long  ul) [inline]

Definition at line 227 of file scalar_integer.hpp.

References mmx::rep().

{
  mpz_set_ui(&rep(), ul); return *this;
}
scalar<T>& operator= ( unsigned  rhs)
scalar< MPQ > & operator= ( int  ul) [inline]

Definition at line 243 of file scalar_rational.hpp.

References mmx::rep().

{
  mpq_set_si(&rep(), ul, 1);  return *this;
}
scalar< MPQ > & operator= ( long  sl) [inline]

Definition at line 237 of file scalar_rational.hpp.

References mmx::rep().

{
  mpq_set_si(&rep(), sl, 1);  return *this;
}
scalar< MPF > & operator= ( const scalar< MPF > &  rhs) [inline]

Definition at line 39 of file scalar_floating.hpp.

References scalar< T >::rep(), and mmx::rep().

{
  if (this != &rhs) {
    mpf_set(&rep(), &rhs.rep());
  }
  return *this;
}
scalar< MPZ > & operator= ( long  sl) [inline]

Definition at line 233 of file scalar_integer.hpp.

References mmx::rep().

{
  mpz_set_si(&rep(), sl);  return *this;
}
scalar<T>& operator= ( long  rhs)
scalar<T>& operator= ( int  rhs)
scalar<T>& operator= ( unsigned long  rhs)
scalar< MPF > & operator= ( unsigned long  ul) [inline]

Definition at line 215 of file scalar_floating.hpp.

References mmx::rep().

{
  mpf_set_ui(&rep(), ul); return *this;
}
scalar< MPF > & operator= ( long  sl) [inline]

Definition at line 221 of file scalar_floating.hpp.

References mmx::rep().

{
  mpf_set_si(&rep(), sl);  return *this;
}
scalar< MPF > & operator= ( int  ul) [inline]

Definition at line 227 of file scalar_floating.hpp.

References mmx::rep().

{
  mpf_set_si(&rep(), ul);  return *this;
}
scalar< MPZ > & operator= ( int  ul) [inline]

Definition at line 239 of file scalar_integer.hpp.

References mmx::rep().

{
  mpz_init_set_si(&(this->rep()), ul);  return *this;
}
scalar< MPQ > & operator= ( const scalar< MPQ > &  rhs) [inline]

Definition at line 69 of file scalar_rational.hpp.

References scalar< T >::rep(), and mmx::rep().

{
  // COUNT<MPQ>('=');
  //if (this != &rhs) 
  //mpq_clear(&rep());
  //mpq_init(&rep());
  mpq_set(&rep(), &rhs.rep()); 
  return *this;
}
scalar<T>& operator= ( const scalar< T > &  rhs)
scalar< MPQ > & operator= ( unsigned long  ul) [inline]

Definition at line 231 of file scalar_rational.hpp.

References mmx::rep().

{
  mpq_set_ui(&rep(), ul, 1); return *this;
}
scalar< MPZ > & operator= ( const scalar< MPZ > &  rhs) [inline]

Definition at line 72 of file scalar_integer.hpp.

References scalar< T >::rep(), and mmx::rep().

{
  //COUNT<MPZ>('=');
  if (this != &rhs) mpz_set(&rep(), &rhs.rep()); 
  return *this;
}
bool operator== ( long  sl) const
bool operator== ( const scalar< MPZ > &  rhs) const [inline]

Definition at line 87 of file scalar_integer.hpp.

References scalar< T >::rep(), and mmx::rep().

{
  return mpz_cmp(&rep(), &rhs.rep()) == 0;
}
bool operator== ( long  sl) const [inline]

Definition at line 93 of file scalar_integer.hpp.

References mmx::rep().

                                            {
  return mpz_cmp_si(&rep(), sl) == 0;
}
bool operator== ( unsigned long  ul) const [inline]

Definition at line 103 of file scalar_integer.hpp.

References mmx::rep().

{
  return mpz_cmp_ui(&rep(), ul) == 0;
}
bool operator== ( const scalar< MPF > &  rhs) const [inline]

Definition at line 75 of file scalar_floating.hpp.

References scalar< T >::rep(), and mmx::rep().

{
  return mpf_cmp(&rep(), &rhs.rep()) == 0;
}
bool operator== ( int  si) const [inline]

Definition at line 93 of file scalar_rational.hpp.

References mmx::rep().

                                           {
  return mpq_cmp_ui(&rep(), (long) si, 1) == 0;
}
bool operator== ( unsigned long  ul) const [inline]

Definition at line 91 of file scalar_floating.hpp.

References mmx::rep().

{
  return mpf_cmp_ui(&rep(), ul) == 0;
}
bool operator== ( int  si) const [inline]

Definition at line 86 of file scalar_floating.hpp.

References mmx::rep().

                                           {
  return mpf_cmp_si(&rep(), (long) si) == 0;
}
bool operator== ( unsigned long  ul) const
bool operator== ( unsigned long  ul) const [inline]

Definition at line 98 of file scalar_rational.hpp.

References mmx::rep().

{
  return mpq_cmp_ui(&rep(), ul, 1) == 0;
}
bool operator== ( const scalar< T > &  rhs) const
bool operator== ( long  sl) const [inline]

Definition at line 86 of file scalar_rational.hpp.

References assert, and mmx::rep().

                                            {
  assert(sl>0);
  return mpq_cmp_ui(&rep(), sl, 1) == 0;
  
}
bool operator== ( int  si) const [inline]

Definition at line 98 of file scalar_integer.hpp.

References mmx::rep().

                                           {
  return mpz_cmp_si(&rep(), (long) si) == 0;
}
bool operator== ( const scalar< MPQ > &  rhs) const [inline]

Definition at line 80 of file scalar_rational.hpp.

References scalar< T >::rep(), and mmx::rep().

{
  return mpq_cmp(&rep(), &rhs.rep()) == 0;
}
bool operator== ( long  sl) const [inline]

Definition at line 81 of file scalar_floating.hpp.

References mmx::rep().

                                            {
  return mpf_cmp_si(&rep(), sl) == 0;
}
bool operator== ( int  si) const
bool operator> ( unsigned long  ul) const
bool operator> ( long  sl) const
bool operator> ( long  sl) const [inline]

Definition at line 138 of file scalar_integer.hpp.

References mmx::rep().

                                           {
  return mpz_cmp_si(&rep(), sl) > 0;
}
bool operator> ( unsigned long  ul) const [inline]

Definition at line 148 of file scalar_integer.hpp.

References mmx::rep().

{
  return mpz_cmp_ui(&rep(), ul) > 0;
}
bool operator> ( long  sl) const [inline]

Definition at line 135 of file scalar_rational.hpp.

References assert, and mmx::rep().

                                           {
  assert(sl>=0);
  return mpq_cmp_ui(&rep(), sl, 1) > 0;
}
bool operator> ( const scalar< MPZ > &  rhs) const [inline]

Definition at line 132 of file scalar_integer.hpp.

References scalar< T >::rep(), and mmx::rep().

{
  return mpz_cmp(&rep(), &rhs.rep()) > 0;
}
bool operator> ( int  si) const [inline]

Definition at line 131 of file scalar_floating.hpp.

References mmx::rep().

                                          {
  return mpf_cmp_si(&rep(), (long) si) > 0;
}
bool operator> ( int  si) const
bool operator> ( unsigned long  ul) const [inline]

Definition at line 147 of file scalar_rational.hpp.

References mmx::rep().

{
  return mpq_cmp_ui(&rep(), ul,1) > 0;
}
bool operator> ( long  sl) const [inline]

Definition at line 126 of file scalar_floating.hpp.

References mmx::rep().

                                           {
  return mpf_cmp_si(&rep(), sl) > 0;
}
bool operator> ( int  si) const [inline]

Definition at line 141 of file scalar_rational.hpp.

References assert, and mmx::rep().

                                          {
  assert(si>=0);
  return mpq_cmp_ui(&rep(), (long) si, 1) > 0;
}
bool operator> ( const scalar< MPQ > &  rhs) const [inline]

Definition at line 129 of file scalar_rational.hpp.

References scalar< T >::rep(), and mmx::rep().

{
  return mpq_cmp(&rep(), &rhs.rep()) > 0;
}
bool operator> ( const scalar< MPF > &  rhs) const [inline]

Definition at line 120 of file scalar_floating.hpp.

References scalar< T >::rep(), and mmx::rep().

{
  return mpf_cmp(&rep(), &rhs.rep()) > 0;
}
bool operator> ( const scalar< T > &  rhs) const
bool operator> ( int  si) const [inline]

Definition at line 143 of file scalar_integer.hpp.

References mmx::rep().

                                          {
  return mpz_cmp_si(&rep(), (long) si) > 0;
}
bool operator> ( unsigned long  ul) const [inline]

Definition at line 136 of file scalar_floating.hpp.

References mmx::rep().

{
  return mpf_cmp_ui(&rep(), ul) > 0;
}
bool operator>= ( unsigned long  ul) const
bool operator>= ( const scalar< MPZ > &  rhs) const [inline]

Definition at line 154 of file scalar_integer.hpp.

References scalar< T >::rep(), and mmx::rep().

{
  return mpz_cmp(&rep(), &rhs.rep()) >= 0;
}
bool operator>= ( const scalar< MPF > &  rhs) const [inline]

Definition at line 142 of file scalar_floating.hpp.

References scalar< T >::rep(), and mmx::rep().

{
  return mpf_cmp(&rep(), &rhs.rep()) >= 0;
}
bool operator>= ( int  si) const
bool operator>= ( unsigned long  ul) const [inline]

Definition at line 171 of file scalar_integer.hpp.

References mmx::rep().

{
  return mpz_cmp_ui(&rep(), ul) >= 0;
}
bool operator>= ( long  sl) const
bool operator>= ( int  si) const [inline]

Definition at line 153 of file scalar_floating.hpp.

References mmx::rep().

{
  return mpf_cmp_si(&rep(), (long) si) >= 0;
}
bool operator>= ( const scalar< T > &  rhs) const
bool operator>= ( const scalar< MPQ > &  rhs) const [inline]

Definition at line 153 of file scalar_rational.hpp.

References scalar< T >::rep(), and mmx::rep().

{
  return mpq_cmp(&rep(), &rhs.rep()) >= 0;
}
bool operator>= ( long  sl) const [inline]

Definition at line 148 of file scalar_floating.hpp.

References mmx::rep().

                                            {
  return mpf_cmp_si(&rep(), sl) >= 0;
}
bool operator>= ( int  si) const [inline]

Definition at line 165 of file scalar_integer.hpp.

References mmx::rep().

{
  return mpz_cmp_si(&rep(), (long) si) >= 0;
}
bool operator>= ( unsigned long  ul) const [inline]

Definition at line 172 of file scalar_rational.hpp.

References mmx::rep().

{
  return mpq_cmp_ui(&rep(), ul, 1) >= 0;
}
bool operator>= ( long  sl) const [inline]

Definition at line 160 of file scalar_integer.hpp.

References mmx::rep().

                                            {
  return mpz_cmp_si(&rep(), sl) >= 0;
}
bool operator>= ( unsigned long  ul) const [inline]

Definition at line 159 of file scalar_floating.hpp.

References mmx::rep().

{
  return mpf_cmp_ui(&rep(), ul) >= 0;
}
bool operator>= ( int  si) const [inline]

Definition at line 165 of file scalar_rational.hpp.

References assert, and mmx::rep().

{
  assert(si>=0);
  return mpq_cmp_ui(&rep(), (long) si, 1) >= 0;
}
bool operator>= ( long  sl) const [inline]

Definition at line 159 of file scalar_rational.hpp.

References assert, and mmx::rep().

                                            {
  assert(sl>=0);
  return mpq_cmp_ui(&rep(), sl, 1) >= 0;
}
scalar<T>& pow ( unsigned long  exp)

Referenced by mmx::BigIntPow().

scalar< MPZ > & pow ( unsigned long  base,
unsigned long  exp 
) [inline]

Definition at line 517 of file scalar_integer.hpp.

References mmx::rep().

{
  mpz_ui_pow_ui(&rep(), base, exp); return *this;
}
scalar< MPZ > & pow ( unsigned long  exp) [inline]

Definition at line 511 of file scalar_integer.hpp.

References mmx::rep().

{
  mpz_pow_ui(&rep(), &rep(), exp); return *this;
}
scalar<T>& pow ( unsigned long  base,
unsigned long  exp 
)
void PowMod ( const scalar< MPZ > &  exp,
const scalar< MPZ > &  m 
) [inline]

Definition at line 480 of file scalar_integer.hpp.

References scalar< T >::rep(), and mmx::rep().

{
  mpz_powm(&rep(), &rep(), &exp.rep(), &m.rep());
}
void PowMod ( unsigned long  exp,
const scalar< MPZ > &  m 
) [inline]

Definition at line 486 of file scalar_integer.hpp.

References scalar< T >::rep(), and mmx::rep().

{
  mpz_powm_ui(&rep(), &rep(), exp, &m.rep());
}
void PowMod ( const scalar< T > &  exp,
const scalar< T > &  m 
)
void PowMod ( unsigned long  exp,
const scalar< T > &  m 
)
void quo ( const scalar< MPZ > &  divisor) [inline]

Definition at line 523 of file scalar_integer.hpp.

References scalar< T >::rep(), and mmx::rep().

{
  mpz_mdiv (&rep(), &rep(), &divisor.rep());
}
void quo ( unsigned long  divisor)
void quo ( unsigned long  divisor) [inline]

Definition at line 529 of file scalar_integer.hpp.

References mmx::rep().

{
  mpz_mdiv_ui(&rep(), &rep(), divisor);
}
void quo ( const scalar< T > &  divisor)
unsigned long rem ( unsigned long  divisor)
void rem ( const scalar< T > &  divisor)

Referenced by mmx::rem().

void rem ( const scalar< MPZ > &  divisor) [inline]

Definition at line 535 of file scalar_integer.hpp.

References scalar< T >::rep(), and mmx::rep().

{
  mpz_mmod(&rep(), &rep(), &divisor.rep());
}
unsigned long rem ( unsigned long  divisor) [inline]

Definition at line 541 of file scalar_integer.hpp.

References mmx::rep().

{
  return mpz_mmod_ui(&rep(), &rep(), divisor);
}
const T& rep ( ) const [inline]

Definition at line 31 of file scalar.hpp.

References scalar< T >::data.

{return (*data);}
void sqrt ( ) [inline]

Definition at line 500 of file scalar_floating.hpp.

References mmx::rep().

{
  mpf_sqrt(&rep(), &rep());
}
void sqrt ( ) [inline]

Definition at line 547 of file scalar_integer.hpp.

References mmx::rep().

{
  mpz_sqrt(&rep(), &rep());
}
void sqrt ( )

Member Data Documentation

Definition at line 29 of file scalar.hpp.

Referenced by scalar< T >::rep().


The documentation for this struct was generated from the following file: