Integer Class Reference

This is the Integer class. More...

`#include <gmp++_int.h>`

Collaboration diagram for Integer:
[legend]

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

Convert an Integer to a basic C++ type.

Warning
  Cast towards unsigned consider only the absolute value

## Static Public Member Functions

Addition, substraction, multiplication
static giv_all_inlined Integer & | addin (Integer &res, const Integer &n)
| Addition (inplace) `res+=n`.
static giv_all_inlined Integer & | addin (Integer &res, const int64_t n)
| Addition (inplace) `res+=n`.
static giv_all_inlined Integer & | addin (Integer &res, const uint64_t n)
| Addition (inplace) `res+=n`.
static giv_all_inlined Integer & | addin (Integer &res, const int32_t n)
| Addition (inplace) `res+=n`.
static giv_all_inlined Integer & | addin (Integer &res, const uint32_t n)
| Addition (inplace) `res+=n`.
static giv_all_inlined Integer & | add (Integer &res, const Integer &n1, const Integer &n2)
| Addition `res=n1+n2`.
static giv_all_inlined Integer & | add (Integer &res, const Integer &n1, const int64_t n2)
| Addition (inplace) `res+=n`.
static giv_all_inlined Integer & | add (Integer &res, const Integer &n1, const uint64_t n2)
| Addition (inplace) `res+=n`.
static giv_all_inlined Integer & | add (Integer &res, const Integer &n1, const int32_t n2)
| Addition (inplace) `res+=n`.
static giv_all_inlined Integer & | add (Integer &res, const Integer &n1, const uint32_t n2)
| Addition (inplace) `res+=n`.
static giv_all_inlined Integer & | subin (Integer &res, const Integer &n)
| Substraction (inplace) `res-=n`.
static giv_all_inlined Integer & | subin (Integer &res, const int64_t n)
| Addition (inplace) `res+=n`.
static giv_all_inlined Integer & | subin (Integer &res, const uint64_t n)
| Addition (inplace) `res+=n`.
static giv_all_inlined Integer & | subin (Integer &res, const int32_t n)
| Addition (inplace) `res+=n`.
static giv_all_inlined Integer & | subin (Integer &res, const uint32_t n)
| Addition (inplace) `res+=n`.
static giv_all_inlined Integer & | sub (Integer &res, const Integer &n1, const Integer &n2)
| Substraction `res=n1-n2`.
static giv_all_inlined Integer & | sub (Integer &res, const Integer &n1, const int64_t n2)
| Addition (inplace) `res+=n`.
static giv_all_inlined Integer & | sub (Integer &res, const Integer &n1, const uint64_t n2)
| Addition (inplace) `res+=n`.
static giv_all_inlined Integer & | sub (Integer &res, const Integer &n1, const int32_t n2)
| Addition (inplace) `res+=n`.
static giv_all_inlined Integer & | sub (Integer &res, const Integer &n1, const uint32_t n2)
| Addition (inplace) `res+=n`.
static giv_all_inlined Integer & | negin (Integer &res)
| Negation (inplace) `res=-res`.
static giv_all_inlined Integer & | neg (Integer &res, const Integer &n)
| Negation `res=-n`.
static giv_all_inlined Integer & | mulin (Integer &res, const Integer &n)
| Multiplication (inplace) `res*=n`.
static giv_all_inlined Integer & | mulin (Integer &res, const int64_t n)
| Addition (inplace) `res+=n`.
static giv_all_inlined Integer & | mulin (Integer &res, const uint64_t n)
| Addition (inplace) `res+=n`.
static giv_all_inlined Integer & | mulin (Integer &res, const int32_t n)
| Addition (inplace) `res+=n`.
static giv_all_inlined Integer & | mulin (Integer &res, const uint32_t n)
| Addition (inplace) `res+=n`.
static giv_all_inlined Integer & | mul (Integer &res, const Integer &n1, const Integer &n2)
| Multiplication `res=n1*n2`.
static giv_all_inlined Integer & | mul (Integer &res, const Integer &n1, const int64_t n2)
| Addition (inplace) `res+=n`.
static giv_all_inlined Integer & | mul (Integer &res, const Integer &n1, const uint64_t n2)
| Addition (inplace) `res+=n`.
static giv_all_inlined Integer & | mul (Integer &res, const Integer &n1, const int32_t n2)
| Addition (inplace) `res+=n`.
static giv_all_inlined Integer & | mul (Integer &res, const Integer &n1, const uint32_t n2)
| Addition (inplace) `res+=n`.
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 Integer & | axpy (Integer &res, const Integer &a, const Integer &x, const Integer &y)
| axpy `res = ax+y`.
static giv_all_inlined Integer & | axpy (Integer &res, const Integer &a, const uint64_t x, const Integer &y)
| axpy `res = ax+y`.
static giv_all_inlined Integer & | axpyin (Integer &res, const Integer &a, const Integer &x)
| axpyin (inplace) `res += ax`.
static giv_all_inlined Integer & | axpyin (Integer &res, const Integer &a, const uint64_t x)
| axpy `res = ax+y`.
static giv_all_inlined Integer & | maxpy (Integer &res, const Integer &a, const Integer &x, const Integer &y)
| maxpy `res = y - ax`.
static giv_all_inlined Integer & | maxpy (Integer &res, const Integer &a, const uint64_t x, const Integer &y)
| axpy `res = ax+y`.
static giv_all_inlined Integer & | maxpyin (Integer &res, const Integer &a, const Integer &x)
| maxpyin `res -= ax`.
static giv_all_inlined Integer & | maxpyin (Integer &res, const Integer &a, const uint64_t x)
| axpy `res = ax+y`.
static giv_all_inlined Integer & | axmy (Integer &res, const Integer &a, const Integer &x, const Integer &y)
| axmy `res = ax - y`.
static giv_all_inlined Integer & | axmy (Integer &res, const Integer &a, const uint64_t x, const Integer &y)
| axpy `res = ax+y`.
static giv_all_inlined Integer & | axmyin (Integer &res, const Integer &a, const Integer &x)
| axmyin (in place) `res = ax - res`.
static giv_all_inlined Integer & | axmyin (Integer &res, const Integer &a, const uint64_t x)
| axpy `res = ax+y`.
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 Integer & | random_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`
static Integer & | random_lessthan (Integer &r, const Integer &m)
| Random numbers (no doc).
template<bool ALWAYSPOSITIVE>
static Integer & | random_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 Integer & | random_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 Integer & | random_lessthan (Integer &r, const uint64_t &m)
| Random numbers (no doc).
static Integer & | random_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 Integer & | random_exact_2exp (Integer &r, const uint64_t &m)
| returns a reference to a random number `r` of the size `m` bits, exactly.
static Integer & | random_exact_2exp (Integer &r, const uint64_t &m)
| Random numbers (no doc).
template<bool ALWAYSPOSITIVE>
static Integer & | random_exact (Integer &r, const Integer &s)
| returns a reference to a random number `r` of the size of `s`, exactly.
static Integer & | random_exact (Integer &r, const Integer &s)
| Random numbers (no doc).
template<bool ALWAYSPOSITIVE>
static Integer & | random_exact (Integer &r, const uint64_t &m)
| Random numbers (no doc).
static Integer & | random_exact (Integer &r, const uint64_t &m)
| Random numbers (no doc).
template<bool ALWAYSPOSITIVE, class T>
static Integer & | random_exact (Integer &r, const T &m)
| Random numbers (no doc).
template<class T>
static Integer & | random_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 Integer & | random_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 Integer & | random_between_2exp (Integer &r, const uint64_t &m, const uint64_t &M)
| Random numbers (no doc).
static Integer & | random_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 Integer & | random_between (Integer &r, const R &m, const R &M)
| Random numbers (no doc).
template<bool ALWAYSPOSITIVE, class T>
static Integer & | random (Integer &r, const T &m)
| returns a random integer less than...
template<class T>
static Integer & | random (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 Integer & | nonzerorandom (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 Integer & | nonzerorandom (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 Integer & | powmod (Integer &Res, const Integer &n, const uint64_t e, const Integer &m)
| modular pow. return .
giv_all_inlined Integer | powmod (const Integer &n, const uint64_t e, const Integer &m)
| modular pow.
giv_all_inlined Integer | fact (uint64_t l)
| fact
giv_all_inlined Integer | sqrt (const Integer &p)
| (square) roots
giv_all_inlined Integer & | sqrt (Integer &r, const Integer &p)
| (square) roots
giv_all_inlined Integer | sqrtrem (const Integer &p, Integer &rem)
| (square) roots
giv_all_inlined Integer & | sqrtrem (Integer &r, const Integer &p, Integer &rem)
| (square) roots
giv_all_inlined bool | root (Integer &q, const Integer &a, uint32_t n)
| (square) roots
giv_all_inlined int64_t | logp (const Integer &a, const Integer &p)
| logs
giv_all_inlined double | logtwo (const Integer &a)
| logs
giv_all_inlined double | naturallog (const Integer &a)
| logs
Arithmetic functions
giv_all_inlined Integer | gcd (const Integer &a, const Integer &b)
| gcd.
giv_all_inlined Integer | gcd (Integer &u, Integer &v, const Integer &a, const Integer &b)
| gcd.
giv_all_inlined Integer & | gcd (Integer &g, const Integer &a, const Integer &b)
| gcd.
giv_all_inlined Integer & | gcd (Integer &g, Integer &u, Integer &v, const Integer &a, const Integer &b)
| gcd.
giv_all_inlined Integer & | inv (Integer &u, const Integer &a, const Integer &b)
| Inverse.
giv_all_inlined Integer & | invin (Integer &u, const Integer &b)
| Compute the inverse inplace u = u/b.
giv_all_inlined Integer | pp (const Integer &P, const Integer &Q)
| pp
giv_all_inlined Integer & | lcm (Integer &g, const Integer &a, const Integer &b)
| lcm
giv_all_inlined Integer | lcm (const Integer &a, const Integer &b)
| lcm
giv_all_inlined Integer & | pow (Integer &Res, const Integer &n, const int64_t l)
| pow.
giv_all_inlined Integer & | pow (Integer &Res, const uint64_t n, const uint64_t l)
| gcd.
giv_all_inlined Integer & | pow (Integer &Res, const Integer &n, const uint64_t l)
| gcd.
giv_all_inlined Integer & | pow (Integer &Res, const Integer &n, const int32_t l)
| gcd.
giv_all_inlined Integer & | pow (Integer &Res, const Integer &n, const uint32_t l)
| gcd.
giv_all_inlined Integer | pow (const Integer &n, const int64_t l)
| pow.
giv_all_inlined Integer | pow (const Integer &n, const uint64_t l)
| gcd.
giv_all_inlined Integer | pow (const Integer &n, const int32_t l)
| gcd.
giv_all_inlined Integer | pow (const Integer &n, const uint32_t l)
| gcd.
primes

## Comparison operators.

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

## Addition, substraction, multiplication operators

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

## 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 :

- `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 :

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.
giv_all_inlined Integer | operator/ (const uint64_t d) const
| Division `q/=d`.
giv_all_inlined Integer | operator/ (const int64_t d) const
| Division `q/=d`.
giv_all_inlined Integer | operator/ (const uint32_t d) const
| Division `q/=d`.
giv_all_inlined Integer | operator/ (const int32_t d) const
| Division `q/=d`.
giv_all_inlined Integer & | operator/= (const Integer &d)
| Division operator (inplace).
giv_all_inlined Integer & | operator/= (const uint64_t d)
| Division `q/=d`.
giv_all_inlined Integer & | operator/= (const int64_t d)
| Division `q/=d`.
giv_all_inlined Integer & | operator/= (const uint32_t d)
| Division `q/=d`.
giv_all_inlined Integer & | operator/= (const int32_t d)
| Division `q/=d`.
template<class XXX>
Integer & | operator/= (const XXX &d)
| Division `q/=d`.
giv_all_inlined Integer | operator% (const Integer &n) const
| Modulo operator.
giv_all_inlined int64_t | operator% (const uint64_t n) const
| Division `q/=d`.
giv_all_inlined int64_t | operator% (const int64_t n) const
| Division `q/=d`.
giv_all_inlined int32_t | operator% (const uint32_t n) const
| Division `q/=d`.
giv_all_inlined int32_t | operator% (const int32_t n) const
| Division `q/=d`.
giv_all_inlined double | operator% (const double n) const
| Division `q/=d`.
int16_t | operator% (const uint16_t n) const
| Division `q/=d`.
template<class XXX>
XXX | operator% (const XXX &n) const
| Division `q/=d`.
giv_all_inlined Integer & | operator%= (const Integer &n)
| Modulo operator (inplace).
giv_all_inlined Integer & | operator%= (const uint64_t n)
| Division `q/=d`.
giv_all_inlined Integer & | operator%= (const int64_t n)
| Division `q/=d`.
giv_all_inlined Integer & | operator%= (const uint32_t n)
| Division `q/=d`.
giv_all_inlined Integer & | operator%= (const int32_t n)
| Division `q/=d`.
template<class XXX>
Integer & | operator%= (const XXX &n)
| Division `q/=d`.
static giv_all_inlined Integer & | divin (Integer &q, const Integer &d)
| Division `q/=d`.
static giv_all_inlined Integer & | divin (Integer &q, const int64_t d)
| Division `q/=d`.
static giv_all_inlined Integer & | divin (Integer &q, const uint64_t d)
| Division `q/=d`.
static giv_all_inlined Integer & | div (Integer &q, const Integer &n, const Integer &d)
| Division `q=n/d`.
static giv_all_inlined Integer & | div (Integer &q, const Integer &n, const int64_t d)
| Division `q/=d`.
static giv_all_inlined Integer & | div (Integer &q, const Integer &n, const int32_t d)
| Division `q/=d`.
static giv_all_inlined Integer & | div (Integer &q, const Integer &n, const uint64_t d)
| Division `q/=d`.
static giv_all_inlined Integer & | divexact (Integer &q, const Integer &n, const Integer &d)
| Division when `d` divides `n`.
static giv_all_inlined Integer & | divexact (Integer &q, const Integer &n, const uint64_t &d)
| Division `q/=d`.
static giv_all_inlined Integer & | divexact (Integer &q, const Integer &n, const int64_t &d)
| Division `q/=d`.
static giv_all_inlined Integer | divexact (const Integer &n, const Integer &d)
| Division when `d` divides `n`.
static giv_all_inlined Integer | divexact (const Integer &n, const uint64_t &d)
| Division `q/=d`.
static giv_all_inlined Integer | divexact (const Integer &n, const int64_t &d)
| Division `q/=d`.
static giv_all_inlined Integer & | trem (Integer &r, const Integer &n, const Integer &d)
| Stuff.
static giv_all_inlined Integer & | crem (Integer &r, const Integer &n, const Integer &d)
| Division `q/=d`.
static giv_all_inlined Integer & | frem (Integer &r, const Integer &n, const Integer &d)
| Division `q/=d`.
static giv_all_inlined Integer & | trem (Integer &r, const Integer &n, const uint64_t &d)
| Stuff.
static giv_all_inlined Integer & | crem (Integer &r, const Integer &n, const uint64_t &d)
| Division `q/=d`.
static giv_all_inlined Integer & | frem (Integer &r, const Integer &n, const uint64_t &d)
| Division `q/=d`.
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`.
static giv_all_inlined uint64_t | frem (const Integer &n, const uint64_t &d)
| Division `q/=d`.
static giv_all_inlined Integer & | modin (Integer &r, const Integer &n)
| Function `mod` (inplace).
static giv_all_inlined Integer & | modin (Integer &r, const int64_t n)
| Division `q/=d`.
static giv_all_inlined Integer & | modin (Integer &r, const uint64_t n)
| Division `q/=d`.
static giv_all_inlined Integer & | mod (Integer &r, const Integer &n, const Integer &d)
| Function `mod`.
static giv_all_inlined Integer & | mod (Integer &r, const Integer &n, const int64_t d)
| Division `q/=d`.
static giv_all_inlined Integer & | mod (Integer &r, const Integer &n, const uint64_t d)
| Division `q/=d`.
static giv_all_inlined Integer & | mod (Integer &r, const Integer &n, const int32_t d)
| Division `q/=d`.
static giv_all_inlined Integer & | mod (Integer &r, const Integer &n, const uint32_t d)
| Division `q/=d`.
static giv_all_inlined Integer & | divmod (Integer &q, Integer &r, const Integer &n, const Integer &d)
| Euclidean division.
static giv_all_inlined Integer & | divmod (Integer &q, int64_t &r, const Integer &n, const int64_t d)
| Division `q/=d`.
static giv_all_inlined Integer & | divmod (Integer &q, uint64_t &r, const Integer &n, const uint64_t d)
| Division `q/=d`.
static giv_all_inlined Integer & | ceil (Integer &res, const Integer &n, const Integer &d)
| rounding functions.
static giv_all_inlined Integer & | floor (Integer &res, const Integer &n, const Integer &d)
static giv_all_inlined Integer & | trunc (Integer &res, const Integer &n, const Integer &d)
static giv_all_inlined Integer | ceil (const Integer &n, const Integer &d)
| rounding functions.
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.
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.
giv_all_inlined Integer | operator% (const int64_t l, const Integer &n)
| operator %
giv_all_inlined Integer | operator% (const uint64_t l, const Integer &n)
| Division operator.
giv_all_inlined Integer | operator% (const int32_t l, const Integer &n)
| Division operator.
giv_all_inlined Integer | operator% (const uint32_t l, const Integer &n)
| Division operator.

## 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

## representation

mpz_ptr | get_mpz ()
mpz_srcptr | get_mpz () const
| get representation (constant)
mpz_srcptr | get_mpz_const () const
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))`.
giv_all_inlined size_t | bitsize () const
| returns `ceil(log_2(*this))` .
giv_all_inlined uint64_t | operator[] (size_t i) const
| return the i-th word of the integer.
giv_all_inlined uint64_t | length (const Integer &a)
| returns the number of bytes used to store *this
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 &a)
| parity of an integer

