Givaro
Public Types | Static Public Attributes | Friends
Integer Class Reference

This is the Integer class. More...

#include <gmp++_int.h>

Inherited by SpyInteger::InHeritsInteger.

+ Collaboration diagram for Integer:

Public Types

typedef std::vector< mp_limb_t > vect_t
 vector of limbs (ie a gmp number).
 

Public Member Functions

Constructor/Destructors.

Constructors and destructor for an Integer.

giv_all_inlined Integer (int32_t n=0)
 Constructor form a known type. More...
 
giv_all_inlined Integer (int64_t n)
 Constructor form a known type. More...
 
giv_all_inlined Integer (unsigned char n)
 Constructor form a known type. More...
 
giv_all_inlined Integer (uint32_t n)
 Constructor form a known type. More...
 
giv_all_inlined Integer (uint64_t n)
 Constructor form a known type. More...
 
giv_all_inlined Integer (double n)
 Constructor form a known type. More...
 
giv_all_inlined Integer (const char *n)
 Constructor form a known type. More...
 
giv_all_inlined Integer (const mpz_class &a)
 Constructor form a known type. More...
 
template<size_t K>
 Integer (const RecInt::ruint< K > &n)
 Constructor form a known type. More...
 
template<size_t K>
 Integer (const RecInt::rint< K > &n)
 Constructor form a known type. More...
 
giv_all_inlined Integer (const Integer &n)
 Copy constructor. More...
 
giv_all_inlined Integer (uint64_t *d, int64_t sz)
 Creates a new Integer from pointers. More...
 
giv_all_inlined Integer (const vect_t &v)
 Creates a new Integers for a vector of limbs. More...
 
giv_all_inlined ~Integer ()
 destructor
 
Assignment and copy operators
giv_all_inlined Integeroperator= (const Integer &n)
 copy from an integer. More...
 
giv_all_inlined Integerlogcpy (const Integer &n)
 copy from an integer. More...
 
giv_all_inlined Integercopy (const Integer &n)
 copy from an integer. More...
 
Bit logic operators. <br>
giv_all_inlined Integer operator^ (const Integer &a) const
 XOR (^) More...
 
giv_all_inlined Integer operator^ (const uint64_t &a) const
 XOR (^) More...
 
giv_all_inlined Integer operator^ (const uint32_t &a) const
 XOR (^) More...
 
giv_all_inlined Integeroperator^= (const Integer &a)
 XOR inplace (^=) More...
 
giv_all_inlined Integeroperator^= (const uint64_t &a)
 XOR (^) More...
 
giv_all_inlined Integeroperator^= (const uint32_t &a)
 XOR (^) More...
 
giv_all_inlined Integer operator| (const Integer &a) const
 OR (|) More...
 
giv_all_inlined Integer operator| (const uint64_t &a) const
 XOR (^) More...
 
giv_all_inlined Integer operator| (const uint32_t &a) const
 XOR (^) More...
 
giv_all_inlined Integeroperator|= (const Integer &a)
 OR inplace (|=) More...
 
giv_all_inlined Integeroperator|= (const uint64_t &a)
 XOR (^) More...
 
giv_all_inlined Integeroperator|= (const uint32_t &a)
 XOR (^) More...
 
giv_all_inlined Integer operator& (const Integer &a) const
 AND (&) More...
 
giv_all_inlined uint32_t operator& (const uint32_t &a) const
 XOR (^) More...
 
giv_all_inlined uint64_t operator& (const uint64_t &a) const
 XOR (^) More...
 
giv_all_inlined Integeroperator&= (const Integer &a)
 AND inplace (&=) More...
 
giv_all_inlined Integeroperator&= (const uint64_t &a)
 XOR (^) More...
 
giv_all_inlined Integeroperator&= (const uint32_t &a)
 XOR (^) More...
 
giv_all_inlined Integer operator~ () const
 complement to 1 (~)
 
giv_all_inlined Integer operator<< (int32_t l) const
 left shift (<<) More...
 
giv_all_inlined Integer operator<< (int64_t l) const
 XOR (^) More...
 
giv_all_inlined Integer operator<< (uint32_t l) const
 XOR (^) More...
 
giv_all_inlined Integer operator<< (uint64_t l) const
 XOR (^) More...
 
giv_all_inlined Integeroperator<<= (int32_t l)
 left shift inplace (<<=) More...
 
giv_all_inlined Integeroperator<<= (int64_t l)
 XOR (^) More...
 
giv_all_inlined Integeroperator<<= (uint32_t l)
 XOR (^) More...
 
giv_all_inlined Integeroperator<<= (uint64_t l)
 XOR (^) More...
 
giv_all_inlined Integer operator>> (int32_t l) const
 right shift (>>) More...
 
giv_all_inlined Integer operator>> (int64_t l) const
 XOR (^) More...
 
giv_all_inlined Integer operator>> (uint32_t l) const
 XOR (^) More...
 
giv_all_inlined Integer operator>> (uint64_t l) const
 XOR (^) More...
 
giv_all_inlined Integeroperator>>= (int32_t l)
 right shift inplace (>>=) More...
 
giv_all_inlined Integeroperator>>= (int64_t l)
 XOR (^) More...
 
giv_all_inlined Integeroperator>>= (uint32_t l)
 XOR (^) More...
 
giv_all_inlined Integeroperator>>= (uint64_t l)
 XOR (^) More...
 
Increment/Decrement operators
Integeroperator++ ()
 
Integer operator++ (int)
 
Integeroperator-- ()
 
Integer operator-- (int)
 
Cast operators.

Convert an Integer to a basic C++ type.

Warning
Cast towards unsigned consider only the absolute value
 operator bool () const
 
 operator int16_t () const
 
 operator uint16_t () const
 
 operator unsigned char () const
 
giv_all_inlined operator uint32_t () const
 
giv_all_inlined operator int32_t () const
 
 operator signed char () const
 
giv_all_inlined operator uint64_t () const
 
giv_all_inlined operator int64_t () const
 
giv_all_inlined operator std::string () const
 
giv_all_inlined operator float () const
 
giv_all_inlined operator double () const
 
giv_all_inlined operator vect_t () const
 
template<size_t K>
 operator RecInt::ruint< K > () const
 
template<size_t K>
 operator RecInt::rint< K > () const
 

Static Public Member Functions

Addition, substraction, multiplication
static giv_all_inlined Integeraddin (Integer &res, const Integer &n)
 Addition (inplace) res+=n. More...
 
static giv_all_inlined Integeraddin (Integer &res, const int64_t n)
 Addition (inplace) res+=n. More...
 
static giv_all_inlined Integeraddin (Integer &res, const uint64_t n)
 Addition (inplace) res+=n. More...
 
static giv_all_inlined Integeraddin (Integer &res, const int32_t n)
 Addition (inplace) res+=n. More...
 
static giv_all_inlined Integeraddin (Integer &res, const uint32_t n)
 Addition (inplace) res+=n. More...
 
static giv_all_inlined Integeradd (Integer &res, const Integer &n1, const Integer &n2)
 Addition res=n1+n2. More...
 
static giv_all_inlined Integeradd (Integer &res, const Integer &n1, const int64_t n2)
 Addition (inplace) res+=n. More...
 
static giv_all_inlined Integeradd (Integer &res, const Integer &n1, const uint64_t n2)
 Addition (inplace) res+=n. More...
 
static giv_all_inlined Integeradd (Integer &res, const Integer &n1, const int32_t n2)
 Addition (inplace) res+=n. More...
 
static giv_all_inlined Integeradd (Integer &res, const Integer &n1, const uint32_t n2)
 Addition (inplace) res+=n. More...
 
static giv_all_inlined Integersubin (Integer &res, const Integer &n)
 Substraction (inplace) res-=n. More...
 
static giv_all_inlined Integersubin (Integer &res, const int64_t n)
 Addition (inplace) res+=n. More...
 
static giv_all_inlined Integersubin (Integer &res, const uint64_t n)
 Addition (inplace) res+=n. More...
 
static giv_all_inlined Integersubin (Integer &res, const int32_t n)
 Addition (inplace) res+=n. More...
 
static giv_all_inlined Integersubin (Integer &res, const uint32_t n)
 Addition (inplace) res+=n. More...
 
static giv_all_inlined Integersub (Integer &res, const Integer &n1, const Integer &n2)
 Substraction res=n1-n2. More...
 
static giv_all_inlined Integersub (Integer &res, const Integer &n1, const int64_t n2)
 Addition (inplace) res+=n. More...
 
static giv_all_inlined Integersub (Integer &res, const Integer &n1, const uint64_t n2)
 Addition (inplace) res+=n. More...
 
static giv_all_inlined Integersub (Integer &res, const Integer &n1, const int32_t n2)
 Addition (inplace) res+=n. More...
 
static giv_all_inlined Integersub (Integer &res, const Integer &n1, const uint32_t n2)
 Addition (inplace) res+=n. More...
 
static giv_all_inlined Integernegin (Integer &res)
 Negation (inplace) res=-res. More...
 
static giv_all_inlined Integerneg (Integer &res, const Integer &n)
 Negation res=-n. More...
 
static giv_all_inlined Integermulin (Integer &res, const Integer &n)
 Multiplication (inplace) res*=n. More...
 
static giv_all_inlined Integermulin (Integer &res, const int64_t n)
 Addition (inplace) res+=n. More...
 
static giv_all_inlined Integermulin (Integer &res, const uint64_t n)
 Addition (inplace) res+=n. More...
 
static giv_all_inlined Integermulin (Integer &res, const int32_t n)
 Addition (inplace) res+=n. More...
 
static giv_all_inlined Integermulin (Integer &res, const uint32_t n)
 Addition (inplace) res+=n. More...
 
static giv_all_inlined Integermul (Integer &res, const Integer &n1, const Integer &n2)
 Multiplication res=n1*n2. More...
 
static giv_all_inlined Integermul (Integer &res, const Integer &n1, const int64_t n2)
 Addition (inplace) res+=n. More...
 
static giv_all_inlined Integermul (Integer &res, const Integer &n1, const uint64_t n2)
 Addition (inplace) res+=n. More...
 
static giv_all_inlined Integermul (Integer &res, const Integer &n1, const int32_t n2)
 Addition (inplace) res+=n. More...
 
static giv_all_inlined Integermul (Integer &res, const Integer &n1, const uint32_t n2)
 Addition (inplace) res+=n. More...
 
fused add-multiply

Groups a multiplication and an addition/division in a single function.

This is usually faster than doing the two operations separately (and preferable to using operators).

static giv_all_inlined Integeraxpy (Integer &res, const Integer &a, const Integer &x, const Integer &y)
 axpy res = ax+y. More...
 
static giv_all_inlined Integeraxpy (Integer &res, const Integer &a, const uint64_t x, const Integer &y)
 axpy res = ax+y. More...
 
static giv_all_inlined Integeraxpyin (Integer &res, const Integer &a, const Integer &x)
 axpyin (inplace) res += ax. More...
 
static giv_all_inlined Integeraxpyin (Integer &res, const Integer &a, const uint64_t x)
 axpy res = ax+y. More...
 
static giv_all_inlined Integermaxpy (Integer &res, const Integer &a, const Integer &x, const Integer &y)
 maxpy res = y - ax. More...
 
static giv_all_inlined Integermaxpy (Integer &res, const Integer &a, const uint64_t x, const Integer &y)
 axpy res = ax+y. More...
 
static giv_all_inlined Integermaxpyin (Integer &res, const Integer &a, const Integer &x)
 maxpyin res -= ax. More...
 
static giv_all_inlined Integermaxpyin (Integer &res, const Integer &a, const uint64_t x)
 axpy res = ax+y. More...
 
static giv_all_inlined Integeraxmy (Integer &res, const Integer &a, const Integer &x, const Integer &y)
 axmy res = ax - y. More...
 
static giv_all_inlined Integeraxmy (Integer &res, const Integer &a, const uint64_t x, const Integer &y)
 axpy res = ax+y. More...
 
static giv_all_inlined Integeraxmyin (Integer &res, const Integer &a, const Integer &x)
 axmyin (in place) res = ax - res. More...
 
static giv_all_inlined Integeraxmyin (Integer &res, const Integer &a, const uint64_t x)
 axpy res = ax+y. More...
 
Random numbers functions

Other stuff gmp has (temporary)

static void seeding (uint64_t s)
 Random numbers (no doc)
 
static void seeding (const Integer &s)
 Random numbers (no doc)
 
static void seeding ()
 Random numbers (no doc)
 
static bool RandBool ()
 Random numbers (no doc)
 
template<bool ALWAYSPOSITIVE>
static Integerrandom_lessthan (Integer &r, const Integer &m)
 returns a random integer r in the intervall [[x, m-1]] where x = 0 or -(m-1) according to ALWAYSPOSITIVE More...
 
static Integerrandom_lessthan (Integer &r, const Integer &m)
 Random numbers (no doc)
 
