16 #ifndef polybori_groebner_PseudoLongProduct_h_
17 #define polybori_groebner_PseudoLongProduct_h_
33 protected BitMask<sizeof(unsigned long)*4> {
39 most(high(first)*high(second)), least(low(first)*low(second)) {
41 long_type mixed = high(least) + high(first)*low(second);
44 mixed = low(mixed) + low(first)*high(second);
47 least = shift(mixed) + low(least);
52 return (most > 0) || (least > rhs);
56 template <
long_type MaxLow>
58 return greater(MaxLow);
62 template <
long_type MaxHigh,
long_type MaxLow>
64 return (most > MaxHigh) || ( (most == MaxHigh) && (least > MaxLow) );
68 long_type most, least;
71 template <
class RhsType>
bool operator>(PseudoLongProduct lhs, const RhsType &rhs)
Definition: PseudoLongProduct.h:73
#define END_NAMESPACE_PBORIGB
Definition: groebner_defs.h:16
bool greater(const PseudoLongLong< MaxHigh, MaxLow > &) const
compare carry-over savely with represented by two unsigned longs
Definition: PseudoLongProduct.h:63
bool greater(long_type rhs) const
compare carry-over savely
Definition: PseudoLongProduct.h:51
#define BEGIN_NAMESPACE_PBORIGB
Definition: groebner_defs.h:15
bool greater(const PseudoLongLong< 0, MaxLow > &) const
compare carry-over savely with represented by two unsigned longs
Definition: PseudoLongProduct.h:57
unsigned long long_type
Definition: PseudoLongProduct.h:36
PseudoLongProduct(const long_type &first, const long_type &second)
Definition: PseudoLongProduct.h:38
This class defines a delayed product of longs and comparison with LongLong Constant.
Definition: PseudoLongProduct.h:32
This class defines PseudoLongLong.
Definition: PseudoLongLong.h:31
This class defines a bit mask and related operations.
Definition: BitMask.h:30