## I/O

giv_all_inlined std::ostream & | print (std::ostream &o) const
| print32_t integer.
giv_all_inlined std::istream & | operator>> (std::istream &i, Integer &n)
| Input/Output of Integers.
giv_all_inlined std::ostream & | operator<< (std::ostream &o, const Integer &n)
| out operator.
giv_all_inlined std::ostream & | absOutput (std::ostream &o, const Integer &n)
| nodoc
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

## Comparisons functions.

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

## Detailed Description

This is the Integer class.

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

Examples
  examples/FiniteField/GF128.C, examples/FiniteField/Test_Extension.C, examples/FiniteField/all_field.C, examples/FiniteField/domain_to_operatorstyle.C, examples/FiniteField/kronecker.C, examples/Integer/Fibonacci.C, examples/Integer/ModularSquareRoot.C, examples/Integer/ProbLucas.C, examples/Integer/RSA_decipher.C, examples/Integer/RSA_encipher.C, examples/Integer/givaro-ssh-keygen.C, examples/Integer/iexponentiation.C, examples/Integer/ifactor.C, examples/Integer/ifactor_lenstra.C, examples/Integer/igcd.C, examples/Integer/igcdext.C, examples/Integer/ilcm.C, examples/Integer/ispower.C, examples/Integer/isprime.C, examples/Integer/isproot.C, examples/Integer/nb_primes.C, examples/Integer/nextprime.C, examples/Integer/order.C, examples/Integer/prevprime.C, examples/Integer/primitiveroot.C, examples/Polynomial/PolynomialCRT.C, examples/Rational/iratrecon.C, and examples/Rational/polydouble.C.