template<bool ALWAYSPOSITIVE>
static Integerrandom_lessthan_2exp (Integer &r, const uint64_t &m)
 returns a random integer r in the intervall [[x, 2^m-1]] where x = 0 or -(2^m-1) according to ALWAYSPOSITIVE returns a random integer r of at most m bits
 
static Integerrandom_lessthan_2exp (Integer &r, const uint64_t &m)
 Random numbers (no doc)
 
template<bool ALWAYSPOSITIVE>
static Integer random_lessthan_2exp (const uint64_t &m)
 Random numbers (no doc)
 
static Integer random_lessthan_2exp (const uint64_t &m)
 Random numbers (no doc)
 
template<bool ALWAYSPOSITIVE>
static Integerrandom_lessthan (Integer &r, const uint64_t &m)
 Random numbers (no doc)
 
static Integerrandom_lessthan (Integer &r, const uint64_t &m)
 Random numbers (no doc)
 
template<bool ALWAYSPOSITIVE, class T >
static Integer random_lessthan (const T &m)
 Random numbers (no doc)
 
template<class T >
static Integer random_lessthan (const T &m)
 Random numbers (no doc)
 
template<bool ALWAYSPOSITIVE>
static Integerrandom_exact_2exp (Integer &r, const uint64_t &m)
 returns a reference to a random number r of the size m bits, exactly.
 
static Integerrandom_exact_2exp (Integer &r, const uint64_t &m)
 Random numbers (no doc)
 
template<bool ALWAYSPOSITIVE>
static Integerrandom_exact (Integer &r, const Integer &s)
 returns a reference to a random number r of the size of s, exactly.
 
static Integerrandom_exact (Integer &r, const Integer &s)
 Random numbers (no doc)
 
template<bool ALWAYSPOSITIVE>
static Integerrandom_exact (Integer &r, const uint64_t &m)
 Random numbers (no doc)
 
static Integerrandom_exact (Integer &r, const uint64_t &m)
 Random numbers (no doc)
 
template<bool ALWAYSPOSITIVE, class T >
static Integerrandom_exact (Integer &r, const T &m)
 Random numbers (no doc)
 
template<class T >
static Integerrandom_exact (Integer &r, const T &m)
 Random numbers (no doc)
 
template<bool ALWAYSPOSITIVE, class T >
static Integer random_exact (const T &s)
 Random numbers (no doc)
 
template<class T >
static Integer random_exact (const T &s)
 Random numbers (no doc)
 
static Integerrandom_between (Integer &r, const Integer &m, const Integer &M)
 Random numbers (no doc)
 
static Integer random_between (const Integer &m, const Integer &M)
 Random numbers (no doc)
 
static Integerrandom_between_2exp (Integer &r, const uint64_t &m, const uint64_t &M)
 Random numbers (no doc)
 
static Integerrandom_between (Integer &r, const uint64_t &m, const uint64_t &M)
 Random numbers (no doc)
 
static Integer random_between_2exp (const uint64_t &m, const uint64_t &M)
 Random numbers (no doc)
 
static Integer random_between (const uint64_t &m, const uint64_t &M)
 Random numbers (no doc)
 
template<class R >
static Integer random_between (const R &m, const R &M)
 Random numbers (no doc)
 
template<class R >
static Integerrandom_between (Integer &r, const R &m, const R &M)
 Random numbers (no doc)
 
template<bool ALWAYSPOSITIVE, class T >
static Integerrandom (Integer &r, const T &m)
 returns a random integer less than...
 
template<class T >
static Integerrandom (Integer &r, const T &m)
 Random numbers (no doc)
 
template<bool ALWAYSPOSITIVE, class T >
static Integer random (const T &sz)
 returns a random integer less than...
 
template<class T >
static Integer random (const T &sz)
 Random numbers (no doc)
 
template<bool ALWAYSPOSITIVE>
static Integer random ()
 Random numbers (no doc)
 
static Integer random ()
 Random numbers (no doc)
 
template<bool ALWAYSPOSITIVE, class T >
static Integer nonzerorandom (const T &sz)
 Random numbers (no doc)
 
template<bool ALWAYSPOSITIVE, class T >
static Integernonzerorandom (Integer &r, const T &size)
 Random numbers (no doc)
 
template<class T >
static Integer nonzerorandom (const T &sz)
 Random numbers (no doc)
 
template<class T >
static Integernonzerorandom (Integer &r, const T &size)
 Random numbers (no doc)
 
static Integer nonzerorandom ()
 Random numbers (no doc)
 

Static Public Attributes

static const Integer zero
 zero (0)
 
static const Integer one
 one (1)
 
static const Integer mOne
 minus one (-1)
 

Friends

giv_all_inlined Integerpowmod (Integer &Res, const Integer &n, const uint64_t e, const Integer &m)
 modular pow. return $n^e \mod m$.
 
giv_all_inlined Integer powmod (const Integer &n, const uint64_t e, const Integer &m)
 modular pow. More...
 
giv_all_inlined Integer fact (uint64_t l)
 fact More...
 
giv_all_inlined Integer sqrt (const Integer &p)
 (square) roots More...
 
giv_all_inlined Integersqrt (Integer &r, const Integer &p)
 (square) roots More...
 
giv_all_inlined Integer sqrtrem (const Integer &p, Integer &rem)
 (square) roots More...
 
giv_all_inlined Integersqrtrem (Integer &r, const Integer &p, Integer &rem)
 (square) roots More...
 
giv_all_inlined bool root (Integer &q, const Integer &a, uint32_t n)
 (square) roots More...
 
giv_all_inlined int64_t logp (const Integer &a, const Integer &p)
 logs More...
 
giv_all_inlined double logtwo (const Integer &a)
 logs More...
 
giv_all_inlined double naturallog (const Integer &a)
 logs More...
 
Arithmetic functions
giv_all_inlined Integer gcd (const Integer &a, const Integer &b)
 gcd. More...
 
giv_all_inlined Integer gcd (Integer &u, Integer &v, const Integer &a, const Integer &b)
 gcd. More...
 
giv_all_inlined Integergcd (Integer &g, const Integer &a, const Integer &b)
 gcd. More...
 
giv_all_inlined Integergcd (Integer &g, Integer &u, Integer &v, const Integer &a, const Integer &b)
 gcd. More...
 
giv_all_inlined Integerinv (Integer &u, const Integer &a, const Integer &b)
 Inverse. More...
 
giv_all_inlined Integerinvin (Integer &u, const Integer &b)
 Compute the inverse inplace u = u/b. More...
 
giv_all_inlined Integer pp (const Integer &P, const Integer &Q)
 pp More...
 
giv_all_inlined Integerlcm (Integer &g, const Integer &a, const Integer &b)
 lcm More...
 
giv_all_inlined Integer lcm (const Integer &a, const Integer &b)
 lcm More...
 
giv_all_inlined Integerpow (Integer &Res, const Integer &n, const int64_t l)
 pow. More...
 
giv_all_inlined Integerpow (Integer &Res, const uint64_t n, const uint64_t l)
 gcd. More...
 
giv_all_inlined Integerpow (Integer &Res, const Integer &n, const uint64_t l)
 gcd. More...
 
giv_all_inlined Integerpow (Integer &Res, const Integer &n, const int32_t l)
 gcd. More...
 
giv_all_inlined Integerpow (Integer &Res, const Integer &n, const uint32_t l)
 gcd. More...
 
giv_all_inlined Integer pow (const Integer &n, const int64_t l)
 pow. More...
 
giv_all_inlined Integer pow (const Integer &n, const uint64_t l)
 gcd. More...
 
giv_all_inlined Integer pow (const Integer &n, const int32_t l)
 gcd. More...
 
giv_all_inlined Integer pow (const Integer &n, const uint32_t l)
 gcd. More...
 
primes
giv_all_inlined IntegerProtected::prevprime (Integer &, const Integer &p)
 
giv_all_inlined IntegerProtected::nextprime (Integer &, const Integer &p)
 
giv_all_inlined int32_t Protected::probab_prime (const Integer &p, int32_t r)
 
giv_all_inlined int32_t kronecker (const Integer &u, const Integer &v)
 
giv_all_inlined int32_t jacobi (const Integer &u, const Integer &v)
 
giv_all_inlined int32_t legendre (const Integer &u, const Integer &v)
 

Comparison operators.

Compare with operators.

giv_all_inlined int32_t operator>= (const Integer &l) const
 greater or equal. More...
 
giv_all_inlined int32_t operator>= (const int32_t l) const
 greater or equal. More...
 
giv_all_inlined int32_t operator>= (const int64_t l) const
 greater or equal. More...
 
giv_all_inlined int32_t operator>= (const uint64_t l) const
 greater or equal. More...
 
giv_all_inlined int32_t operator>= (const uint32_t l) const
 greater or equal. More...
 
giv_all_inlined int32_t operator>= (const double l) const
 greater or equal. More...
 
giv_all_inlined int32_t operator>= (const float l) const
 greater or equal. More...
 
giv_all_inlined int32_t operator<= (const Integer &l) const
 less or equal More...
 
giv_all_inlined int32_t operator<= (const int32_t l) const
 greater or equal. More...
 
giv_all_inlined int32_t operator<= (const int64_t l) const
 greater or equal. More...
 
giv_all_inlined int32_t operator<= (const uint64_t l) const
 greater or equal. More...
 
giv_all_inlined int32_t operator<= (const uint32_t l) const
 greater or equal. More...
 
giv_all_inlined int32_t operator<= (const double l) const
 greater or equal. More...
 
giv_all_inlined int32_t operator<= (const float l) const
 greater or equal. More...
 
giv_all_inlined int32_t operator!= (const Integer &l) const
 operator != (not equal) More...
 
giv_all_inlined int32_t operator!= (const int32_t l) const
 greater or equal. More...
 
giv_all_inlined int32_t operator!= (const int64_t l) const
 greater or equal. More...
 
giv_all_inlined int32_t operator!= (const uint64_t l) const
 greater or equal. More...
 
giv_all_inlined int32_t operator!= (const uint32_t l) const
 greater or equal. More...
 
giv_all_inlined int32_t operator!= (const double l) const
 greater or equal. More...
 
giv_all_inlined int32_t operator!= (const float l) const
 greater or equal. More...
 
giv_all_inlined int32_t operator== (const Integer &l) const
 Equality. More...
 
giv_all_inlined int32_t operator== (const int32_t l) const
 greater or equal. More...
 
giv_all_inlined int32_t operator== (const int64_t l) const
 greater or equal. More...
 
giv_all_inlined int32_t operator== (const uint64_t l) const
 greater or equal. More...
 
giv_all_inlined int32_t operator== (const uint32_t l) const
 greater or equal. More...
 
giv_all_inlined int32_t operator== (const double l) const
 greater or equal. More...
 
giv_all_inlined int32_t operator== (const float l) const
 greater or equal. More...
 
giv_all_inlined int32_t operator> (const Integer &l) const
 greater (strict) More...
 
giv_all_inlined int32_t operator> (const int32_t l) const
 greater or equal. More...
 
giv_all_inlined int32_t operator> (const int64_t l) const
 greater or equal. More...
 
giv_all_inlined int32_t operator> (const uint64_t l) const
 greater or equal. More...
 
giv_all_inlined int32_t operator> (const uint32_t l) const
 greater or equal. More...
 
giv_all_inlined int32_t operator> (const double l) const
 greater or equal. More...
 
giv_all_inlined int32_t operator> (const float l) const
 greater or equal. More...
 
giv_all_inlined int32_t operator< (const Integer &l) const
 less (strict) More...
 
giv_all_inlined int32_t operator< (const int32_t l) const
 greater or equal. More...
 
giv_all_inlined int32_t operator< (const int64_t l) const
 greater or equal. More...
 
giv_all_inlined int32_t operator< (const uint64_t l) const
 greater or equal. More...
 
giv_all_inlined int32_t operator< (const uint32_t l) const
 greater or equal. More...
 
giv_all_inlined int32_t operator< (const double l) const
 greater or equal. More...
 
giv_all_inlined int32_t operator< (const float l) const
 greater or equal. More...
 
giv_all_inlined friend int32_t operator>= (uint32_t l, const Integer &n)
 greater or equal. More...
 
giv_all_inlined friend int32_t operator>= (float l, const Integer &n)
 greater or equal. More...
 
giv_all_inlined friend int32_t operator>= (double l, const Integer &n)
 greater or equal. More...
 
giv_all_inlined friend int32_t operator>= (int32_t l, const Integer &n)
 greater or equal. More...
 
giv_all_inlined friend int32_t operator>= (int64_t l, const Integer &n)
 greater or equal. More...
 
giv_all_inlined friend int32_t operator>= (uint64_t l, const Integer &n)
 greater or equal. More...
 
giv_all_inlined friend int32_t operator<= (uint32_t l, const Integer &n)
 less or equal More...
 
giv_all_inlined friend int32_t operator<= (float l, const Integer &n)
 greater or equal. More...
 
giv_all_inlined friend int32_t operator<= (double l, const Integer &n)
 greater or equal. More...
 
