31 #ifndef QUADRATICINTEGER_BIG_H 32 #define QUADRATICINTEGER_BIG_H 72 virtual void set(
const int& n );
75 virtual void removeSquareFactors();
77 virtual bool bIsInvertible()
const;
78 virtual bool bIsSquareOfIvertible()
const;
84 virtual void multiplyBy(
const int& n );
90 virtual bool bIsLessThan(
const int& n )
const;
91 virtual bool bIsLessThan(
const long int& n )
const;
94 virtual bool bIsGreaterThan(
const int& n )
const;
95 virtual bool bIsGreaterThan(
const long int& n )
const;
96 virtual bool bIsGreaterOEThan(
const int& n )
const;
98 virtual bool bIsEqualTo(
const int& n )
const;
100 ostream& print( ostream& )
const;
101 virtual string to_string(
const string& strFormat =
"generic",
const bool& bProtect =
false )
const;
102 virtual double to_double()
const;
103 virtual string get_classname()
const;
105 mpz_class floor()
const;
108 static bool bIsDAdmissible(
const unsigned int& d );
109 static void set_d(
const unsigned int& d );
110 static vector< QuadraticIntegerBig > qiFactorsRationalPrime(
const unsigned int& iPrime,
bool bWithMultiplicities =
false );
111 static array< long int, 2 > iPellEquation(
const unsigned int& iPrime );
116 mpz_class iNorm()
const;
117 mpz_class iTrace()
const;
121 vector< QuadraticIntegerBig > qiPrimeFactors()
const;
122 map< QuadraticIntegerBig, unsigned int > qiPrimeDecomposition()
const;
137 bool operator==(
const long int& )
const;
144 #endif // QUADRATICINTEGER_H static mpf_class sqrtd
Square root of d.
Definition: quadraticinteger_big.h:53
static map< unsigned int, vector< unsigned int > > iPellMinimalSolution
Solutions for the Pell equations (used to compute the decompositions of rational prime numbers) ...
Definition: quadraticinteger_big.h:57
static map< unsigned int, vector< long int > > iFundamentalUnits
Fundamental units.
Definition: quadraticinteger_big.h:58
static bool bIsOneMod4
True if d is 1 mod 4, false otherwise.
Definition: quadraticinteger_big.h:54
Quadratic integers.
Definition: quadraticinteger.h:44
mpz_class a
First component of the quadratic integer (in the usual Z-basis)
Definition: quadraticinteger_big.h:49
Parent class for rational, quadratic and rc7 integers.
Definition: algebraicinteger.h:43
static int iDiscriminant
Discriminant of the quadratic field.
Definition: quadraticinteger_big.h:55
Quadratic integers with bigint components.
Definition: quadraticinteger_big.h:46
static int d
We work in Q[ sqrt d ].
Definition: quadraticinteger_big.h:52
mpz_class b
Second component of the quadratic integer (in the usual Z-basis)
Definition: quadraticinteger_big.h:50