## Constructor & Destructor Documentation

## Integer() [1/13]

Integer | ( | int32_t | n = 0 | ) |

Constructor form a known type.

Parameters

  n | input to be constructed from

## Integer() [2/13]

Integer | ( | int64_t | n | ) |

Constructor form a known type.

Parameters

  n | input to be constructed from

## Integer() [3/13]

Integer | ( | unsigned char | n | ) |

Constructor form a known type.

Parameters

  n | input to be constructed from

## Integer() [4/13]

Integer | ( | uint32_t | n | ) |

Constructor form a known type.

Parameters

  n | input to be constructed from

## Integer() [5/13]

Integer | ( | uint64_t | n | ) |

Constructor form a known type.

Parameters

  n | input to be constructed from

## Integer() [6/13]

Integer | ( | double | n | ) |

Constructor form a known type.

Parameters

  n | input to be constructed from

## Integer() [7/13]

Integer | ( | const char * | n | ) |

Constructor form a known type.

Parameters

  n | input to be constructed from

## Integer() [8/13]

giv_all_inlined Integer | ( | const mpz_class & | a | ) |

inline

Constructor form a known type.

Parameters

  n | input to be constructed from

## Integer() [9/13]

template<size_t K>

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

inline

Constructor form a known type.

Parameters

  n | input to be constructed from

## Integer() [10/13]

template<size_t K>

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

inline

Constructor form a known type.

Parameters

  n | input to be constructed from

## Integer() [11/13]

Integer | ( | const Integer & | n | ) |

Copy constructor.

Parameters

  n | input to be constructed from

## Integer() [12/13]

giv_all_inlined Integer | ( | uint64_t * | d,
|  | int64_t | sz )

Creates a new Integer from pointers.

Parameters

  d | array
  sz | size

## Integer() [13/13]

Integer | ( | const vect_t & | v | ) |

Creates a new Integers for a vector of limbs.

Parameters

  v | vector of limbs

## Member Function Documentation

## operator=()

Integer & operator= | ( | const Integer & | n | ) |

copy from an integer.

Parameters

  n | integer to copy.

## logcpy()

Integer & logcpy | ( | const Integer & | n | ) |

copy from an integer.

Parameters

  n | integer to copy.

## copy()

Integer & copy | ( | const Integer & | n | ) |

copy from an integer.

Parameters

  n | integer to copy.

Examples
  examples/Integer/ProbLucas.C.

## isleq()

template<class A, class B>

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

inline static

isleq

Parameters

  a,b |

## operator>=() [1/7]

int32_t operator>= | ( | const Integer & | l | ) | const

greater or equal.

Parameters

  l | integer to be compared to

## operator>=() [2/7]

int32_t operator>= | ( | const int32_t | l | ) | const

greater or equal.

Parameters

  l | integer to be compared to

## operator>=() [3/7]

int32_t operator>= | ( | const int64_t | l | ) | const

greater or equal.

Parameters

  l | integer to be compared to

## operator>=() [4/7]

int32_t operator>= | ( | const uint64_t | l | ) | const

greater or equal.