giv_all_inlined friend int32_t operator<= (int32_t l, const Integer &n)
 greater or equal. More...
 
giv_all_inlined friend int32_t operator<= (int64_t l, const Integer &n)
 greater or equal. More...
 
giv_all_inlined friend int32_t operator<= (uint64_t l, const Integer &n)
 greater or equal. More...
 
giv_all_inlined friend int32_t operator!= (uint32_t l, const Integer &n)
 operator != (not equal) More...
 
giv_all_inlined friend int32_t operator!= (float l, const Integer &n)
 greater or equal. More...
 
giv_all_inlined friend int32_t operator!= (double l, const Integer &n)
 greater or equal. More...
 
giv_all_inlined friend int32_t operator!= (int32_t l, const Integer &n)
 greater or equal. More...
 
giv_all_inlined friend int32_t operator!= (int64_t l, const Integer &n)
 greater or equal. More...
 
giv_all_inlined friend int32_t operator!= (uint64_t l, const Integer &n)
 greater or equal. More...
 
giv_all_inlined friend int32_t operator== (uint32_t l, const Integer &n)
 Equality. More...
 
giv_all_inlined friend int32_t operator== (float l, const Integer &n)
 greater or equal. More...
 
giv_all_inlined friend int32_t operator== (double l, const Integer &n)
 greater or equal. More...
 
giv_all_inlined friend int32_t operator== (int32_t l, const Integer &n)
 greater or equal. More...
 
giv_all_inlined friend int32_t operator== (int64_t l, const Integer &n)
 greater or equal. More...
 
giv_all_inlined friend int32_t operator== (uint64_t l, const Integer &n)
 greater or equal. More...
 
giv_all_inlined friend int32_t operator> (uint32_t l, const Integer &n)
 greater (strict) More...
 
giv_all_inlined friend int32_t operator> (float l, const Integer &n)
 greater or equal. More...
 
giv_all_inlined friend int32_t operator> (double l, const Integer &n)
 greater or equal. More...
 
giv_all_inlined friend int32_t operator> (int32_t l, const Integer &n)
 greater or equal. More...
 
giv_all_inlined friend int32_t operator> (int64_t l, const Integer &n)
 greater or equal. More...
 
giv_all_inlined friend int32_t operator> (uint64_t l, const Integer &n)
 greater or equal. More...
 
giv_all_inlined friend int32_t operator< (uint32_t l, const Integer &n)
 less (strict) More...
 
giv_all_inlined friend int32_t operator< (float l, const Integer &n)
 greater or equal. More...
 
giv_all_inlined friend int32_t operator< (double l, const Integer &n)
 greater or equal. More...
 
giv_all_inlined friend int32_t operator< (int32_t l, const Integer &n)
 greater or equal. More...
 
giv_all_inlined friend int32_t operator< (int64_t l, const Integer &n)
 greater or equal. More...
 
giv_all_inlined friend int32_t operator< (uint64_t l, const Integer &n)
 greater or equal. More...
 

Addition, substraction, multiplication operators

giv_all_inlined Integer operator+ (const Integer &n) const
 operator +. More...
 
giv_all_inlined Integer operator+ (const uint64_t n) const
 operator +. More...
 
giv_all_inlined Integer operator+ (const int64_t n) const
 operator +. More...
 
giv_all_inlined Integer operator+ (const uint32_t n) const
 operator +. More...
 
giv_all_inlined Integer operator+ (const int32_t n) const
 operator +. More...
 
giv_all_inlined Integeroperator+= (const Integer &n)
 operator += . More...
 
giv_all_inlined Integeroperator+= (const uint64_t n)
 operator +. More...
 
giv_all_inlined Integeroperator+= (const int64_t n)
 operator +. More...
 
giv_all_inlined Integeroperator+= (const uint32_t n)
 operator +. More...
 
giv_all_inlined Integeroperator+= (const int32_t n)
 operator +. More...
 
template<class XXX >
Integeroperator+= (const XXX &n)
 operator +. More...
 
giv_all_inlined Integer operator- (const Integer &n) const
 operator -. More...
 
giv_all_inlined Integer operator- (const uint64_t n) const
 operator +. More...
 
giv_all_inlined Integer operator- (const int64_t n) const
 operator +. More...
 
giv_all_inlined Integer operator- (const uint32_t n) const
 operator +. More...
 
giv_all_inlined Integer operator- (const int32_t n) const
 operator +. More...
 
giv_all_inlined Integeroperator-= (const Integer &n)
 operator -= . More...
 
giv_all_inlined Integeroperator-= (const uint64_t n)
 operator +. More...
 
giv_all_inlined Integeroperator-= (const int64_t n)
 operator +. More...
 
giv_all_inlined Integeroperator-= (const uint32_t n)
 operator +. More...
 
giv_all_inlined Integeroperator-= (const int32_t n)
 operator +. More...
 
template<class XXX >
Integeroperator-= (const XXX &n)
 operator +. More...
 
giv_all_inlined Integer operator- () const
 Opposite. More...
 
giv_all_inlined Integer operator* (const Integer &n) const
 operator *. More...
 
giv_all_inlined Integer operator* (const uint64_t n) const
 operator +. More...
 
giv_all_inlined Integer operator* (const int64_t n) const
 operator +. More...
 
giv_all_inlined Integer operator* (const uint32_t n) const
 operator +. More...
 
giv_all_inlined Integer operator* (const int32_t n) const
 operator +. More...
 
giv_all_inlined Integeroperator*= (const Integer &n)
 operator *= . More...
 
giv_all_inlined Integeroperator*= (const uint64_t n)
 operator +. More...
 
giv_all_inlined Integeroperator*= (const int64_t n)
 operator +. More...
 
giv_all_inlined Integeroperator*= (const uint32_t n)
 operator +. More...
 
giv_all_inlined Integeroperator*= (const int32_t n)
 operator +. More...
 
template<class XXX >
Integeroperator*= (const XXX &n)
 operator +. More...
 
giv_all_inlined Integer operator+ (const int32_t l, const Integer &n)
 operator +. More...
 
giv_all_inlined Integer operator+ (const uint32_t l, const Integer &n)
 operator +. More...
 
giv_all_inlined Integer operator+ (const int64_t l, const Integer &n)
 operator +. More...
 
giv_all_inlined Integer operator+ (const uint64_t l, const Integer &n)
 operator +. More...
 
giv_all_inlined Integer operator- (const int32_t l, const Integer &n)
 operator - More...
 
giv_all_inlined Integer operator- (const uint32_t l, const Integer &n)
 operator +. More...
 
giv_all_inlined Integer operator- (const int64_t l, const Integer &n)
 operator +. More...
 
giv_all_inlined Integer operator- (const uint64_t l, const Integer &n)
 operator +. More...
 
giv_all_inlined Integer operator* (const int32_t l, const Integer &n)
 operator * More...
 
giv_all_inlined Integer operator* (const uint32_t l, const Integer &n)
 operator +. More...
 
giv_all_inlined Integer operator* (const int64_t l, const Integer &n)
 operator +. More...
 
giv_all_inlined Integer operator* (const uint64_t l, const Integer &n)
 operator +. More...
 

Division/euclidean division/modulo

The convention for rounding are the following :

  • q = a/b, or equivalent operations with the name div or divin, return q rounded towards 0, in the same manner as C's '/' (truncated division).
  • r = a % b behaves like C %. The modulo function % rounds towards 0 and the sign of the dividend is preserved. This is :

    \[ a= b q + r, \text{with } \vert r\vert < \vert b\vert \text{ and } a r \geq 0 \]

  • r = a mod b or similar functions have the same behaviour as GMP mpz_mod, that is the remainder is always positive (>=0). This is the division algorithm convention that is used (see divmod). In a formula :

    \[ a= b q + r, \text{with } 0 \leq r < \vert b\vert \]

Warning
if q=a/b and r= a % b then a = b q + r is always true (with in addition 0 <= |r| < |b|). This is also true for divmod(q,a,b,r) (and 0<=r<|b|). However, one should not mix the two conventions and expect equalities (except if a>=0).
giv_all_inlined Integer operator/ (const Integer &d) const
 Division operator. More...
 
giv_all_inlined Integer operator/ (const uint64_t d) const
 Division q/=d. More...
 
giv_all_inlined Integer operator/ (const int64_t d) const
 Division q/=d. More...
 
giv_all_inlined Integer operator/ (const uint32_t d) const
 Division q/=d. More...
 
giv_all_inlined Integer operator/ (const int32_t d) const
 Division q/=d. More...
 
giv_all_inlined Integeroperator/= (const Integer &d)
 Division operator (inplace). More...
 
giv_all_inlined Integeroperator/= (const uint64_t d)
 Division q/=d. More...
 
giv_all_inlined Integeroperator/= (const int64_t d)
 Division q/=d. More...
 
giv_all_inlined Integeroperator/= (const uint32_t d)
 Division q/=d. More...
 
giv_all_inlined Integeroperator/= (const int32_t d)
 Division q/=d. More...
 
template<class XXX >
Integeroperator/= (const XXX &d)
 Division q/=d. More...
 
giv_all_inlined Integer operator% (const Integer &n) const
 Modulo operator. More...
 
giv_all_inlined int64_t operator% (const uint64_t n) const
 Division q/=d. More...
 
giv_all_inlined int64_t operator% (const int64_t n) const
 Division q/=d. More...
 
giv_all_inlined int32_t operator% (const uint32_t n) const
 Division q/=d. More...
 
giv_all_inlined int32_t operator% (const int32_t n) const
 Division q/=d. More...
 
giv_all_inlined double operator% (const double n) const
 Division q/=d. More...
 
int16_t operator% (const uint16_t n) const
 Division q/=d. More...
 
template<class XXX >
XXX operator% (const XXX &n) const
 Division q/=d. More...
 
giv_all_inlined Integeroperator%= (const Integer &n)
 Modulo operator (inplace). More...
 
giv_all_inlined Integeroperator%= (const uint64_t n)
 Division q/=d. More...
 
giv_all_inlined Integeroperator%= (const int64_t n)
 Division q/=d. More...
 
giv_all_inlined Integeroperator%= (const uint32_t n)
 Division q/=d. More...
 
giv_all_inlined Integeroperator%= (const int32_t n)
 Division q/=d. More...
 
template<class XXX >
Integeroperator%= (const XXX &n)
 Division q/=d. More...
 
static giv_all_inlined Integerdivin (Integer &q, const Integer &d)
 Division q/=d. More...
 
static giv_all_inlined Integerdivin (Integer &q, const int64_t d)
 Division q/=d. More...
 
static giv_all_inlined Integerdivin (Integer &q, const uint64_t d)
 Division q/=d. More...
 
static giv_all_inlined Integerdiv (Integer &q, const Integer &n, const Integer &d)
 Division q=n/d. More...
 
static giv_all_inlined Integerdiv (Integer &q, const Integer &n, const int64_t d)
 Division q/=d. More...
 
static giv_all_inlined Integerdiv (Integer &q, const Integer &n, const int32_t d)
 Division q/=d. More...
 
static giv_all_inlined Integerdiv (Integer &q, const Integer &n, const uint64_t d)
 Division q/=d. More...
 
static giv_all_inlined Integerdivexact (Integer &q, const Integer &n, const Integer &d)
 Division when d divides n. More...
 
static giv_all_inlined Integerdivexact (Integer &q, const Integer &n, const uint64_t &d)
 Division q/=d. More...
 
static giv_all_inlined Integerdivexact (Integer &q, const Integer &n, const int64_t &d)
 Division q/=d. More...
 
static giv_all_inlined Integer divexact (const Integer &n, const Integer &d)
 Division when d divides n. More...
 
static giv_all_inlined Integer divexact (const Integer &n, const uint64_t &d)
 Division q/=d. More...
 
static giv_all_inlined Integer divexact (const Integer &n, const int64_t &d)
 Division q/=d. More...
 
static giv_all_inlined Integertrem (Integer &r, const Integer &n, const Integer &d)
 Stuff.
 
static giv_all_inlined Integercrem (Integer &r, const Integer &n, const Integer &d)
 Division q/=d. More...
 
static giv_all_inlined Integerfrem (Integer &r, const Integer &n, const Integer &d)
 Division q/=d. More...
 
static giv_all_inlined Integertrem (Integer &r, const Integer &n, const uint64_t &d)
 Stuff.
 
static giv_all_inlined Integercrem (Integer &r, const Integer &n, const uint64_t &d)
 Division q/=d. More...
 
static giv_all_inlined Integerfrem (Integer &r, const Integer &n, const uint64_t &d)
 Division q/=d. More...
 
static giv_all_inlined uint64_t trem (const Integer &n, const uint64_t &d)
 Stuff.
 
static giv_all_inlined uint64_t crem (const Integer &n, const uint64_t &d)
 Division q/=d. More...
 
static giv_all_inlined uint64_t frem (const Integer &n, const uint64_t &d)
 Division q/=d. More...
 
static giv_all_inlined Integermodin (Integer &r, const Integer &n)
 Function mod (inplace). More...
 
