38 namespace Gecode {
namespace Int {
namespace Arithmetic {
63 template<
class IntType>
94 return static_cast<int>(
p);
128 long long int m = (
l +
u) >> 1;
132 return static_cast<int>(
l);
166 long long int m = (
l +
u) >> 1;
170 return static_cast<int>(
u);
190 template<
class IntType>
198 long long int x = _x;
203 return static_cast<int>(
x*
x);
216 long long int m = (
l +
u) >> 1;
217 if (m*m >
x)
u=m;
else l=m;
220 return static_cast<int>(
l);
233 long long int m = (
l +
u) >> 1;
234 if (m*m <
x)
l=m;
else u=m;
237 return static_cast<int>(
u);
int fnroot(int x) const
Return where x must be non-negative and .
const int max
Largest allowed integer value.
bool powgr(long long int r, int x) const
Test whether .
const int min
Smallest allowed integer value.
bool even(void) const
Return whether exponent is even.
int cnroot(int x) const
Return where x must be non-negative and .
int p
Number of positive literals for node type.
int n
Number of negative literals for node type.
PowOps(int n)
Initialize with exponent n.
bool powle(long long int r, int x) const
Test whether .
int tpow(int x) const
Return truncated to integer limits.
int n
The exponent and root index.
IntType pow(IntType x) const
Return where .
Node * x
Pointer to corresponding Boolean expression node.
union Gecode::@511::NNF::@54 u
Union depending on nodetype t.
int fnroot(int x) const
Return where x must be non-negative and .
int cnroot(int x) const
Return where x must be non-negative and .
int tpow(int x) const
Return where truncated to integer limits.
Gecode toplevel namespace
bool even(void) const
Return whether exponent is even.
IntType pow(IntType x) const
Return .
IntType
Description of integer types.
int exp(void) const
Return exponent.
#define GECODE_NEVER
Assert that this command is never executed.
int exp(void) const
Return exponent.