Parameters

  l | integer to be compared to

## operator>=() [5/7]

int32_t operator>= | ( | const uint32_t | l | ) | const

greater or equal.

Parameters

  l | integer to be compared to

## operator>=() [6/7]

int32_t operator>= | ( | const double | l | ) | const

greater or equal.

Parameters

  l | integer to be compared to

## operator>=() [7/7]

int32_t operator>= | ( | const float | l | ) | const

greater or equal.

Parameters

  l | integer to be compared to

## operator<=() [1/7]

int32_t operator<= | ( | const Integer & | l | ) | const

less or equal

Parameters

  l | integer to be compared to

## operator<=() [2/7]

int32_t operator<= | ( | const int32_t | l | ) | const

greater or equal.

Parameters

  l | integer to be compared to

## operator<=() [3/7]

int32_t operator<= | ( | const int64_t | l | ) | const

greater or equal.

Parameters

  l | integer to be compared to

## operator<=() [4/7]

int32_t operator<= | ( | const uint64_t | l | ) | const

greater or equal.

Parameters

  l | integer to be compared to

## operator<=() [5/7]

int32_t operator<= | ( | const uint32_t | l | ) | const

greater or equal.

Parameters

  l | integer to be compared to

## operator<=() [6/7]

int32_t operator<= | ( | const double | l | ) | const

greater or equal.

Parameters

  l | integer to be compared to

## operator<=() [7/7]

int32_t operator<= | ( | const float | l | ) | const

greater or equal.

Parameters

  l | integer to be compared to

## operator!=() [1/7]

int32_t operator!= | ( | const Integer & | l | ) | const

operator != (not equal)

Parameters

  l | integer

Returns
  `1` iff l == this

## operator!=() [2/7]

int32_t operator!= | ( | const int32_t | l | ) | const

greater or equal.

Parameters

  l | integer to be compared to

## operator!=() [3/7]

int32_t operator!= | ( | const int64_t | l | ) | const

greater or equal.

Parameters

  l | integer to be compared to

## operator!=() [4/7]

int32_t operator!= | ( | const uint64_t | l | ) | const

greater or equal.

Parameters

  l | integer to be compared to

## operator!=() [5/7]

int32_t operator!= | ( | const uint32_t | l | ) | const

greater or equal.

Parameters

  l | integer to be compared to

## operator!=() [6/7]

int32_t operator!= | ( | const double | l | ) | const

greater or equal.

Parameters

  l | integer to be compared to

## operator!=() [7/7]

int32_t operator!= | ( | const float | l | ) | const

greater or equal.

Parameters

  l | integer to be compared to

## operator==() [1/7]

int32_t operator== | ( | const Integer & | l | ) | const

Equality.

Parameters

  l | integer to be compared to

## operator==() [2/7]

int32_t operator== | ( | const int32_t | l | ) | const

greater or equal.

Parameters

  l | integer to be compared to

## operator==() [3/7]

int32_t operator== | ( | const int64_t | l | ) | const

greater or equal.

Parameters

  l | integer to be compared to

## operator==() [4/7]

int32_t operator== | ( | const uint64_t | l | ) | const

greater or equal.

Parameters

  l | integer to be compared to

## operator==() [5/7]

int32_t operator== | ( | const uint32_t | l | ) | const

greater or equal.

Parameters

  l | integer to be compared to

## operator==() [6/7]

int32_t operator== | ( | const double | l | ) | const

greater or equal.

Parameters

  l | integer to be compared to

## operator==() [7/7]

int32_t operator== | ( | const float | l | ) | const

greater or equal.

Parameters

  l | integer to be compared to

## operator>() [1/7]

int32_t operator> | ( | const Integer & | l | ) | const

greater (strict)

Parameters

  l | integer to be compared to

## operator>() [2/7]

int32_t operator> | ( | const int32_t | l | ) | const

greater or equal.

Parameters

  l | integer to be compared to

## operator>() [3/7]

int32_t operator> | ( | const int64_t | l | ) | const

greater or equal.

Parameters

  l | integer to be compared to

## operator>() [4/7]

int32_t operator> | ( | const uint64_t | l | ) | const

greater or equal.

Parameters

  l | integer to be compared to

## operator>() [5/7]

int32_t operator> | ( | const uint32_t | l | ) | const

greater or equal.

Parameters

  l | integer to be compared to

## operator>() [6/7]

int32_t operator> | ( | const double | l | ) | const

greater or equal.

Parameters

  l | integer to be compared to

## operator>() [7/7]

int32_t operator> | ( | const float | l | ) | const

greater or equal.

Parameters

  l | integer to be compared to

## operator<() [1/7]

int32_t operator< | ( | const Integer & | l | ) | const

less (strict)

Parameters

  l | integer to be compared to

## operator<() [2/7]

int32_t operator< | ( | const int32_t | l | ) | const

greater or equal.

Parameters

  l | integer to be compared to

## operator<() [3/7]

int32_t operator< | ( | const int64_t | l | ) | const

greater or equal.

Parameters

  l | integer to be compared to

## operator<() [4/7]

int32_t operator< | ( | const uint64_t | l | ) | const

greater or equal.

Parameters

  l | integer to be compared to

## operator<() [5/7]

int32_t operator< | ( | const uint32_t | l | ) | const

greater or equal.

Parameters

  l | integer to be compared to

## operator<() [6/7]

int32_t operator< | ( | const double | l | ) | const

greater or equal.

Parameters

  l | integer to be compared to

## operator<() [7/7]

int32_t operator< | ( | const float | l | ) | const

greater or equal.

Parameters

  l | integer to be compared to

## operator^() [1/3]

Integer operator^ | ( | const Integer & | a | ) | const

XOR (^).

Parameters

  a | integer

## operator^() [2/3]

Integer operator^ | ( | const uint64_t & | a | ) | const

XOR (^).

Parameters

  a | integer

## operator^() [3/3]

Integer operator^ | ( | const uint32_t & | a | ) | const

XOR (^).

Parameters

  a | integer

## operator^=() [1/3]

Integer & operator^= | ( | const Integer & | a | ) |

XOR inplace (^=).

Parameters

  a | integer

## operator^=() [2/3]

Integer & operator^= | ( | const uint64_t & | a | ) |

XOR (^).

Parameters

  a | integer

## operator^=() [3/3]

Integer & operator^= | ( | const uint32_t & | a | ) |

XOR (^).

Parameters

  a | integer

## operator|() [1/3]

Integer operator| | ( | const Integer & | a | ) | const

OR (|).

Parameters

  a | integer

## operator|() [2/3]

Integer operator| | ( | const uint64_t & | a | ) | const

XOR (^).

Parameters

  a | integer

## operator|() [3/3]

Integer operator| | ( | const uint32_t & | a | ) | const

XOR (^).

Parameters

  a | integer

## operator|=() [1/3]

Integer & operator|= | ( | const Integer & | a | ) |

OR inplace (|=).

Parameters

  a | integer

## operator|=() [2/3]

Integer & operator|= | ( | const uint64_t & | a | ) |

XOR (^).

Parameters

  a | integer

## operator|=() [3/3]

Integer & operator|= | ( | const uint32_t & | a | ) |

XOR (^).

Parameters

  a | integer

## operator&() [1/3]

Integer operator& | ( | const Integer & | a | ) | const

AND (&).

Parameters

  a | integer

## operator&() [2/3]

uint32_t operator& | ( | const uint32_t & | a | ) | const

XOR (^).

Parameters

  a | integer

## operator&() [3/3]

uint64_t operator& | ( | const uint64_t & | a | ) | const

XOR (^).

Parameters

  a | integer

## operator&=() [1/3]