static giv_all_inlined Integermodin (Integer &r, const int64_t n)
 Division q/=d. More...
 
static giv_all_inlined Integermodin (Integer &r, const uint64_t n)
 Division q/=d. More...
 
static giv_all_inlined Integermod (Integer &r, const Integer &n, const Integer &d)
 Function mod. More...
 
static giv_all_inlined Integermod (Integer &r, const Integer &n, const int64_t d)
 Division q/=d. More...
 
static giv_all_inlined Integermod (Integer &r, const Integer &n, const uint64_t d)
 Division q/=d. More...
 
static giv_all_inlined Integermod (Integer &r, const Integer &n, const int32_t d)
 Division q/=d. More...
 
static giv_all_inlined Integermod (Integer &r, const Integer &n, const uint32_t d)
 Division q/=d. More...
 
static giv_all_inlined Integerdivmod (Integer &q, Integer &r, const Integer &n, const Integer &d)
 Euclidean division. More...
 
static giv_all_inlined Integerdivmod (Integer &q, int64_t &r, const Integer &n, const int64_t d)
 Division q/=d. More...
 
static giv_all_inlined Integerdivmod (Integer &q, uint64_t &r, const Integer &n, const uint64_t d)
 Division q/=d. More...
 
static giv_all_inlined Integerceil (Integer &res, const Integer &n, const Integer &d)
 rounding functions. More...
 
static giv_all_inlined Integerfloor (Integer &res, const Integer &n, const Integer &d)
 
static giv_all_inlined Integertrunc (Integer &res, const Integer &n, const Integer &d)
 
static giv_all_inlined Integer ceil (const Integer &n, const Integer &d)
 rounding functions. More...
 
static giv_all_inlined Integer floor (const Integer &n, const Integer &d)
 
static giv_all_inlined Integer trunc (const Integer &n, const Integer &d)
 
giv_all_inlined Integer operator/ (const int32_t l, const Integer &n)
 operator /
 
giv_all_inlined Integer operator/ (const int64_t l, const Integer &n)
 Division operator. More...
 
giv_all_inlined Integer operator/ (const uint32_t l, const Integer &n)
 operator /
 
giv_all_inlined Integer operator/ (const uint64_t l, const Integer &n)
 Division operator. More...
 
giv_all_inlined Integer operator% (const int64_t l, const Integer &n)
 operator % More...
 
giv_all_inlined Integer operator% (const uint64_t l, const Integer &n)
 Division operator. More...
 
giv_all_inlined Integer operator% (const int32_t l, const Integer &n)
 Division operator. More...
 
giv_all_inlined Integer operator% (const uint32_t l, const Integer &n)
 Division operator. More...
 

Miscellaneous.

int32_t sign () const
 sign
 
int32_t priv_sign () const
 private sign
 
giv_all_inlined void swap (Integer &a, Integer &b)
 
int32_t sign (const Integer &a)
 sign More...
 

representation

get representation

mpz_ptr get_mpz ()
 get representation (constant)
 
mpz_srcptr get_mpz () const
 get representation (constant)
 
mpz_srcptr get_mpz_const () const
 get representation (constant)
 
giv_all_inlined size_t size () const
 returns the number of machine words used to store *this

 
giv_all_inlined size_t size_in_base (int32_t B) const
 returns ceil(log_BASE(*this)). More...
 
giv_all_inlined size_t bitsize () const
 returns ceil(log_2(*this)) . More...
 
giv_all_inlined uint64_t operator[] (size_t i) const
 return the i-th word of the integer. More...
 
giv_all_inlined uint64_t length (const Integer &a)
 returns the number of bytes used to store *this
More...
 
giv_all_inlined int32_t isperfectpower (const Integer &n)
 perfect power
 
giv_all_inlined Integer abs (const Integer &n)
 absolute value
 
giv_all_inlined bool isOdd (const Integer &)
 parity of an integer More...
 

I/O

giv_all_inlined std::ostream & print (std::ostream &o) const
 print32_t integer. More...
 
giv_all_inlined std::istream & operator>> (std::istream &i, Integer &n)
 Input/Output of Integers. More...
 
giv_all_inlined std::ostream & operator<< (std::ostream &o, const Integer &n)
 out operator. More...
 
giv_all_inlined std::ostream & absOutput (std::ostream &o, const Integer &n)
 nodoc More...
 
giv_all_inlined void Protected::importWords (Integer &x, size_t count, int32_t order, int32_t size, int32_t endian, size_t nails, const void *op)
 nodoc More...
 

Comparisons functions.

template<class A , class B >
static giv_all_inlined bool isleq (const A &a, const B &b)
 isleq More...
 
giv_all_inlined friend int32_t compare (const Integer &a, const Integer &b)
 Compares two integers. More...
 
giv_all_inlined friend int32_t absCompare (const Integer &a, const Integer &b)
 Compare the norm of two integers. More...
 
giv_all_inlined friend int32_t absCompare (const Integer &a, const double b)
 isleq More...
 
giv_all_inlined friend int32_t absCompare (const Integer &a, const float b)
 isleq More...
 
giv_all_inlined friend int32_t absCompare (const Integer &a, const uint64_t b)
 isleq More...
 
giv_all_inlined friend int32_t absCompare (const Integer &a, const unsigned b)
 isleq More...
 
giv_all_inlined friend int32_t absCompare (const Integer &a, const int64_t b)
 isleq More...
 
giv_all_inlined friend int32_t absCompare (const Integer &a, const int32_t b)
 isleq More...
 
template<class T >
giv_all_inlined friend int32_t absCompare (const T a, const Integer &b)
 isleq More...
 
giv_all_inlined int32_t isOne (const Integer &a)
 name compare to 1 and 0 More...
 
giv_all_inlined int32_t isMOne (const Integer &a)
 isleq More...
 
giv_all_inlined int32_t nonZero (const Integer &a)
 name compare to 1 and 0 More...
 
giv_all_inlined int32_t isZero (const Integer &a)
 name compare to 1 and 0 More...
 
giv_all_inlined int32_t isZero (const int16_t a)
 isleq More...
 
giv_all_inlined int32_t isZero (const int32_t a)
 isleq More...
 
giv_all_inlined int32_t isZero (const int64_t a)
 isleq More...
 
giv_all_inlined int32_t isZero (const uint16_t a)
 isleq More...
 
giv_all_inlined int32_t isZero (const uint32_t a)
 isleq More...
 
giv_all_inlined int32_t isZero (const uint64_t a)
 isleq More...
 

Detailed Description

This is the Integer class.

An Integer is represented as a GMP integer. This class provides arithmetic on Integers.

Examples
examples/Integer/Fibonacci.C.

Constructor & Destructor Documentation

◆ Integer() [1/13]

Integer ( int32_t  n = 0)

Constructor form a known type.

Parameters
ninput to be constructed from

◆ Integer() [2/13]

Integer ( int64_t  n)

Constructor form a known type.

Parameters
ninput to be constructed from

◆ Integer() [3/13]

Integer ( unsigned char  n)

Constructor form a known type.

Parameters
ninput to be constructed from

◆ Integer() [4/13]

Integer ( uint32_t  n)

Constructor form a known type.

Parameters
ninput to be constructed from

◆ Integer() [5/13]

Integer ( uint64_t  n)

Constructor form a known type.

Parameters
ninput to be constructed from

◆ Integer() [6/13]

Integer ( double  n)

Constructor form a known type.

Parameters
ninput to be constructed from

◆ Integer() [7/13]

Integer ( const char *  n)

Constructor form a known type.

Parameters
ninput to be constructed from

◆ Integer() [8/13]

giv_all_inlined Integer ( const mpz_class &  a)
inline

Constructor form a known type.

Parameters
ninput to be constructed from

◆ Integer() [9/13]

Integer ( const RecInt::ruint< K > &  n)
inline

Constructor form a known type.

Parameters
ninput to be constructed from

◆ Integer() [10/13]

Integer ( const RecInt::rint< K > &  n)
inline

Constructor form a known type.

Parameters
ninput to be constructed from

◆ Integer() [11/13]

Integer ( const Integer n)

Copy constructor.

Parameters
ninput to be constructed from

◆ Integer() [12/13]

giv_all_inlined Integer ( uint64_t *  d,
int64_t  sz 
)

Creates a new Integer from pointers.

Parameters
darray
szsize

◆ Integer() [13/13]

Integer ( const vect_t v)

Creates a new Integers for a vector of limbs.

Parameters
vvector of limbs

Member Function Documentation

◆ operator=()

Integer & operator= ( const Integer n)

copy from an integer.

Parameters
ninteger to copy.

◆ logcpy()

Integer & logcpy ( const Integer n)

copy from an integer.

Parameters
ninteger to copy.

◆ copy()

Integer & copy ( const Integer n)

copy from an integer.

Parameters
ninteger to copy.

◆ isleq()

static giv_all_inlined bool isleq ( const A &  a,
const B &  b 
)
inlinestatic

isleq

Parameters
a,b

◆ operator>=() [1/7]

int32_t operator>= ( const Integer l) const

greater or equal.

Parameters
linteger to be compared to

◆ operator>=() [2/7]

int32_t operator>= ( const int32_t  l) const

greater or equal.

Parameters
linteger to be compared to

◆ operator>=() [3/7]

int32_t operator>= ( const int64_t  l) const

greater or equal.

Parameters
linteger to be compared to

◆ operator>=() [4/7]

int32_t operator>= ( const uint64_t  l) const

greater or equal.

Parameters
linteger to be compared to

◆ operator>=() [5/7]

int32_t operator>= ( const uint32_t  l) const

greater or equal.

Parameters
linteger to be compared to

◆ operator>=() [6/7]

int32_t operator>= ( const double  l) const

greater or equal.

Parameters
linteger to be compared to

◆ operator>=() [7/7]

int32_t operator>= ( const float  l) const

greater or equal.

Parameters
linteger to be compared to

◆ operator<=() [1/7]

int32_t operator<= ( const Integer l) const

less or equal

Parameters
linteger to be compared to

◆ operator<=() [2/7]

int32_t operator<= ( const int32_t  l) const

greater or equal.

Parameters
linteger to be compared to

◆ operator<=() [3/7]

int32_t operator<= ( const int64_t  l) const

greater or equal.

Parameters
linteger to be compared to

◆ operator<=() [4/7]

int32_t operator<= ( const uint64_t  l) const

greater or equal.

Parameters
linteger to be compared to

◆ operator<=() [5/7]

int32_t operator<= ( const uint32_t  l) const

greater or equal.

Parameters
linteger to be compared to

◆ operator<=() [6/7]

int32_t operator<= ( const double  l) const

greater or equal.

Parameters
linteger to be compared to

◆ operator<=() [7/7]

int32_t operator<= ( const float  l) const

greater or equal.

Parameters
linteger to be compared to

◆ operator!=() [1/7]

int32_t operator!= ( const Integer l) const

operator != (not equal)

Parameters
linteger
Returns
1 iff l == this

◆ operator!=() [2/7]

int32_t operator!= ( const int32_t  l) const

greater or equal.

Parameters
linteger to be compared to

◆ operator!=() [3/7]

int32_t operator!= ( const int64_t  l) const

greater or equal.

Parameters
linteger to be compared to

◆ operator!=() [4/7]

int32_t operator!= ( const uint64_t  l) const

greater or equal.

Parameters
linteger to be compared to

◆ operator!=() [5/7]

int32_t operator!= ( const uint32_t  l) const

greater or equal.

Parameters
linteger to be compared to

◆ operator!=() [6/7]

int32_t operator!= ( const double  l) const

greater or equal.

Parameters
linteger to be compared to

◆ operator!=() [7/7]

int32_t operator!= ( const float  l) const

greater or equal.

Parameters
linteger to be compared to

◆ operator==() [1/7]

int32_t operator== ( const Integer l) const

Equality.

Parameters
linteger to be compared to

◆ operator==() [2/7]

int32_t operator== ( const int32_t  l) const

greater or equal.

Parameters
linteger to be compared to

◆ operator==() [3/7]

int32_t operator== ( const int64_t  l) const

greater or equal.

Parameters
linteger to be compared to

◆ operator==() [4/7]

int32_t operator== ( const uint64_t  l) const

greater or equal.

Parameters
linteger to be compared to

◆ operator==() [5/7]

int32_t operator== ( const uint32_t  l) const

greater or equal.

Parameters
linteger to be compared to

◆ operator==() [6/7]

int32_t operator== ( const double  l) const

greater or equal.

Parameters
linteger to be compared to

◆ operator==() [7/7]

int32_t operator== ( const float  l) const

greater or equal.

Parameters
linteger to be compared to

◆ operator>() [1/7]

int32_t operator> ( const Integer l) const

greater (strict)

Parameters
linteger to be compared to

◆ operator>() [2/7]

int32_t operator> ( const int32_t  l) const

greater or equal.

Parameters
linteger to be compared to

◆ operator>() [3/7]

int32_t operator> ( const int64_t  l) const

greater or equal.

Parameters
linteger to be compared to

