21 namespace arithmetic {
52 namespace arithmetic {
118 int e()
const {
return real_part; }
119 int s()
const {
return s_part; }
125 { real_part+=y.
e(); s_part+=y.
s();
return *
this; }
127 { real_part-=y.
e(); s_part-=y.
s();
return *
this; }
165 {
return a >= 0 ? a/b : ~(~a/b); }
185 {
return a >= 0 ? a%b
186 : b+~(~static_cast<
Denom_t>(a)%b);
211 if (d>1) num/=
Numer_t(d),denom/=d;
Denom_t dummy_mult
Definition: arithmetic.cpp:50
Denom_t remainder(I, Denom_t)
Definition: arithmetic.h:184
Rational & operator-=(Rational q)
Definition: arithmetic.h:80
bool operator>(Rational q) const
Definition: arithmetic.h:101
Vector< C > operator/(Vector< C > v, C c)
Definition: matrix.h:136
bool operator!=(const type_expr &x, const type_expr &y)
Definition: axis-types.h:374
Denom_t gcd(Numer_t, Denom_t)
Definition: arithmetic.h:191
bool operator<(Rational q) const
Definition: arithmetic.h:97
Rational & operator%=(Rational q)
Definition: arithmetic.h:83
Rational & operator=(Rational q)
Definition: arithmetic.h:76
PID_Matrix< C > operator-(PID_Matrix< C > A, C c)
Definition: matrix.h:51
Definition: arithmetic.h:54
bool operator==(Rational q) const
Definition: arithmetic.h:93
Denom_t modProd(Denom_t a, Denom_t b, Denom_t n)
Definition: arithmetic.cpp:85
Denom_t power(Denom_t x, unsigned int n)
Definition: arithmetic.cpp:93
Numer_t num
Definition: arithmetic.h:56
Denom_t div_gcd(Denom_t a, Denom_t b)
Definition: arithmetic.h:189
I divide(I, Denom_t)
Definition: arithmetic.h:164
Split_integer & times_s()
Definition: arithmetic.h:137
Vector< C > & operator%=(Vector< C > &v, C c)
Definition: matrix.cpp:127
void swap(simple_list< T, Alloc > &x, simple_list< T, Alloc > &y)
Definition: sl_list.h:674
Numer_t numerator() const
Definition: arithmetic.h:62
Rational & operator/=(Rational q)
Definition: arithmetic.h:82
PID_Matrix< C > operator+(PID_Matrix< C > A, C c)
Definition: matrix.h:44
Split_integer & negate()
Definition: arithmetic.h:136
Rational(Numer_t n=0, Denom_t d=1)
Definition: arithmetic.h:59
bool operator<=(Rational q) const
Definition: arithmetic.h:99
RationalVector< C2 > operator*(const matrix::Matrix< C1 > &M, const RationalVector< C2 > &v)
Definition: ratvec.cpp:158
Split_integer & times_1_s()
Definition: arithmetic.h:138
PID_Matrix< C > & operator+=(PID_Matrix< C > &A, C c)
Definition: matrix.cpp:733
#define out(c)
Definition: cweave.c:205
int s() const
Definition: arithmetic.h:119
Denom_t denom
Definition: arithmetic.h:57
std::ostream & operator<<(std::ostream &strm, const Split_integer &s)
Definition: basic_io.cpp:157
PID_Matrix< C > & operator-=(PID_Matrix< C > &A, C c)
Definition: matrix.h:48
int s_part
Definition: arithmetic.h:114
unsigned long long int Denom_t
Definition: Atlas.h:69
Vector< C > & operator/=(Vector< C > &v, C c)
Definition: matrix.cpp:99
Split_integer(int a=0, int b=0)
Definition: arithmetic.h:116
long long int Numer_t
Definition: Atlas.h:68
Rational & operator+=(Rational q)
Definition: arithmetic.h:79
Denom_t dummy_gcd
Definition: arithmetic.cpp:50
Rational & normalize()
Definition: arithmetic.h:208
Denom_t unsigned_gcd(Denom_t a, Denom_t b)
Definition: arithmetic.cpp:40
Permutation normalize(const DynkinDiagram &d)
Definition: dynkin.cpp:386
unsigned long n
Definition: axis.cpp:77
bool operator==(const type_expr &x, const type_expr &y)
Definition: axis-types.cpp:257
bool operator>=(Rational q) const
Definition: arithmetic.h:103
Denom_t modAdd(Denom_t, Denom_t, Denom_t)
Definition: arithmetic.h:200
int e() const
Definition: arithmetic.h:118
const expr & e
Definition: axis.cpp:95
Definition: arithmetic.h:112
Denom_t lcm(Denom_t a, Denom_t b, Denom_t &gcd, Denom_t &mult_a)
Definition: arithmetic.cpp:58
Rational & operator*=(Rational q)
Definition: arithmetic.h:81
bool operator!=(Rational q) const
Definition: arithmetic.h:95
Numer_t denominator() const
Definition: arithmetic.h:67