Integer & operator&= | ( | const Integer & | a | ) |

AND inplace (&=).

Parameters

  a | integer

## operator&=() [2/3]

Integer & operator&= | ( | const uint64_t & | a | ) |

XOR (^).

Parameters

  a | integer

## operator&=() [3/3]

Integer & operator&= | ( | const uint32_t & | a | ) |

XOR (^).

Parameters

  a | integer

## operator<<() [1/4]

Integer operator<< | ( | int32_t | l | ) | const

left shift (<<)

Parameters

  l | shift

## operator<<() [2/4]

Integer operator<< | ( | int64_t | l | ) | const

XOR (^).

Parameters

  a | integer

## operator<<() [3/4]

Integer operator<< | ( | uint32_t | l | ) | const

XOR (^).

Parameters

  a | integer

## operator<<() [4/4]

Integer operator<< | ( | uint64_t | l | ) | const

XOR (^).

Parameters

  a | integer

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

Integer & operator<<= | ( | int32_t | l | ) |

left shift inplace (<<=)

Parameters

  l | shift

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

Integer & operator<<= | ( | int64_t | l | ) |

XOR (^).

Parameters

  a | integer

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

Integer & operator<<= | ( | uint32_t | l | ) |

XOR (^).

Parameters

  a | integer

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

Integer & operator<<= | ( | uint64_t | l | ) |

XOR (^).

Parameters

  a | integer

## operator>>() [1/4]

Integer operator>> | ( | int32_t | l | ) | const

right shift (>>)

Parameters

  l | shift

## operator>>() [2/4]

Integer operator>> | ( | int64_t | l | ) | const

XOR (^).

Parameters

  a | integer

## operator>>() [3/4]

Integer operator>> | ( | uint32_t | l | ) | const

XOR (^).

Parameters

  a | integer

## operator>>() [4/4]

Integer operator>> | ( | uint64_t | l | ) | const

XOR (^).

Parameters

  a | integer

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

Integer & operator>>= | ( | int32_t | l | ) |

right shift inplace (>>=)

Parameters

  l | shift

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

Integer & operator>>= | ( | int64_t | l | ) |

XOR (^).

Parameters

  a | integer

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

Integer & operator>>= | ( | uint32_t | l | ) |

XOR (^).

Parameters

  a | integer

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

Integer & operator>>= | ( | uint64_t | l | ) |

XOR (^).

Parameters

  a | integer

## addin() [1/5]

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

static

Addition (inplace) `res+=n`.

Parameters

  res | as in the formula
  n | as in the formula

Examples
  examples/Integer/givaro-ssh-keygen.C.

## addin() [2/5]

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

static

Addition (inplace) `res+=n`.

Parameters

  res | as in the formula
  n | as in the formula

## addin() [3/5]

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

static

Addition (inplace) `res+=n`.

Parameters

  res | as in the formula
  n | as in the formula

## addin() [4/5]

giv_all_inlined Integer & addin | ( | Integer & | res,
|  | const int32_t | n )

inline static

Addition (inplace) `res+=n`.

Parameters

  res | as in the formula
  n | as in the formula

## addin() [5/5]

giv_all_inlined Integer & addin | ( | Integer & | res,
|  | const uint32_t | n )

inline static

Addition (inplace) `res+=n`.

Parameters

  res | as in the formula
  n | as in the formula

## add() [1/5]

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

static

Addition `res=n1+n2`.

Parameters

  res | as in the formula
  n1 | as in the formula
  n2 | as in the formula

## add() [2/5]

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

static

Addition (inplace) `res+=n`.

Parameters

  res | as in the formula
  n | as in the formula

## add() [3/5]

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

static

Addition (inplace) `res+=n`.

Parameters

  res | as in the formula
  n | as in the formula

## add() [4/5]

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

inline static

Addition (inplace) `res+=n`.

Parameters

  res | as in the formula
  n | as in the formula

## add() [5/5]

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

inline static

Addition (inplace) `res+=n`.

Parameters

  res | as in the formula
  n | as in the formula

## subin() [1/5]

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

static

Substraction (inplace) `res-=n`.

Parameters

  res | as in the formula
  n | as in the formula

## subin() [2/5]

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

static

Addition (inplace) `res+=n`.

Parameters

  res | as in the formula
  n | as in the formula

## subin() [3/5]

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

static

Addition (inplace) `res+=n`.

Parameters

  res | as in the formula
  n | as in the formula

## subin() [4/5]

giv_all_inlined Integer & subin | ( | Integer & | res,
|  | const int32_t | n )

inline static

Addition (inplace) `res+=n`.

Parameters

  res | as in the formula
  n | as in the formula

## subin() [5/5]

giv_all_inlined Integer & subin | ( | Integer & | res,
|  | const uint32_t | n )

inline static

Addition (inplace) `res+=n`.

Parameters

  res | as in the formula
  n | as in the formula

## sub() [1/5]

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

static

Substraction `res=n1-n2`.

Parameters

  res | as in the formula
  n1 | as in the formula
  n2 | as in the formula

Examples
  examples/Integer/Fibonacci.C, examples/Integer/ProbLucas.C, and examples/Integer/primitiveroot.C.

## sub() [2/5]

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

static

Addition (inplace) `res+=n`.

Parameters

  res | as in the formula
  n | as in the formula

## sub() [3/5]

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

static

Addition (inplace) `res+=n`.

Parameters

  res | as in the formula
  n | as in the formula

## sub() [4/5]

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

inline static

Addition (inplace) `res+=n`.

Parameters

  res | as in the formula
  n | as in the formula

## sub() [5/5]

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

inline static

Addition (inplace) `res+=n`.

Parameters

  res | as in the formula
  n | as in the formula

## negin()

Integer & negin | ( | Integer & | res | ) |

static

Negation (inplace) `res=-res`.

Parameters

  res | as in the formula

## neg()

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

static

Negation `res=-n`.

Parameters

  n | as in the formula
  res | as in the formula

## mulin() [1/5]

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

static

Multiplication (inplace) `res*=n`.

Parameters

  res | as in the formula
  n | as in the formula

## mulin() [2/5]

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

static

Addition (inplace) `res+=n`.

Parameters

  res | as in the formula
  n | as in the formula

## mulin() [3/5]

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

static

Addition (inplace) `res+=n`.

Parameters

  res | as in the formula
  n | as in the formula

## mulin() [4/5]

giv_all_inlined Integer & mulin | ( | Integer & | res,
|  | const int32_t | n )

inline static

Addition (inplace) `res+=n`.

Parameters

  res | as in the formula
  n | as in the formula

## mulin() [5/5]

giv_all_inlined Integer & mulin | ( | Integer & | res,
|  | const uint32_t | n )

inline static

Addition (inplace) `res+=n`.

Parameters

  res | as in the formula
  n | as in the formula

## mul() [1/5]

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

static

Multiplication `res=n1*n2`.

Parameters

  res | as in the formula
  n1 | as in the formula
  n2 | as in the formula

Examples
  examples/Integer/givaro-ssh-keygen.C.

## mul() [2/5]

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

static

Addition (inplace) `res+=n`.

Parameters

  res | as in the formula
  n | as in the formula

## mul() [3/5]

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

static

Addition (inplace) `res+=n`.

Parameters

  res | as in the formula
  n | as in the formula

## mul() [4/5]

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

inline static

Addition (inplace) `res+=n`.

Parameters

  res | as in the formula
  n | as in the formula

## mul() [5/5]

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

inline static

Addition (inplace) `res+=n`.

Parameters

  res | as in the formula
  n | as in the formula

## operator+() [1/5]

Integer operator+ | ( | const Integer & | n | ) | const

operator `+`.