◆ operator>() [4/7]

int32_t operator> ( const uint64_t  l) const

greater or equal.

Parameters
linteger to be compared to

◆ operator>() [5/7]

int32_t operator> ( const uint32_t  l) const

greater or equal.

Parameters
linteger to be compared to

◆ operator>() [6/7]

int32_t operator> ( const double  l) const

greater or equal.

Parameters
linteger to be compared to

◆ operator>() [7/7]

int32_t operator> ( const float  l) const

greater or equal.

Parameters
linteger to be compared to

◆ operator<() [1/7]

int32_t operator< ( const Integer l) const

less (strict)

Parameters
linteger to be compared to

◆ operator<() [2/7]

int32_t operator< ( const int32_t  l) const

greater or equal.

Parameters
linteger to be compared to

◆ operator<() [3/7]

int32_t operator< ( const int64_t  l) const

greater or equal.

Parameters
linteger to be compared to

◆ operator<() [4/7]

int32_t operator< ( const uint64_t  l) const

greater or equal.

Parameters
linteger to be compared to

◆ operator<() [5/7]

int32_t operator< ( const uint32_t  l) const

greater or equal.

Parameters
linteger to be compared to

◆ operator<() [6/7]

int32_t operator< ( const double  l) const

greater or equal.

Parameters
linteger to be compared to

◆ operator<() [7/7]

int32_t operator< ( const float  l) const

greater or equal.

Parameters
linteger to be compared to

◆ operator^() [1/3]

Integer operator^ ( const Integer a) const

XOR (^)

Parameters
ainteger

◆ operator^() [2/3]

Integer operator^ ( const uint64_t &  a) const

XOR (^)

Parameters
ainteger

◆ operator^() [3/3]

Integer operator^ ( const uint32_t &  a) const

XOR (^)

Parameters
ainteger

◆ operator^=() [1/3]

Integer & operator^= ( const Integer a)

XOR inplace (^=)

Parameters
ainteger

◆ operator^=() [2/3]

Integer & operator^= ( const uint64_t &  a)

XOR (^)

Parameters
ainteger

◆ operator^=() [3/3]

Integer & operator^= ( const uint32_t &  a)

XOR (^)

Parameters
ainteger

◆ operator|() [1/3]

Integer operator| ( const Integer a) const

OR (|)

Parameters
ainteger

◆ operator|() [2/3]

Integer operator| ( const uint64_t &  a) const

XOR (^)

Parameters
ainteger

◆ operator|() [3/3]

Integer operator| ( const uint32_t &  a) const

XOR (^)

Parameters
ainteger

◆ operator|=() [1/3]

Integer & operator|= ( const Integer a)

OR inplace (|=)

Parameters
ainteger

◆ operator|=() [2/3]

Integer & operator|= ( const uint64_t &  a)

XOR (^)

Parameters
ainteger

◆ operator|=() [3/3]

Integer & operator|= ( const uint32_t &  a)

XOR (^)

Parameters
ainteger

◆ operator&() [1/3]

Integer operator& ( const Integer a) const

AND (&)

Parameters
ainteger

◆ operator&() [2/3]

uint32_t operator& ( const uint32_t &  a) const

XOR (^)

Parameters
ainteger

◆ operator&() [3/3]

uint64_t operator& ( const uint64_t &  a) const

XOR (^)

Parameters
ainteger

◆ operator&=() [1/3]

Integer & operator&= ( const Integer a)

AND inplace (&=)

Parameters
ainteger

◆ operator&=() [2/3]

Integer & operator&= ( const uint64_t &  a)

XOR (^)

Parameters
ainteger

◆ operator&=() [3/3]

Integer & operator&= ( const uint32_t &  a)

XOR (^)

Parameters
ainteger

◆ operator<<() [1/4]

Integer operator<< ( int32_t  l) const

left shift (<<)

Parameters
lshift

◆ operator<<() [2/4]

Integer operator<< ( int64_t  l) const

XOR (^)

Parameters
ainteger

◆ operator<<() [3/4]

Integer operator<< ( uint32_t  l) const

XOR (^)

Parameters
ainteger

◆ operator<<() [4/4]

Integer operator<< ( uint64_t  l) const

XOR (^)

Parameters
ainteger

◆ operator<<=() [1/4]

Integer & operator<<= ( int32_t  l)

left shift inplace (<<=)

Parameters
lshift

◆ operator<<=() [2/4]

Integer & operator<<= ( int64_t  l)

XOR (^)

Parameters
ainteger

◆ operator<<=() [3/4]

Integer & operator<<= ( uint32_t  l)

XOR (^)

Parameters
ainteger

◆ operator<<=() [4/4]

Integer & operator<<= ( uint64_t  l)

XOR (^)

Parameters
ainteger

◆ operator>>() [1/4]

Integer operator>> ( int32_t  l) const

right shift (>>)

Parameters
lshift

◆ operator>>() [2/4]

Integer operator>> ( int64_t  l) const

XOR (^)

Parameters
ainteger

◆ operator>>() [3/4]

Integer operator>> ( uint32_t  l) const

XOR (^)

Parameters
ainteger

◆ operator>>() [4/4]

Integer operator>> ( uint64_t  l) const

XOR (^)

Parameters
ainteger

◆ operator>>=() [1/4]

Integer & operator>>= ( int32_t  l)

right shift inplace (>>=)

Parameters
lshift

◆ operator>>=() [2/4]

Integer & operator>>= ( int64_t  l)

XOR (^)

Parameters
ainteger

◆ operator>>=() [3/4]

Integer & operator>>= ( uint32_t  l)

XOR (^)

Parameters
ainteger

◆ operator>>=() [4/4]

Integer & operator>>= ( uint64_t  l)

XOR (^)

Parameters
ainteger

◆ addin() [1/5]

Integer & addin ( Integer res,
const Integer n 
)
static

Addition (inplace) res+=n.

Parameters
resas in the formula
nas in the formula

◆ addin() [2/5]

Integer & addin ( Integer res,
const int64_t  n 
)
static

Addition (inplace) res+=n.

Parameters
resas in the formula
nas in the formula

◆ addin() [3/5]

Integer & addin ( Integer res,
const uint64_t  n 
)
static

Addition (inplace) res+=n.

Parameters
resas in the formula
nas in the formula

◆ addin() [4/5]

static giv_all_inlined Integer& addin ( Integer res,
const int32_t  n 
)
inlinestatic

Addition (inplace) res+=n.

Parameters
resas in the formula
nas in the formula

◆ addin() [5/5]

static giv_all_inlined Integer& addin ( Integer res,
const uint32_t  n 
)
inlinestatic

Addition (inplace) res+=n.

Parameters
resas in the formula
nas in the formula

◆ add() [1/5]

Integer & add ( Integer res,
const Integer n1,
const Integer n2 
)
static

Addition res=n1+n2.

Parameters
resas in the formula
n1as in the formula
n2as in the formula

◆ add() [2/5]

Integer & add ( Integer res,
const Integer n1,
const int64_t  n2 
)
static

Addition (inplace) res+=n.

Parameters
resas in the formula
nas in the formula

◆ add() [3/5]

Integer & add ( Integer res,
const Integer n1,
const uint64_t  n2 
)
static

Addition (inplace) res+=n.

Parameters
resas in the formula
nas in the formula

◆ add() [4/5]

static giv_all_inlined Integer& add ( Integer res,
const Integer n1,
const int32_t  n2 
)
inlinestatic

Addition (inplace) res+=n.

Parameters
resas in the formula
nas in the formula

◆ add() [5/5]

static giv_all_inlined Integer& add ( Integer res,
const Integer n1,
const uint32_t  n2 
)
inlinestatic

Addition (inplace) res+=n.

Parameters
resas in the formula
nas in the formula

◆ subin() [1/5]

Integer & subin ( Integer res,
const Integer n 
)
static

Substraction (inplace) res-=n.

Parameters
resas in the formula
nas in the formula

◆ subin() [2/5]

Integer & subin ( Integer res,
const int64_t  n 
)
static

Addition (inplace) res+=n.

Parameters
resas in the formula
nas in the formula

◆ subin() [3/5]

Integer & subin ( Integer res,
const uint64_t  n 
)
static

Addition (inplace) res+=n.

Parameters
resas in the formula
nas in the formula

◆ subin() [4/5]

static giv_all_inlined Integer& subin ( Integer res,
const int32_t  n 
)
inlinestatic

Addition (inplace) res+=n.

Parameters
resas in the formula
nas in the formula

◆ subin() [5/5]

static giv_all_inlined Integer& subin ( Integer res,
const uint32_t  n 
)
inlinestatic

Addition (inplace) res+=n.

Parameters
resas in the formula
nas in the formula

◆ sub() [1/5]

Integer & sub ( Integer res,
const Integer n1,
const Integer n2 
)
static

Substraction res=n1-n2.

Parameters
resas in the formula
n1as in the formula
n2as in the formula
Examples
examples/Integer/Fibonacci.C.

◆ sub() [2/5]

Integer & sub ( Integer res,
const Integer n1,
const int64_t  n2 
)
static

Addition (inplace) res+=n.

Parameters
resas in the formula
nas in the formula

◆ sub() [3/5]

Integer & sub ( Integer res,
const Integer n1,
const uint64_t  n2 
)
static

Addition (inplace) res+=n.

Parameters
resas in the formula
nas in the formula

◆ sub() [4/5]

static giv_all_inlined Integer& sub ( Integer res,
const Integer n1,
const int32_t  n2 
)
inlinestatic

Addition (inplace) res+=n.

Parameters
resas in the formula
nas in the formula

◆ sub() [5/5]

static giv_all_inlined Integer& sub ( Integer res,
const Integer n1,
const uint32_t  n2 
)
inlinestatic

Addition (inplace) res+=n.

Parameters
resas in the formula
nas in the formula

◆ negin()

Integer & negin ( Integer res)
static

Negation (inplace) res=-res.

Parameters
resas in the formula

◆ neg()

Integer & neg ( Integer res,
const Integer n 
)
static

Negation res=-n.

Parameters
nas in the formula
resas in the formula

◆ mulin() [1/5]

Integer & mulin ( Integer res,
const Integer n 
)
static

Multiplication (inplace) res*=n.

Parameters
resas in the formula
nas in the formula

◆ mulin() [2/5]

Integer & mulin ( Integer res,
const int64_t  n 
)
static

Addition (inplace) res+=n.

Parameters
resas in the formula
nas in the formula

◆ mulin() [3/5]

Integer & mulin ( Integer res,
const uint64_t  n 
)
static

Addition (inplace) res+=n.

Parameters
resas in the formula
nas in the formula

◆ mulin() [4/5]

static giv_all_inlined Integer& mulin ( Integer res,
const int32_t  n 
)
inlinestatic

Addition (inplace) res+=n.

Parameters
resas in the formula
nas in the formula

◆ mulin() [5/5]

static giv_all_inlined Integer& mulin ( Integer res,
const uint32_t  n 
)
inlinestatic

Addition (inplace) res+=n.

Parameters
resas in the formula
nas in the formula

◆ mul() [1/5]

Integer & mul ( Integer res,
const Integer n1,
const Integer n2 
)
static

Multiplication res=n1*n2.

Parameters
resas in the formula
n1as in the formula
n2as in the formula

◆ mul() [2/5]

Integer & mul ( Integer res,
const Integer n1,
const int64_t  n2 
)
static

Addition (inplace) res+=n.

Parameters
resas in the formula
nas in the formula

◆ mul() [3/5]

Integer & mul ( Integer res,
const Integer n1,
const uint64_t  n2 
)
static

Addition (inplace) res+=n.

Parameters
resas in the formula
nas in the formula

◆ mul() [4/5]

static giv_all_inlined Integer& mul ( Integer res,
const Integer n1,
const int32_t  n2 
)
inlinestatic

Addition (inplace) res+=n.

Parameters
resas in the formula
nas in the formula

◆ mul() [5/5]

static giv_all_inlined Integer& mul ( Integer res,
const Integer n1,
const uint32_t  n2 
)
inlinestatic

Addition (inplace) res+=n.

Parameters
resas in the formula
nas in the formula

◆ operator+() [1/5]

Integer operator+ ( const Integer n) const

operator +.

Returns
(*this)+n
Parameters
nas in the formula.

◆ operator+() [2/5]

Integer operator+ ( const uint64_t  n) const

operator +.

Returns
(*this)+n
Parameters
nas in the formula.

◆ operator+() [3/5]

Integer operator+ ( const int64_t  n) const

operator +.

Returns
(*this)+n
Parameters
nas in the formula.

◆ operator+() [4/5]

giv_all_inlined Integer operator+ ( const uint32_t  n) const
inline

operator +.

Returns
(*this)+n
Parameters
nas in the formula.

◆ operator+() [5/5]

giv_all_inlined Integer operator+ ( const int32_t  n) const
inline

operator +.

Returns
(*this)+n
Parameters
nas in the formula.

◆ operator+=() [1/6]

Integer & operator+= ( const Integer n)

