Go to the source code of this file.
Classes
- struct unsigned_int_with_size_at_least_helper< s >
- Get int type of size at least s, void if impossible. More...
- struct unsigned_int_with_size_at_least_helper< s >::if_helper< b, T, E >
- struct unsigned_int_with_size_at_least_helper< s >::if_helper< false, T, E >
- struct unsigned_int_with_double_size_helper< C >
- Get int with double size. More...
- struct signed_of_helper< C >
- Get the corresponding signed integer type. More...
- struct signed_of_helper< double >
- struct signed_of_helper< char >
- struct signed_of_helper< signed char >
- struct signed_of_helper< short int >
- struct signed_of_helper< int >
- struct signed_of_helper< long int >
- struct signed_of_helper< long long int >
- struct signed_of_helper< unsigned char >
- struct signed_of_helper< short unsigned int >
- struct signed_of_helper< unsigned int >
- struct signed_of_helper< long unsigned int >
- struct signed_of_helper< long long unsigned int >
- struct unsigned_of_helper< C >
- Get the unsigned corresponding integer type. More...
- struct unsigned_of_helper< char >
- struct unsigned_of_helper< signed char >
- struct unsigned_of_helper< short int >
- struct unsigned_of_helper< int >
- struct unsigned_of_helper< long int >
- struct unsigned_of_helper< long long int >
- struct unsigned_of_helper< unsigned char >
- struct unsigned_of_helper< short unsigned int >
- struct unsigned_of_helper< unsigned int >
- struct unsigned_of_helper< long unsigned int >
- struct unsigned_of_helper< long long unsigned int >
- struct is_signed_helper< C >
- Tell if the integer type is signed. More...
- struct is_signed_helper< signed char >
- struct is_signed_helper< char >
- struct is_signed_helper< short int >
- struct is_signed_helper< int >
- struct is_signed_helper< long int >
- struct is_signed_helper< long long int >
- struct int_bitsize_helper_rec< uC, s, x >
- Store the bitsize of abs (p) in field value. More...
- struct int_bitsize_helper_rec< uC, 1, x >
- struct int_bitsize_helper_rec< uC, 0, x >
- struct int_bitsize_helper< C, p >
- class long_int_mul_op< C >
- struct long_int_rshift_op< C >
- struct long_int_lshift_op< C >
- struct long_int_sub_op< C >
- struct long_int_ge_op< C >
- struct int_gcd_helper
- struct unsigned_int_gcd_helper
Namespaces
Defines
Functions
- void set_maximal (int &x)
- void set_minimal (int &x)
- void set_maximal (nat &x)
- void set_minimal (nat &x)
- void set_maximal (long int &x)
- void set_minimal (long int &x)
- void set_maximal (long unsigned int &x)
- void set_minimal (long unsigned int &x)
- nat log_2 (nat p)
- nat next_power_of_two (nat p)
- bool is_power_of_two (nat p)
- nat log_3 (nat p)
- nat next_power_of_three (nat p)
- template<typename C > static nat bit_size (const C &p)
- Return the bitsize of abs (p).
- bool divides (const signed char &n, const signed char &m)
- signed char rem (const signed char &n, const signed char &m)
- signed char quo (const signed char &n, const signed char &m)
- signed char rem (const signed char &n, const signed char &m, signed char &q)
- bool divides (const short int &n, const short int &m)
- short int rem (const short int &n, const short int &m)
- short int quo (const short int &n, const short int &m)
- short int rem (const short int &n, const short int &m, short int &q)
- bool divides (const int &n, const int &m)
- int rem (const int &n, const int &m)
- int quo (const int &n, const int &m)
- int rem (const int &n, const int &m, int &q)
- bool divides (const long int &n, const long int &m)
- long int rem (const long int &n, const long int &m)
- long int quo (const long int &n, const long int &m)
- long int rem (const long int &n, const long int &m, long int &q)
- bool divides (const long long int &n, const long long int &m)
- long long int rem (const long long int &n, const long long int &m)
- long long int quo (const long long int &n, const long long int &m)
- long long int rem (const long long int &n, const long long int &m, long long int &q)
- bool divides (const unsigned char &n, const unsigned char &m)
- unsigned char rem (const unsigned char &n, const unsigned char &m)
- unsigned char quo (const unsigned char &n, const unsigned char &m)
- unsigned char rem (const unsigned char &n, const unsigned char &m, unsigned char &q)
- bool divides (const unsigned short int &n, const unsigned short int &m)
- unsigned short int rem (const unsigned short int &n, const unsigned short int &m)
- unsigned short int quo (const unsigned short int &n, const unsigned short int &m)
- unsigned short int rem (const unsigned short int &n, const unsigned short int &m, unsigned short int &q)
- bool divides (const unsigned int &n, const unsigned int &m)
- unsigned int rem (const unsigned int &n, const unsigned int &m)
- unsigned int quo (const unsigned int &n, const unsigned int &m)
- unsigned int rem (const unsigned int &n, const unsigned int &m, unsigned int &q)
- bool divides (const unsigned long int &n, const unsigned long int &m)
- unsigned long int rem (const unsigned long int &n, const unsigned long int &m)
- unsigned long int quo (const unsigned long int &n, const unsigned long int &m)
- unsigned long int rem (const unsigned long int &n, const unsigned long int &m, unsigned long int &q)
- bool divides (const unsigned long long int &n, const unsigned long long int &m)
- unsigned long long int rem (const unsigned long long int &n, const unsigned long long int &m)
- unsigned long long int quo (const unsigned long long int &n, const unsigned long long int &m)
- unsigned long long int rem (const unsigned long long int &n, const unsigned long long int &m, unsigned long long int &q)
- signed char gcd (const signed char a, const signed char b)
- signed char gcd (const signed char a, const signed char b, signed char &co_a)
- signed char gcd (const signed char a, const signed char b, signed char &co_a, signed char &co_b)
- short int gcd (const short int a, const short int b)
- short int gcd (const short int a, const short int b, short int &co_a)
- short int gcd (const short int a, const short int b, short int &co_a, short int &co_b)
- int gcd (const int a, const int b)
- int gcd (const int a, const int b, int &co_a)
- int gcd (const int a, const int b, int &co_a, int &co_b)
- long int gcd (const long int a, const long int b)
- long int gcd (const long int a, const long int b, long int &co_a)
- long int gcd (const long int a, const long int b, long int &co_a, long int &co_b)
- long long int gcd (const long long int a, const long long int b)
- long long int gcd (const long long int a, const long long int b, long long int &co_a)
- long long int gcd (const long long int a, const long long int b, long long int &co_a, long long int &co_b)
- unsigned char gcd (const unsigned char a, const unsigned char b)
- unsigned short int gcd (const unsigned short int a, const unsigned short int b)
- unsigned int gcd (const unsigned int a, const unsigned int b)
- unsigned long int gcd (const unsigned long int a, const unsigned long int b)
- unsigned long long int gcd (const unsigned long long int a, const unsigned long long int b)
Define Documentation
#define INT_DIV_DECLARE |
( |
|
I | ) |
|
Value:inline bool divides (const I& n, const I& m) { return (m % n) == 0; } \
inline I rem (const I& n, const I& m) { return m == 0 ? n : n % m; } \
inline I quo (const I& n, const I& m) { return m == 0 ? 0 : n / m; } \
inline I rem (const I& n, const I& m, I& q) { \
I _q= quo (n, m); I _r= n - _q * m; q= _q; return _r; }
Definition at line 425 of file int.hpp.
#define INT_GCD_DECLARE |
( |
|
I | ) |
|
Value:inline I gcd (const I a, const I b) { \
return int_gcd_helper::gcd (a, b); } \
\
inline I gcd (const I a, const I b, I& co_a) { \
return int_gcd_helper::gcd (a, b, co_a); } \
\
inline I gcd (const I a, const I b, I& co_a, I& co_b) { \
return int_gcd_helper::gcd (a, b, co_a, co_b); }
Definition at line 547 of file int.hpp.
#define MMX_SAFE_LEFT_SHIFT_INT |
( |
|
C, |
|
|
|
a, |
|
|
|
n |
|
) |
| (((n) >= 8*sizeof(C)) ? ((C) 0) : (((C) a) << ((n)/2)) << ((n)-(n)/2)) |
Hereafter C must a genuine C/C++ int type, signed or not.
Definition at line 85 of file int.hpp.
#define MMX_SAFE_RIGHT_SHIFT_INT |
( |
|
C, |
|
|
|
a, |
|
|
|
n |
|
) |
| (((n) >= 8*sizeof(C)) ? ((C) 0) : (((C) a) >> ((n)/2)) >> ((n)-(n)/2)) |
#define UINT_GCD_DECLARE |
( |
|
I | ) |
|