Returns
  `(*this)+n`

Parameters

  n | as in the formula.

## operator+() [2/5]

Integer operator+ | ( | const uint64_t | n | ) | const

operator `+`.

Returns
  `(*this)+n`

Parameters

  n | as in the formula.

## operator+() [3/5]

Integer operator+ | ( | const int64_t | n | ) | const

operator `+`.

Returns
  `(*this)+n`

Parameters

  n | as in the formula.

## operator+() [4/5]

giv_all_inlined Integer operator+ | ( | const uint32_t | n | ) | const

inline

operator `+`.

Returns
  `(*this)+n`

Parameters

  n | as in the formula.

## operator+() [5/5]

giv_all_inlined Integer operator+ | ( | const int32_t | n | ) | const

inline

operator `+`.

Returns
  `(*this)+n`

Parameters

  n | as in the formula.

## operator+=() [1/6]

Integer & operator+= | ( | const Integer & | n | ) |

operator `+=` .

Parameters

  n | asfriend In the formula.

Returns
  `(*this) += n`.

## operator+=() [2/6]

Integer & operator+= | ( | const uint64_t | n | ) |

operator `+`.

Returns
  `(*this)+n`

Parameters

  n | as in the formula.

## operator+=() [3/6]

Integer & operator+= | ( | const int64_t | n | ) |

operator `+`.

Returns
  `(*this)+n`

Parameters

  n | as in the formula.

## operator+=() [4/6]

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

inline

operator `+`.

Returns
  `(*this)+n`

Parameters

  n | as in the formula.

## operator+=() [5/6]

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

inline

operator `+`.

Returns
  `(*this)+n`

Parameters

  n | as in the formula.

## operator+=() [6/6]

template<class XXX>

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

inline

operator `+`.

Returns
  `(*this)+n`

Parameters

  n | as in the formula.

## operator-() [1/6]

Integer operator- | ( | const Integer & | n | ) | const

operator `-`.

Returns
  `(*this)-n`

Parameters

  n | as in the formula.

## operator-() [2/6]

Integer operator- | ( | const uint64_t | n | ) | const

operator `+`.

Returns
  `(*this)+n`

Parameters

  n | as in the formula.

## operator-() [3/6]

Integer operator- | ( | const int64_t | n | ) | const

operator `+`.

Returns
  `(*this)+n`

Parameters

  n | as in the formula.

## operator-() [4/6]

giv_all_inlined Integer operator- | ( | const uint32_t | n | ) | const

inline

operator `+`.

Returns
  `(*this)+n`

Parameters

  n | as in the formula.

## operator-() [5/6]

giv_all_inlined Integer operator- | ( | const int32_t | n | ) | const

inline

operator `+`.

Returns
  `(*this)+n`

Parameters

  n | as in the formula.

## operator-=() [1/6]

Integer & operator-= | ( | const Integer & | n | ) |

operator `-=` .

Parameters

  n | as in the formula.

Returns
  `(*this) -= n`.

## operator-=() [2/6]

Integer & operator-= | ( | const uint64_t | n | ) |

operator `+`.

Returns
  `(*this)+n`

Parameters

  n | as in the formula.

## operator-=() [3/6]

Integer & operator-= | ( | const int64_t | n | ) |

operator `+`.

Returns
  `(*this)+n`

Parameters

  n | as in the formula.

## operator-=() [4/6]

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

inline

operator `+`.

Returns
  `(*this)+n`

Parameters

  n | as in the formula.

## operator-=() [5/6]

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

inline

operator `+`.

Returns
  `(*this)+n`

Parameters

  n | as in the formula.

## operator-=() [6/6]

template<class XXX>

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

inline

operator `+`.

Returns
  `(*this)+n`

Parameters

  n | as 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

  n | as in the formula.

## operator*() [2/5]

Integer operator* | ( | const uint64_t | n | ) | const

operator `+`.

Returns
  `(*this)+n`

Parameters

  n | as in the formula.

## operator*() [3/5]

Integer operator* | ( | const int64_t | n | ) | const

operator `+`.

Returns
  `(*this)+n`

Parameters

  n | as in the formula.

## operator*() [4/5]

giv_all_inlined Integer operator* | ( | const uint32_t | n | ) | const

inline

operator `+`.

Returns
  `(*this)+n`

Parameters

  n | as in the formula.

## operator*() [5/5]

giv_all_inlined Integer operator* | ( | const int32_t | n | ) | const

inline

operator `+`.

Returns
  `(*this)+n`

Parameters

  n | as in the formula.

## operator*=() [1/6]

Integer & operator*= | ( | const Integer & | n | ) |

operator `*=` .

Parameters

  n | as in the formula.

Returns
  `(*this) *= n`.

## operator*=() [2/6]

Integer & operator*= | ( | const uint64_t | n | ) |

operator `+`.

Returns
  `(*this)+n`

Parameters

  n | as in the formula.

## operator*=() [3/6]

Integer & operator*= | ( | const int64_t | n | ) |

operator `+`.

Returns
  `(*this)+n`

Parameters

  n | as in the formula.

## operator*=() [4/6]

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

inline

operator `+`.

Returns
  `(*this)+n`

Parameters

  n | as in the formula.

## operator*=() [5/6]

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

inline

operator `+`.

Returns
  `(*this)+n`

Parameters

  n | as in the formula.

## operator*=() [6/6]

template<class XXX>

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

inline

operator `+`.

Returns
  `(*this)+n`

Parameters

  n | as 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

  res | Integers as in the forumla
  a | Integers as in the forumla
  x | Integers as in the forumla
  y | Integers 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

  res | Integers as in the forumla
  a | Integers as in the forumla
  x | Integers as in the forumla
  y | Integers as in the forumla

## axpyin() [1/2]

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

static

axpyin (inplace) `res += ax`.

Parameters

  res | Integers as in the formula.
  a | Integers as in the formula.
  x | Integers as in the formula.

## axpyin() [2/2]

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

static

axpy `res = ax+y`.

Parameters

  res | Integers as in the forumla
  a | Integers as in the forumla
  x | Integers as in the forumla
  y | Integers 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

  res | Integers as in the formula.
  a | Integers as in the formula.
  x | Integers as in the formula.
  y | Integers 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

  res | Integers as in the forumla
  a | Integers as in the forumla
  x | Integers as in the forumla
  y | Integers as in the forumla

## maxpyin() [1/2]

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

static

maxpyin `res -= ax`.

Parameters

  res | Integers as in the formula.
  a | Integers as in the formula.
  x | Integers as in the formula.

## maxpyin() [2/2]

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

static

axpy `res = ax+y`.

Parameters

  res | Integers as in the forumla
  a | Integers as in the forumla
  x | Integers as in the forumla
  y | Integers 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

  res | Integers as in the formula.
  a | Integers as in the formula.
  x | Integers as in the formula.
  y | Integers 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

  res | Integers as in the forumla
  a | Integers as in the forumla
  x | Integers as in the forumla
  y | Integers 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

  res | Integers as in the formula.
  a | Integers as in the formula.
  x | Integers as in the formula.

## axmyin() [2/2]

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

static

axpy `res = ax+y`.

Parameters

  res | Integers as in the forumla
  a | Integers as in the forumla
  x | Integers as in the forumla
  y | Integers as in the forumla

## divin() [1/3]

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

static

Division `q/=d`.

Parameters

  q | quotient
  d | divisor.

Returns
  `q`

## divin() [2/3]

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

static

Division `q/=d`.

Parameters

  q | quotient
  d | divisor.

Returns
  `q`

## divin() [3/3]

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

static

Division `q/=d`.

Parameters

  q | quotient
  d | divisor.