operator += .

Parameters
nasfriend In the formula.
Returns
(*this) += n.

◆ operator+=() [2/6]

Integer & operator+= ( const uint64_t  n)

operator +.

Returns
(*this)+n
Parameters
nas in the formula.

◆ operator+=() [3/6]

Integer & operator+= ( const int64_t  n)

operator +.

Returns
(*this)+n
Parameters
nas in the formula.

◆ operator+=() [4/6]

giv_all_inlined Integer& operator+= ( const uint32_t  n)
inline

operator +.

Returns
(*this)+n
Parameters
nas in the formula.

◆ operator+=() [5/6]

giv_all_inlined Integer& operator+= ( const int32_t  n)
inline

operator +.

Returns
(*this)+n
Parameters
nas in the formula.

◆ operator+=() [6/6]

Integer& operator+= ( const XXX &  n)
inline

operator +.

Returns
(*this)+n
Parameters
nas in the formula.

◆ operator-() [1/6]

Integer operator- ( const Integer n) const

operator -.

Returns
(*this)-n
Parameters
nas in the formula.

◆ operator-() [2/6]

Integer operator- ( const uint64_t  n) const

operator +.

Returns
(*this)+n
Parameters
nas in the formula.

◆ operator-() [3/6]

Integer operator- ( const int64_t  n) const

operator +.

Returns
(*this)+n
Parameters
nas in the formula.

◆ operator-() [4/6]

giv_all_inlined Integer operator- ( const uint32_t  n) const
inline

operator +.

Returns
(*this)+n
Parameters
nas in the formula.

◆ operator-() [5/6]

giv_all_inlined Integer operator- ( const int32_t  n) const
inline

operator +.

Returns
(*this)+n
Parameters
nas in the formula.

◆ operator-=() [1/6]

Integer & operator-= ( const Integer n)

operator -= .

Parameters
nas in the formula.
Returns
(*this) -= n.

◆ operator-=() [2/6]

Integer & operator-= ( const uint64_t  n)

operator +.

Returns
(*this)+n
Parameters
nas in the formula.

◆ operator-=() [3/6]

Integer & operator-= ( const int64_t  n)

operator +.

Returns
(*this)+n
Parameters
nas in the formula.

◆ operator-=() [4/6]

giv_all_inlined Integer& operator-= ( const uint32_t  n)
inline

operator +.

Returns
(*this)+n
Parameters
nas in the formula.

◆ operator-=() [5/6]

giv_all_inlined Integer& operator-= ( const int32_t  n)
inline

operator +.

Returns
(*this)+n
Parameters
nas in the formula.

◆ operator-=() [6/6]

Integer& operator-= ( const XXX &  n)
inline

operator +.

Returns
(*this)+n
Parameters
nas in the formula.

◆ operator-() [6/6]

Integer operator- ( ) const

Opposite.

Returns
-(*this).

◆ operator*() [1/5]

Integer operator* ( const Integer n) const

operator *.

Returns
(*this)*n
Parameters
nas in the formula.

◆ operator*() [2/5]

Integer operator* ( const uint64_t  n) const

operator +.

Returns
(*this)+n
Parameters
nas in the formula.

◆ operator*() [3/5]

Integer operator* ( const int64_t  n) const

operator +.

Returns
(*this)+n
Parameters
nas in the formula.

◆ operator*() [4/5]

giv_all_inlined Integer operator* ( const uint32_t  n) const
inline

operator +.

Returns
(*this)+n
Parameters
nas in the formula.

◆ operator*() [5/5]

giv_all_inlined Integer operator* ( const int32_t  n) const
inline

operator +.

Returns
(*this)+n
Parameters
nas in the formula.

◆ operator*=() [1/6]

Integer & operator*= ( const Integer n)

operator *= .

Parameters
nas in the formula.
Returns
(*this) *= n.

◆ operator*=() [2/6]

Integer & operator*= ( const uint64_t  n)

operator +.

Returns
(*this)+n
Parameters
nas in the formula.

◆ operator*=() [3/6]

Integer & operator*= ( const int64_t  n)

operator +.

Returns
(*this)+n
Parameters
nas in the formula.

◆ operator*=() [4/6]

giv_all_inlined Integer& operator*= ( const uint32_t  n)
inline

operator +.

Returns
(*this)+n
Parameters
nas in the formula.

◆ operator*=() [5/6]

giv_all_inlined Integer& operator*= ( const int32_t  n)
inline

operator +.

Returns
(*this)+n
Parameters
nas in the formula.

◆ operator*=() [6/6]

Integer& operator*= ( const XXX &  n)
inline

operator +.

Returns
(*this)+n
Parameters
nas in the formula.

◆ axpy() [1/2]

Integer & axpy ( Integer res,
const Integer a,
const Integer x,
const Integer y 
)
static

axpy res = ax+y.

Parameters
resIntegers as in the forumla
aIntegers as in the forumla
xIntegers as in the forumla
yIntegers as in the forumla

◆ axpy() [2/2]

Integer & axpy ( Integer res,
const Integer a,
const uint64_t  x,
const Integer y 
)
static

axpy res = ax+y.

Parameters
resIntegers as in the forumla
aIntegers as in the forumla
xIntegers as in the forumla
yIntegers as in the forumla

◆ axpyin() [1/2]

Integer & axpyin ( Integer res,
const Integer a,
const Integer x 
)
static

axpyin (inplace) res += ax.

Parameters
resIntegers as in the formula.
aIntegers as in the formula.
xIntegers as in the formula.

◆ axpyin() [2/2]

Integer & axpyin ( Integer res,
const Integer a,
const uint64_t  x 
)
static

axpy res = ax+y.

Parameters
resIntegers as in the forumla
aIntegers as in the forumla
xIntegers as in the forumla
yIntegers as in the forumla

◆ maxpy() [1/2]

Integer & maxpy ( Integer res,
const Integer a,
const Integer x,
const Integer y 
)
static

maxpy res = y - ax.

Parameters
resIntegers as in the formula.
aIntegers as in the formula.
xIntegers as in the formula.
yIntegers as in the formula.

◆ maxpy() [2/2]

Integer & maxpy ( Integer res,
const Integer a,
const uint64_t  x,
const Integer y 
)
static

axpy res = ax+y.

Parameters
resIntegers as in the forumla
aIntegers as in the forumla
xIntegers as in the forumla
yIntegers as in the forumla

◆ maxpyin() [1/2]

Integer & maxpyin ( Integer res,
const Integer a,
const Integer x 
)
static

maxpyin res -= ax.

Parameters
resIntegers as in the formula.
aIntegers as in the formula.
xIntegers as in the formula.

◆ maxpyin() [2/2]

Integer & maxpyin ( Integer res,
const Integer a,
const uint64_t  x 
)
static

axpy res = ax+y.

Parameters
resIntegers as in the forumla
aIntegers as in the forumla
xIntegers as in the forumla
yIntegers as in the forumla

◆ axmy() [1/2]

Integer & axmy ( Integer res,
const Integer a,
const Integer x,
const Integer y 
)
static

axmy res = ax - y.

Parameters
resIntegers as in the formula.
aIntegers as in the formula.
xIntegers as in the formula.
yIntegers as in the formula.

◆ axmy() [2/2]

Integer & axmy ( Integer res,
const Integer a,
const uint64_t  x,
const Integer y 
)
static

axpy res = ax+y.

Parameters
resIntegers as in the forumla
aIntegers as in the forumla
xIntegers as in the forumla
yIntegers as in the forumla

◆ axmyin() [1/2]

Integer & axmyin ( Integer res,
const Integer a,
const Integer x 
)
static

axmyin (in place) res = ax - res.

Parameters
resIntegers as in the formula.
aIntegers as in the formula.
xIntegers as in the formula.

◆ axmyin() [2/2]

Integer & axmyin ( Integer res,
const Integer a,
const uint64_t  x 
)
static

axpy res = ax+y.

Parameters
resIntegers as in the forumla
aIntegers as in the forumla
xIntegers as in the forumla
yIntegers as in the forumla

◆ divin() [1/3]

Integer & divin ( Integer q,
const Integer d 
)
static

Division q/=d.

Parameters
qquotient
ddivisor.
Returns
q

◆ divin() [2/3]

Integer & divin ( Integer q,
const int64_t  d 
)
static

Division q/=d.

Parameters
qquotient
ddivisor.
Returns
q

◆ divin() [3/3]

Integer & divin ( Integer q,
const uint64_t  d 
)
static

Division q/=d.

Parameters
qquotient
ddivisor.
Returns
q

◆ div() [1/4]

Integer & div ( Integer q,
const Integer n,
const Integer d 
)
static

Division q=n/d.

Parameters
qquotient
ndividand.
ddivisor
Returns
q

◆ div() [2/4]

Integer & div ( Integer q,
const Integer n,
const int64_t  d 
)
static

Division q/=d.

Parameters
qquotient
ddivisor.
Returns
q

◆ div() [3/4]

Integer & div ( Integer q,
const Integer n,
const int32_t  d 
)
static

Division q/=d.

Parameters
qquotient
ddivisor.
Returns
q

◆ div() [4/4]

Integer & div ( Integer q,
const Integer n,
const uint64_t  d 
)
static

Division q/=d.

Parameters
qquotient
ddivisor.
Returns
q

◆ divexact() [1/6]

Integer & divexact ( Integer q,
const Integer n,
const Integer d 
)
static

Division when d divides n.

Parameters
qexact quotient
ndividend
ddivisor
Warning
if quotient is not exact, the result is not predictable.

◆ divexact() [2/6]

Integer & divexact ( Integer q,
const Integer n,
const uint64_t &  d 
)
static

Division q/=d.

Parameters
qquotient
ddivisor.
Returns
q

◆ divexact() [3/6]

Integer & divexact ( Integer q,
const Integer n,
const int64_t &  d 
)
static

Division q/=d.

Parameters
qquotient
ddivisor.
Returns
q

◆ divexact() [4/6]

Integer divexact ( const Integer n,
const Integer d 
)
static

Division when d divides n.

Parameters
ndividend
ddivisor
Returns
exact quotient n/d
Warning
if quotient is not exact, the result is not predictable.

◆ divexact() [5/6]

Integer divexact ( const Integer n,
const uint64_t &  d 
)
static

Division q/=d.

Parameters
qquotient
ddivisor.
Returns
q

◆ divexact() [6/6]

Integer divexact ( const Integer n,
const int64_t &  d 
)
static

Division q/=d.

Parameters
qquotient
ddivisor.
Returns
q

◆ crem() [1/3]

Integer & crem ( Integer r,
const Integer n,
const Integer d 
)
static

Division q/=d.

Parameters
qquotient
ddivisor.
Returns
q

◆ frem() [1/3]

Integer & frem ( Integer r,
const Integer n,
const Integer d 
)
static

Division q/=d.

Parameters
qquotient
ddivisor.
Returns
q

◆ crem() [2/3]

Integer & crem ( Integer r,
const Integer n,
const uint64_t &  d 
)
static

Division q/=d.

Parameters
qquotient
ddivisor.
Returns
q

◆ frem() [2/3]

Integer & frem ( Integer r,
const Integer n,
const uint64_t &  d 
)
static

Division q/=d.

Parameters
qquotient
ddivisor.
Returns
q

◆ crem() [3/3]

uint64_t crem ( const Integer n,
const uint64_t &  d 
)
static

Division q/=d.

Parameters
qquotient
ddivisor.
Returns
q

◆ frem() [3/3]

uint64_t frem ( const Integer n,
const uint64_t &  d 
)
static

Division q/=d.

Parameters
qquotient
ddivisor.
Returns
q

◆ operator/() [1/5]

Integer operator/ ( const Integer d) const

Division operator.

Parameters
ddivisor

◆ operator/() [2/5]

Integer operator/ ( const uint64_t  d) const

Division q/=d.

Parameters
qquotient
ddivisor.
Returns
q

◆ operator/() [3/5]

Integer operator/ ( const int64_t  d) const

Division q/=d.

Parameters
qquotient
ddivisor.
Returns
q

◆ operator/() [4/5]

giv_all_inlined Integer operator/ ( const uint32_t  d) const
inline

Division q/=d.

Parameters
qquotient
ddivisor.
Returns
q

◆ operator/() [5/5]

giv_all_inlined Integer operator/ ( const int32_t  d) const
inline

Division q/=d.

Parameters
qquotient
ddivisor.
Returns
q

◆ operator/=() [1/6]

Integer & operator/= ( const Integer d)

Division operator (inplace).

Parameters
ddivisor

◆ operator/=() [2/6]

Integer & operator/= ( const uint64_t  d)

Division q/=d.

Parameters
qquotient
ddivisor.
Returns
q

◆ operator/=() [3/6]

Integer & operator/= ( const int64_t  d)

Division q/=d.

Parameters
qquotient
ddivisor.
Returns
q

◆ operator/=() [4/6]

giv_all_inlined Integer& operator/= ( const uint32_t  d)
inline

Division q/=d.