Returns
  `q`

## div() [1/4]

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

static

Division `q=n/d`.

Parameters

  q | quotient
  n | dividand.
  d | divisor

Returns
  `q`

## div() [2/4]

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

static

Division `q/=d`.

Parameters

  q | quotient
  d | divisor.

Returns
  `q`

## div() [3/4]

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

static

Division `q/=d`.

Parameters

  q | quotient
  d | divisor.

Returns
  `q`

## div() [4/4]

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

static

Division `q/=d`.

Parameters

  q | quotient
  d | divisor.

Returns
  `q`

## divexact() [1/6]

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

static

Division when `d` divides `n`.

Parameters

  q | exact quotient
  n | dividend
  d | divisor

Warning
  if quotient is not exact, the result is not predictable.

Examples
  examples/Integer/ProbLucas.C.

## divexact() [2/6]

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

static

Division `q/=d`.

Parameters

  q | quotient
  d | divisor.

Returns
  `q`

## divexact() [3/6]

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

static

Division `q/=d`.

Parameters

  q | quotient
  d | divisor.

Returns
  `q`

## divexact() [4/6]

Integer divexact | ( | const Integer & | n,
|  | const Integer & | d )

static

Division when `d` divides `n`.

Parameters

  n | dividend
  d | divisor

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

  q | quotient
  d | divisor.

Returns
  `q`

## divexact() [6/6]

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

static

Division `q/=d`.

Parameters

  q | quotient
  d | divisor.

Returns
  `q`

## crem() [1/3]

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

static

Division `q/=d`.

Parameters

  q | quotient
  d | divisor.

Returns
  `q`

## frem() [1/3]

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

static

Division `q/=d`.

Parameters

  q | quotient
  d | divisor.

Returns
  `q`

## crem() [2/3]

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

static

Division `q/=d`.

Parameters

  q | quotient
  d | divisor.

Returns
  `q`

## frem() [2/3]

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

static

Division `q/=d`.

Parameters

  q | quotient
  d | divisor.

Returns
  `q`

## crem() [3/3]

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

static

Division `q/=d`.

Parameters

  q | quotient
  d | divisor.

Returns
  `q`

## frem() [3/3]

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

static

Division `q/=d`.

Parameters

  q | quotient
  d | divisor.

Returns
  `q`

## operator/() [1/5]

Integer operator/ | ( | const Integer & | d | ) | const

Division operator.

Parameters

  d | divisor

## operator/() [2/5]

Integer operator/ | ( | const uint64_t | d | ) | const

Division `q/=d`.

Parameters

  q | quotient
  d | divisor.

Returns
  `q`

## operator/() [3/5]

Integer operator/ | ( | const int64_t | d | ) | const

Division `q/=d`.

Parameters

  q | quotient
  d | divisor.

Returns
  `q`

## operator/() [4/5]

giv_all_inlined Integer operator/ | ( | const uint32_t | d | ) | const

inline

Division `q/=d`.

Parameters

  q | quotient
  d | divisor.

Returns
  `q`

## operator/() [5/5]

giv_all_inlined Integer operator/ | ( | const int32_t | d | ) | const

inline

Division `q/=d`.

Parameters

  q | quotient
  d | divisor.

Returns
  `q`

## operator/=() [1/6]

Integer & operator/= | ( | const Integer & | d | ) |

Division operator (inplace).

Parameters

  d | divisor

## operator/=() [2/6]

Integer & operator/= | ( | const uint64_t | d | ) |

Division `q/=d`.

Parameters

  q | quotient
  d | divisor.

Returns
  `q`

## operator/=() [3/6]

Integer & operator/= | ( | const int64_t | d | ) |

Division `q/=d`.

Parameters

  q | quotient
  d | divisor.

Returns
  `q`

## operator/=() [4/6]

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

inline

Division `q/=d`.

Parameters

  q | quotient
  d | divisor.

Returns
  `q`

## operator/=() [5/6]

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

inline

Division `q/=d`.

Parameters

  q | quotient
  d | divisor.

Returns
  `q`

## operator/=() [6/6]

template<class XXX>

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

inline

Division `q/=d`.

Parameters

  q | quotient
  d | divisor.

Returns
  `q`

## modin() [1/3]

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

static

Function `mod` (inplace).

Parameters

  r | remainder
  n | modulus

Examples
  examples/Integer/givaro-ssh-keygen.C.

## modin() [2/3]

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

static

Division `q/=d`.

Parameters

  q | quotient
  d | divisor.

Returns
  `q`

## modin() [3/3]

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

static

Division `q/=d`.

Parameters

  q | quotient
  d | divisor.

Returns
  `q`

## mod() [1/5]

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

static

Function `mod`.

Parameters

  r | remainder
  n | integer
  d | modulus

Examples
  examples/Integer/givaro-ssh-keygen.C.

## mod() [2/5]

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

static

Division `q/=d`.

Parameters

  q | quotient
  d | divisor.

Returns
  `q`

## mod() [3/5]

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

static

Division `q/=d`.

Parameters

  q | quotient
  d | divisor.

Returns
  `q`

## mod() [4/5]

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

inline static

Division `q/=d`.

Parameters

  q | quotient
  d | divisor.

Returns
  `q`

## mod() [5/5]

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

inline static

Division `q/=d`.

Parameters

  q | quotient
  d | divisor.

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

  q | as in the formula
  r | as in the formula
  n | as in the formula
  d | as in the formula

Returns
  the quotient `q`

Examples
  examples/Integer/ProbLucas.C.

## divmod() [2/3]

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

static

Division `q/=d`.

Parameters

  q | quotient
  d | divisor.

Returns
  `q`

## divmod() [3/3]

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

static

Division `q/=d`.

Parameters

  q | quotient
  d | divisor.

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

  res | the result
  n | the numerator
  d | the 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

  n | the numerator
  d | the 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

  n | modulus

Returns
  remainder `(*this) mod n`

## operator%() [2/8]

int64_t operator% | ( | const uint64_t | n | ) | const

Division `q/=d`.

Parameters

  q | quotient
  d | divisor.

Returns
  `q`

## operator%() [3/8]

int64_t operator% | ( | const int64_t | n | ) | const

Division `q/=d`.

Parameters

  q | quotient
  d | divisor.

Returns
  `q`

## operator%() [4/8]

giv_all_inlined int32_t operator% | ( | const uint32_t | n | ) | const

inline

Division `q/=d`.

Parameters

  q | quotient
  d | divisor.

Returns
  `q`

## operator%() [5/8]

giv_all_inlined int32_t operator% | ( | const int32_t | n | ) | const

inline

Division `q/=d`.

Parameters

  q | quotient
  d | divisor.

Returns
  `q`

## operator%() [6/8]

double operator% | ( | const double | n | ) | const

Division `q/=d`.

Parameters

  q | quotient
  d | divisor.

Returns
  `q`

## operator%() [7/8]

int16_t operator% | ( | const uint16_t | n | ) | const

inline

Division `q/=d`.

Parameters

  q | quotient
  d | divisor.

Returns
  `q`

## operator%() [8/8]

template<class XXX>

XXX operator% | ( | const XXX & | n | ) | const

inline

Division `q/=d`.

Parameters

  q | quotient
  d | divisor.

Returns
  `q`

## operator%=() [1/6]

Integer & operator%= | ( | const Integer & | n | ) |

Modulo operator (inplace).

Parameters

  n | modulus

Returns
  remainder `(*this) <- (*this) mod n`

## operator%=() [2/6]

Integer & operator%= | ( | const uint64_t | n | ) |

Division `q/=d`.

Parameters

  q | quotient
  d | divisor.

Returns
  `q`

## operator%=() [3/6]

Integer & operator%= | ( | const int64_t | n | ) |

Division `q/=d`.

Parameters

  q | quotient
  d | divisor.

Returns
  `q`

## operator%=() [4/6]

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

inline

Division `q/=d`.

Parameters

  q | quotient
  d | divisor.

Returns
  `q`

## operator%=() [5/6]

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

inline

Division `q/=d`.

Parameters

  q | quotient
  d | divisor.

Returns
  `q`

## operator%=() [6/6]

template<class XXX>

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

inline

Division `q/=d`.

Parameters

  q | quotient
  d | divisor.

Returns
  `q`

## get_mpz()

mpz_ptr get_mpz | ( |  | ) |

inline

get representation

## get_mpz_const()

mpz_srcptr get_mpz_const | ( |  | ) | const

inline

get representation

## operator[]()

uint64_t operator[] | ( | size_t | i | ) | const

return the i-th word of the integer.

Word 0 is lowest word.

## random_lessthan()

template<bool ALWAYSPOSITIVE>

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

inline static

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

  o | output stream.

## Friends And Related Symbol Documentation

## compare

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

friend

Compares two integers.

Parameters

  a | integer
  b | integer

Returns
  `1` if , `0` if 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

  a | integer
  b | integer

Returns
  `1` if , `0` if 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]

template<class T>

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,n | integers to compare

## operator>= [2/6]

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

friend

greater or equal.

Parameters

  l | integer to be compared to

## operator>= [3/6]

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

friend

greater or equal.

Parameters

  l | integer 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

  l | integer 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

  l | integer 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

  l | integer 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,n | integers to compare

## operator<= [2/6]

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

friend

greater or equal.

Parameters

  l | integer to be compared to

## operator<= [3/6]

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

friend

greater or equal.

Parameters

  l | integer 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

  l | integer 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

  l | integer 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

  l | integer 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,n | integer

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

  l | integer to be compared to

## operator!= [3/6]

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

friend

greater or equal.

Parameters

  l | integer 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

  l | integer 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

  l | integer 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

  l | integer to be compared to

## operator== [1/6]

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

friend

Equality.

Parameters

  l,n | integers to compare

## operator== [2/6]

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

friend

greater or equal.

Parameters

  l | integer to be compared to

## operator== [3/6]

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

friend

greater or equal.

Parameters

  l | integer 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

  l | integer 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

  l | integer 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

  l | integer 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,n | integers to compare

## operator> [2/6]

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

friend

greater or equal.

Parameters

  l | integer to be compared to

## operator> [3/6]

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

friend

greater or equal.

Parameters

  l | integer 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

  l | integer 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

  l | integer 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

  l | integer 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,n | integers to compare

## operator< [2/6]

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

friend

greater or equal.

Parameters

  l | integer to be compared to

## operator< [3/6]

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

friend

greater or equal.

Parameters

  l | integer 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

  l | integer 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

  l | integer 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

  l | integer to be compared to

## operator+ [1/4]

giv_all_inlined Integer operator+ | ( | const int32_t | l,
|  | const Integer & | n )

friend

operator +.

Parameters

  l,n | to be added

## operator+ [2/4]

giv_all_inlined Integer operator+ | ( | const uint32_t | l,
|  | const Integer & | n )

friend

operator `+`.

Returns
  `(*this)+n`

Parameters

  n | as in the formula.

## operator+ [3/4]

giv_all_inlined Integer operator+ | ( | const int64_t | l,
|  | const Integer & | n )

friend

operator `+`.

Returns
  `(*this)+n`

Parameters

  n | as in the formula.

## operator+ [4/4]

giv_all_inlined Integer operator+ | ( | const uint64_t | l,
|  | const Integer & | n )

friend

operator `+`.

Returns
  `(*this)+n`

Parameters

  n | as in the formula.

## operator- [1/4]

giv_all_inlined Integer operator- | ( | const int32_t | l,
|  | const Integer & | n )

friend

operator -

Parameters

  l,n | to be substracted

## operator- [2/4]

giv_all_inlined Integer operator- | ( | const uint32_t | l,
|  | const Integer & | n )

friend

operator `+`.

Returns
  `(*this)+n`

Parameters

  n | as in the formula.

## operator- [3/4]

giv_all_inlined Integer operator- | ( | const int64_t | l,
|  | const Integer & | n )

friend

operator `+`.

Returns
  `(*this)+n`

Parameters

  n | as in the formula.

## operator- [4/4]

giv_all_inlined Integer operator- | ( | const uint64_t | l,
|  | const Integer & | n )

friend

operator `+`.

Returns
  `(*this)+n`

Parameters

  n | as in the formula.

## operator* [1/4]

giv_all_inlined Integer operator* | ( | const int32_t | l,
|  | const Integer & | n )

friend

operator *

Parameters

  l,n | to be multpct

## operator* [2/4]

giv_all_inlined Integer operator* | ( | const uint32_t | l,
|  | const Integer & | n )

friend

operator `+`.

Returns
  `(*this)+n`

Parameters

  n | as in the formula.

## operator* [3/4]

giv_all_inlined Integer operator* | ( | const int64_t | l,
|  | const Integer & | n )

friend

operator `+`.

Returns
  `(*this)+n`

Parameters

  n | as in the formula.

## operator* [4/4]

giv_all_inlined Integer operator* | ( | const uint64_t | l,
|  | const Integer & | n )

friend

operator `+`.

Returns
  `(*this)+n`

Parameters

  n | as in the formula.

## operator/ [1/2]

giv_all_inlined Integer operator/ | ( | const int64_t | l,
|  | const Integer & | n )

friend

Division operator.

Parameters

  d | divisor

## operator/ [2/2]

giv_all_inlined Integer operator/ | ( | const uint64_t | l,
|  | const Integer & | n )

friend

Division operator.

Parameters

  d | divisor

## 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

  d | divisor

## operator% [3/4]

giv_all_inlined Integer operator% | ( | const int32_t | l,
|  | const Integer & | n )

friend

Division operator.

Parameters

  d | divisor

## operator% [4/4]

giv_all_inlined Integer operator% | ( | const uint32_t | l,
|  | const Integer & | n )

friend

Division operator.

Parameters

  d | divisor

## gcd [1/4]

giv_all_inlined Integer gcd | ( | const Integer & | a,
|  | const Integer & | b )

friend

gcd.

Parameters

  a,b | integers

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.

Examples
  examples/Integer/givaro-ssh-keygen.C.

## gcd [2/4]

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

friend

gcd.

Parameters

  a,b | integers

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,b | integers

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,b | integers

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] | u | is set to 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,Q | params

## 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

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,b | integers

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,b | integers

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,b | integers

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,b | integers

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

Parameters

  n,l |

## pow [7/9]

giv_all_inlined Integer pow | ( | const Integer & | n,
|  | const uint64_t | l )

friend

gcd.

Parameters

  a,b | integers

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,b | integers

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,b | integers

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 .

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

  a | integer

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

  i | input stream
  n | integer to be built

## operator<<

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

friend

out operator.

Parameters

  o | output stream
  n | integer to be printed

## absOutput

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

friend

nodoc

Parameters

  o | output
  n | integer

## 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

  x | x
  count | x
  order | x
  size | x
  endian | x
  nails | x
  op | x

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

- gmp++_int.h
- gmp++_int_add.C
- gmp++_int_compare.C
- gmp++_int_cstor.C
- gmp++_int_div.C
- gmp++_int_io.C
- gmp++_int_lib.C
- gmp++_int_misc.C
- gmp++_int_mod.C
- gmp++_int_mul.C
- gmp++_int_rand.inl
- gmp++_int_sub.C