Parameters
qquotient
ddivisor.
Returns
q

◆ operator/=() [5/6]

giv_all_inlined Integer& operator/= ( const int32_t  d)
inline

Division q/=d.

Parameters
qquotient
ddivisor.
Returns
q

◆ operator/=() [6/6]

Integer& operator/= ( const XXX &  d)
inline

Division q/=d.

Parameters
qquotient
ddivisor.
Returns
q

◆ modin() [1/3]

Integer & modin ( Integer r,
const Integer n 
)
static

Function mod (inplace).

$ r \gets r \mod n$

Parameters
rremainder
nmodulus

◆ modin() [2/3]

Integer & modin ( Integer r,
const int64_t  n 
)
static

Division q/=d.

Parameters
qquotient
ddivisor.
Returns
q

◆ modin() [3/3]

Integer & modin ( Integer r,
const uint64_t  n 
)
static

Division q/=d.

Parameters
qquotient
ddivisor.
Returns
q

◆ mod() [1/5]

Integer & mod ( Integer r,
const Integer n,
const Integer d 
)
static

Function mod.

$ r \gets n \mod d$

Parameters
rremainder
ninteger
dmodulus

◆ mod() [2/5]

Integer & mod ( Integer r,
const Integer n,
const int64_t  d 
)
static

Division q/=d.

Parameters
qquotient
ddivisor.
Returns
q

◆ mod() [3/5]

Integer & mod ( Integer r,
const Integer n,
const uint64_t  d 
)
static

Division q/=d.

Parameters
qquotient
ddivisor.
Returns
q

◆ mod() [4/5]

static giv_all_inlined Integer& mod ( Integer r,
const Integer n,
const int32_t  d 
)
inlinestatic

Division q/=d.

Parameters
qquotient
ddivisor.
Returns
q

◆ mod() [5/5]

static giv_all_inlined Integer& mod ( Integer r,
const Integer n,
const uint32_t  d 
)
inlinestatic

Division q/=d.

Parameters
qquotient
ddivisor.
Returns
q

◆ divmod() [1/3]

Integer & divmod ( Integer q,
Integer r,
const Integer n,
const Integer d 
)
static

Euclidean division.

n = d q + r . Computes both the quotient and the residue (as in quorem).

Parameters
qas in the formula
ras in the formula
nas in the formula
das in the formula
Returns
the quotient q

◆ divmod() [2/3]

Integer & divmod ( Integer q,
int64_t &  r,
const Integer n,
const int64_t  d 
)
static

Division q/=d.

Parameters
qquotient
ddivisor.
Returns
q

◆ divmod() [3/3]

Integer & divmod ( Integer q,
uint64_t &  r,
const Integer n,
const uint64_t  d 
)
static

Division q/=d.

Parameters
qquotient
ddivisor.
Returns
q

◆ ceil() [1/2]

Integer & ceil ( Integer res,
const Integer n,
const Integer d 
)
static

rounding functions.

these are the same as the STL ones, except for the signature.

Parameters
resthe result
nthe numerator
dthe demominator

same as std::ceil (n/d)

◆ floor() [1/2]

Integer & floor ( Integer res,
const Integer n,
const Integer d 
)
static

same as std::floor(n/d)

◆ trunc() [1/2]

Integer & trunc ( Integer res,
const Integer n,
const Integer d 
)
static

same as std::trunc(n/d)

◆ ceil() [2/2]

Integer ceil ( const Integer n,
const Integer d 
)
static

rounding functions.

these are the same as the STL ones, except for the signature.

Parameters
nthe numerator
dthe demominator
Returns
n/d rounded.

same as std::ceil (n/d)

◆ floor() [2/2]

Integer floor ( const Integer n,
const Integer d 
)
static

same as std::floor(n/d)

◆ trunc() [2/2]

Integer trunc ( const Integer n,
const Integer d 
)
static

same as std::trunc(n/d)

◆ operator%() [1/8]

Integer operator% ( const Integer n) const

Modulo operator.

Parameters
nmodulus
Returns
remainder (*this) mod n

◆ operator%() [2/8]

int64_t operator% ( const uint64_t  n) const

Division q/=d.

Parameters
qquotient
ddivisor.
Returns
q

◆ operator%() [3/8]

int64_t operator% ( const int64_t  n) const

Division q/=d.

Parameters
qquotient
ddivisor.
Returns
q

◆ operator%() [4/8]

giv_all_inlined int32_t operator% ( const uint32_t  n) const
inline

Division q/=d.

Parameters
qquotient
ddivisor.
Returns
q

◆ operator%() [5/8]

giv_all_inlined int32_t operator% ( const int32_t  n) const
inline

Division q/=d.

Parameters
qquotient
ddivisor.
Returns
q

◆ operator%() [6/8]

double operator% ( const double  n) const

Division q/=d.

Parameters
qquotient
ddivisor.
Returns
q

◆ operator%() [7/8]

int16_t operator% ( const uint16_t  n) const
inline

Division q/=d.

Parameters
qquotient
ddivisor.
Returns
q

◆ operator%() [8/8]

XXX operator% ( const XXX &  n) const
inline

Division q/=d.

Parameters
qquotient
ddivisor.
Returns
q

◆ operator%=() [1/6]

Integer & operator%= ( const Integer n)

Modulo operator (inplace).

Parameters
nmodulus
Returns
remainder (*this) <- (*this) mod n

◆ operator%=() [2/6]

Integer & operator%= ( const uint64_t  n)

Division q/=d.

Parameters
qquotient
ddivisor.
Returns
q

◆ operator%=() [3/6]

Integer & operator%= ( const int64_t  n)

Division q/=d.

Parameters
qquotient
ddivisor.
Returns
q

◆ operator%=() [4/6]

giv_all_inlined Integer& operator%= ( const uint32_t  n)
inline

Division q/=d.

Parameters
qquotient
ddivisor.
Returns
q

◆ operator%=() [5/6]

giv_all_inlined Integer& operator%= ( const int32_t  n)
inline

Division q/=d.

Parameters
qquotient
ddivisor.
Returns
q

◆ operator%=() [6/6]

Integer& operator%= ( const XXX &  n)
inline

Division q/=d.

Parameters
qquotient
ddivisor.
Returns
q

◆ size_in_base()

size_t size_in_base ( int32_t  B) const

returns ceil(log_BASE(*this)).


◆ bitsize()

size_t bitsize ( ) const

returns ceil(log_2(*this)) .


◆ operator[]()

uint64_t operator[] ( size_t  i) const

return the i-th word of the integer.

Word 0 is lowest word.

◆ random_lessthan()

Integer & random_lessthan ( Integer r,
const Integer m 
)
inlinestatic

returns a random integer r in the intervall [[x, m-1]] where x = 0 or -(m-1) according to ALWAYSPOSITIVE

Bug:
m has to be an integer here.

◆ print()

std::ostream & print ( std::ostream &  o) const

print32_t integer.

Parameters
ooutput stream.

Friends And Related Function Documentation

◆ compare

giv_all_inlined friend int32_t compare ( const Integer a,
const Integer b 
)
friend

Compares two integers.

Parameters
ainteger
binteger
Returns
1 if $a > b$, 0 if $a = b$ and -1 otherwise.

◆ absCompare [1/8]

giv_all_inlined friend int32_t absCompare ( const Integer a,
const Integer b 
)
friend

Compare the norm of two integers.

Parameters
ainteger
binteger
Returns
1 if $|a| > |b|$, 0 if $|a| = |b|$ and -1 otherwise.

◆ absCompare [2/8]

giv_all_inlined friend int32_t absCompare ( const Integer a,
const double  b 
)
friend

isleq

Parameters
a,b

◆ absCompare [3/8]

giv_all_inlined friend int32_t absCompare ( const Integer a,
const float  b 
)
friend

isleq

Parameters
a,b

◆ absCompare [4/8]

giv_all_inlined friend int32_t absCompare ( const Integer a,
const uint64_t  b 
)
friend

isleq

Parameters
a,b

◆ absCompare [5/8]

giv_all_inlined friend int32_t absCompare ( const Integer a,
const unsigned  b 
)
friend

isleq

Parameters
a,b

◆ absCompare [6/8]

giv_all_inlined friend int32_t absCompare ( const Integer a,
const int64_t  b 
)
friend

isleq

Parameters
a,b

◆ absCompare [7/8]

giv_all_inlined friend int32_t absCompare ( const Integer a,
const int32_t  b 
)
friend

isleq

Parameters
a,b

◆ absCompare [8/8]

giv_all_inlined friend int32_t absCompare ( const T  a,
const Integer b 
)
friend

isleq

Parameters
a,b

◆ isOne

giv_all_inlined int32_t isOne ( const Integer a)
friend

name compare to 1 and 0

Parameters
a

◆ isMOne

giv_all_inlined int32_t isMOne ( const Integer a)
friend

isleq

Parameters
a,b

◆ nonZero

giv_all_inlined int32_t nonZero ( const Integer a)
friend

name compare to 1 and 0

Parameters
a

◆ isZero [1/7]

giv_all_inlined int32_t isZero ( const Integer a)
friend

name compare to 1 and 0

Parameters
a

◆ isZero [2/7]

giv_all_inlined int32_t isZero ( const int16_t  a)
friend

isleq

Parameters
a,b

◆ isZero [3/7]

giv_all_inlined int32_t isZero ( const int32_t  a)
friend

isleq

Parameters
a,b

◆ isZero [4/7]

giv_all_inlined int32_t isZero ( const int64_t  a)
friend

isleq

Parameters
a,b

◆ isZero [5/7]

giv_all_inlined int32_t isZero ( const uint16_t  a)
friend

isleq

Parameters
a,b

◆ isZero [6/7]

giv_all_inlined int32_t isZero ( const uint32_t  a)
friend

isleq

Parameters
a,b

◆ isZero [7/7]

giv_all_inlined int32_t isZero ( const uint64_t  a)
friend

isleq

Parameters
a,b

◆ operator>= [1/6]

giv_all_inlined friend int32_t operator>= ( uint32_t  l,
const Integer n 
)
friend

greater or equal.

Parameters
l,nintegers to compare

◆ operator>= [2/6]

giv_all_inlined friend int32_t operator>= ( float  l,
const Integer n 
)
friend

greater or equal.

Parameters
linteger to be compared to

◆ operator>= [3/6]

giv_all_inlined friend int32_t operator>= ( double  l,
const Integer n 
)
friend

greater or equal.

Parameters
linteger to be compared to

◆ operator>= [4/6]

giv_all_inlined friend int32_t operator>= ( int32_t  l,
const Integer n 
)
friend

greater or equal.

Parameters
linteger to be compared to

◆ operator>= [5/6]

giv_all_inlined friend int32_t operator>= ( int64_t  l,
const Integer n 
)
friend

greater or equal.

Parameters
linteger to be compared to

◆ operator>= [6/6]

giv_all_inlined friend int32_t operator>= ( uint64_t  l,
const Integer n 
)
friend

greater or equal.

Parameters
linteger to be compared to

◆ operator<= [1/6]

giv_all_inlined friend int32_t operator<= ( uint32_t  l,
const Integer n 
)
friend

less or equal

Parameters
l,nintegers to compare

◆ operator<= [2/6]

giv_all_inlined friend int32_t operator<= ( float  l,
const Integer n 
)
friend

greater or equal.

Parameters
linteger to be compared to

◆ operator<= [3/6]

giv_all_inlined friend int32_t operator<= ( double  l,
const Integer n 
)
friend

greater or equal.

Parameters
linteger to be compared to

◆ operator<= [4/6]

giv_all_inlined friend int32_t operator<= ( int32_t  l,
const Integer n 
)
friend

greater or equal.

Parameters
linteger to be compared to

◆ operator<= [5/6]

giv_all_inlined friend int32_t operator<= ( int64_t  l,
const Integer n 
)
friend

greater or equal.

Parameters
linteger to be compared to

◆ operator<= [6/6]

giv_all_inlined friend int32_t operator<= ( uint64_t  l,
const Integer n 
)
friend

greater or equal.

Parameters
linteger to be compared to

◆ operator!= [1/6]

giv_all_inlined friend int32_t operator!= ( uint32_t  l,
const Integer n 
)
friend

operator != (not equal)

Parameters
l,ninteger
Returns
1 iff l == n

◆ operator!= [2/6]

giv_all_inlined friend int32_t operator!= ( float  l,
const Integer n 
)
friend

greater or equal.

Parameters
linteger to be compared to

◆ operator!= [3/6]

giv_all_inlined friend int32_t operator!= ( double  l,
const Integer n 
)
friend

greater or equal.

Parameters
linteger to be compared to

◆ operator!= [4/6]

giv_all_inlined friend int32_t operator!= ( int32_t  l,
const Integer n 
)
friend

greater or equal.

Parameters
linteger to be compared to

◆ operator!= [5/6]

giv_all_inlined friend int32_t operator!= ( int64_t  l,
const Integer n 
)
friend

greater or equal.

Parameters
linteger to be compared to

◆ operator!= [6/6]

giv_all_inlined friend int32_t operator!= ( uint64_t  l,
const Integer n 
)
friend

greater or equal.

Parameters
linteger to be compared to

◆ operator== [1/6]

giv_all_inlined friend int32_t operator== ( uint32_t  l,
const Integer n 
)
friend

Equality.

Parameters
l,nintegers to compare

◆ operator== [2/6]

giv_all_inlined friend int32_t operator== ( float  l,
const Integer n 
)
friend

greater or equal.

Parameters
linteger to be compared to

◆ operator== [3/6]

giv_all_inlined friend int32_t operator== ( double  l,
const Integer n 
)
friend

greater or equal.

Parameters
linteger to be compared to

◆ operator== [4/6]

giv_all_inlined friend int32_t operator== ( int32_t  l,
const Integer n 
)
friend

greater or equal.

Parameters
linteger to be compared to

◆ operator== [5/6]

giv_all_inlined friend int32_t operator== ( int64_t  l,
const Integer n 
)
friend

greater or equal.

Parameters
linteger to be compared to

◆ operator== [6/6]

giv_all_inlined friend int32_t operator== ( uint64_t  l,
const Integer n 
)
friend

greater or equal.

Parameters
linteger to be compared to

◆ operator> [1/6]

giv_all_inlined friend int32_t operator> ( uint32_t  l,
const Integer n 
)
friend

greater (strict)

Parameters
l,nintegers to compare

◆ operator> [2/6]

giv_all_inlined friend int32_t operator> ( float  l,
const Integer n 
)
friend

greater or equal.

Parameters
linteger to be compared to

◆ operator> [3/6]

giv_all_inlined friend int32_t operator> ( double  l,
const Integer n 
)
friend

greater or equal.

Parameters
linteger to be compared to

◆ operator> [4/6]

giv_all_inlined friend int32_t operator> ( int32_t  l,
const Integer n 
)
friend

greater or equal.

Parameters
linteger to be compared to

◆ operator> [5/6]

giv_all_inlined friend int32_t operator> ( int64_t  l,
const Integer n 
)
friend

greater or equal.

Parameters
linteger to be compared to

◆ operator> [6/6]

giv_all_inlined friend int32_t operator> ( uint64_t  l,
const Integer n 
)
friend

greater or equal.

Parameters
linteger to be compared to

◆ operator< [1/6]

giv_all_inlined friend int32_t operator< ( uint32_t  l,
const Integer n 
)
friend

less (strict)

Parameters
l,nintegers to compare

◆ operator< [2/6]

giv_all_inlined friend int32_t operator< ( float  l,
const Integer n 
)
friend

greater or equal.

Parameters
linteger to be compared to

◆ operator< [3/6]

giv_all_inlined friend int32_t operator< ( double  l,
const Integer n 
)
friend

greater or equal.

Parameters
linteger to be compared to

◆ operator< [4/6]

giv_all_inlined friend int32_t operator< ( int32_t  l,
const Integer n 
)
friend

greater or equal.

Parameters
linteger to be compared to

◆ operator< [5/6]

giv_all_inlined friend int32_t operator< ( int64_t  l,
const Integer n 
)
friend

greater or equal.

Parameters
linteger to be compared to

◆ operator< [6/6]

giv_all_inlined friend int32_t operator< ( uint64_t  l,
const Integer n 
)
friend

greater or equal.

Parameters
linteger to be compared to

◆ operator+ [1/4]

giv_all_inlined Integer operator+ ( const int32_t  l,
const Integer n 
)
friend

operator +.

Parameters
l,nto be added

◆ operator+ [2/4]

giv_all_inlined Integer operator+ ( const uint32_t  l,
const Integer n 
)
friend

operator +.

Returns
(*this)+n
Parameters
nas in the formula.

◆ operator+ [3/4]

giv_all_inlined Integer operator+ ( const int64_t  l,
const Integer n 
)
friend

operator +.

Returns
(*this)+n
Parameters
nas in the formula.

◆ operator+ [4/4]

giv_all_inlined Integer operator+ ( const uint64_t  l,
const Integer n 
)
friend

operator +.

Returns
(*this)+n
Parameters
nas in the formula.

◆ operator- [1/4]

giv_all_inlined Integer operator- ( const int32_t  l,
const Integer n 
)
friend

operator -

Parameters
l,nto be substracted

◆ operator- [2/4]

giv_all_inlined Integer operator- ( const uint32_t  l,
const Integer n 
)
friend

operator +.

Returns
(*this)+n
Parameters
nas in the formula.

◆ operator- [3/4]

giv_all_inlined Integer operator- ( const int64_t  l,
const Integer n 
)
friend

operator +.

Returns
(*this)+n
Parameters
nas in the formula.

◆ operator- [4/4]

giv_all_inlined Integer operator- ( const uint64_t  l,
const Integer n 
)
friend

operator +.

Returns
(*this)+n
Parameters
nas in the formula.

◆ operator* [1/4]

giv_all_inlined Integer operator* ( const int32_t  l,
const Integer n 
)
friend

operator *

Parameters
l,nto be multpct

◆ operator* [2/4]

giv_all_inlined Integer operator* ( const uint32_t  l,
const Integer n 
)
friend

operator +.

Returns
(*this)+n
Parameters
nas in the formula.

◆ operator* [3/4]

giv_all_inlined Integer operator* ( const int64_t  l,
const Integer n 
)
friend

operator +.

Returns
(*this)+n
Parameters
nas in the formula.

◆ operator* [4/4]

giv_all_inlined Integer operator* ( const uint64_t  l,
const Integer n 
)
friend

operator +.

Returns
(*this)+n
Parameters
nas in the formula.

◆ operator/ [1/2]

giv_all_inlined Integer operator/ ( const int64_t  l,
const Integer n 
)
friend

Division operator.

Parameters
ddivisor

◆ operator/ [2/2]

giv_all_inlined Integer operator/ ( const uint64_t  l,
const Integer n 
)
friend

Division operator.

Parameters
ddivisor

◆ operator% [1/4]

giv_all_inlined Integer operator% ( const int64_t  l,
const Integer n 
)
friend

operator %

Parameters
l
n
Returns
nl

◆ operator% [2/4]

giv_all_inlined Integer operator% ( const uint64_t  l,
const Integer n 
)
friend

Division operator.

Parameters
ddivisor

◆ operator% [3/4]

giv_all_inlined Integer operator% ( const int32_t  l,
const Integer n 
)
friend

Division operator.

Parameters
ddivisor

◆ operator% [4/4]

giv_all_inlined Integer operator% ( const uint32_t  l,
const Integer n 
)
friend

Division operator.

Parameters
ddivisor

◆ gcd [1/4]

gcd ( const Integer a,
const Integer b 
)
friend

gcd.

Parameters
a,bintegers
Returns
gcd(a,b)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ gcd [2/4]

giv_all_inlined Integer gcd ( Integer u,
Integer v,
const Integer a,
const Integer b 
)
friend

gcd.

Parameters
a,bintegers
Returns
gcd(a,b)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ gcd [3/4]

giv_all_inlined Integer& gcd ( Integer g,
const Integer a,
const Integer b 
)
friend

gcd.

Parameters
a,bintegers
Returns
gcd(a,b)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ gcd [4/4]

giv_all_inlined Integer& gcd ( Integer g,
Integer u,
Integer v,
const Integer a,
const Integer b 
)
friend

gcd.

Parameters
a,bintegers
Returns
gcd(a,b)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ inv

giv_all_inlined Integer& inv ( Integer u,
const Integer a,
const Integer b 
)
friend

Inverse.

Compute the inverse u = a/b.

Parameters
u
a
b
a
b
[out]uis set to $a^{-1}$ modulo b

◆ invin

giv_all_inlined Integer& invin ( Integer u,
const Integer b 
)
friend

Compute the inverse inplace u = u/b.

Parameters
u
b

◆ pp

giv_all_inlined Integer pp ( const Integer P,
const Integer Q 
)
friend

pp

Parameters
P,Qparams

◆ lcm [1/2]

giv_all_inlined Integer& lcm ( Integer g,
const Integer a,
const Integer b 
)
friend

lcm

Parameters
g,a,b
Returns
g=lcm(a,b)

◆ lcm [2/2]

giv_all_inlined Integer lcm ( const Integer a,
const Integer b 
)
friend

lcm

Parameters
a,b

◆ pow [1/9]

giv_all_inlined Integer& pow ( Integer Res,
const Integer n,
const int64_t  l 
)
friend

pow.

return $n^l$

Parameters
Res,n,l

◆ pow [2/9]

giv_all_inlined Integer& pow ( Integer Res,
const uint64_t  n,
const uint64_t  l 
)
friend

gcd.

Parameters
a,bintegers
Returns
gcd(a,b)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ pow [3/9]

giv_all_inlined Integer& pow ( Integer Res,
const Integer n,
const uint64_t  l 
)
friend

gcd.

Parameters
a,bintegers
Returns
gcd(a,b)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ pow [4/9]

giv_all_inlined Integer& pow ( Integer Res,
const Integer n,
const int32_t  l 
)
friend

gcd.

Parameters
a,bintegers
Returns
gcd(a,b)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ pow [5/9]

giv_all_inlined Integer& pow ( Integer Res,
const Integer n,
const uint32_t  l 
)
friend

gcd.

Parameters
a,bintegers
Returns
gcd(a,b)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ pow [6/9]

giv_all_inlined Integer pow ( const Integer n,
const int64_t  l 
)
friend

pow.

return $n^l$

Parameters
n,l

◆ pow [7/9]

giv_all_inlined Integer pow ( const Integer n,
const uint64_t  l 
)
friend

gcd.

Parameters
a,bintegers
Returns
gcd(a,b)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ pow [8/9]

giv_all_inlined Integer pow ( const Integer n,
const int32_t  l 
)
friend

gcd.

Parameters
a,bintegers
Returns
gcd(a,b)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ pow [9/9]

giv_all_inlined Integer pow ( const Integer n,
const uint32_t  l 
)
friend

gcd.

Parameters
a,bintegers
Returns
gcd(a,b)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ powmod

giv_all_inlined Integer powmod ( const Integer n,
const uint64_t  e,
const Integer m 
)
friend

modular pow.

return $n^e \mod m$.

Parameters
n,e,m

◆ fact

giv_all_inlined Integer fact ( uint64_t  l)
friend

fact

Parameters
l

◆ sqrt [1/2]

giv_all_inlined Integer sqrt ( const Integer p)
friend

(square) roots

Parameters
p

◆ sqrt [2/2]

giv_all_inlined Integer& sqrt ( Integer r,
const Integer p 
)
friend

(square) roots

Parameters
r,p

◆ sqrtrem [1/2]

giv_all_inlined Integer sqrtrem ( const Integer p,
Integer rem 
)
friend

(square) roots

Parameters
p,rem

◆ sqrtrem [2/2]

giv_all_inlined Integer& sqrtrem ( Integer r,
const Integer p,
Integer rem 
)
friend

(square) roots

Parameters
r,p,rem

◆ root

giv_all_inlined bool root ( Integer q,
const Integer a,
uint32_t  n 
)
friend

(square) roots

Parameters
q,a,n

◆ logp

giv_all_inlined int64_t logp ( const Integer a,
const Integer p 
)
friend

logs

Parameters
a,p

◆ logtwo

giv_all_inlined double logtwo ( const Integer a)
friend

logs

Parameters
a

◆ naturallog

giv_all_inlined double naturallog ( const Integer a)
friend

logs

Parameters
a

◆ swap

giv_all_inlined void swap ( Integer a,
Integer b 
)
friend

swap

Parameters
a,b

◆ sign

int32_t sign ( const Integer a)
friend

sign

Parameters
a

◆ length

giv_all_inlined uint64_t length ( const Integer a)
friend

returns the number of bytes used to store *this

Parameters
a
Bug:
JGD 23.04.2012: shouldn't it be "mp_limb_t" instead of "uint64_t"?

◆ isOdd

giv_all_inlined bool isOdd ( const Integer a)
friend

parity of an integer

Parameters
ainteger
Returns
1 if odd, 0 if even

◆ operator>>

giv_all_inlined std::istream& operator>> ( std::istream &  i,
Integer n 
)
friend

Input/Output of Integers.

in operator.

Parameters
iinput stream
ninteger to be built

◆ operator<<

giv_all_inlined std::ostream& operator<< ( std::ostream &  o,
const Integer n 
)
friend

out operator.

Parameters
ooutput stream
ninteger to be printed

◆ absOutput

giv_all_inlined std::ostream& absOutput ( std::ostream &  o,
const Integer n 
)
friend

nodoc

Parameters
ooutput
ninteger

◆ Protected::importWords

giv_all_inlined void Protected::importWords ( Integer x,
size_t  count,
int32_t  order,
int32_t  size,
int32_t  endian,
size_t  nails,
const void *  op 
)
friend

nodoc

Parameters
xx
countx
orderx
sizex
endianx
nailsx
opx

The documentation for this class was generated from the following files: