//friend std::ostream& operator<<(std::ostream& os, const Integer& n);
long getLong() const {
+ // ensure there isn't overflow
Assert(d_value <= std::numeric_limits<long>::max());
Assert(d_value >= std::numeric_limits<long>::min());
return cln::cl_I_to_long(d_value);
}
unsigned long getUnsignedLong() const {
+ // ensure there isn't overflow
Assert(d_value <= std::numeric_limits<unsigned long>::max());
Assert(d_value >= std::numeric_limits<unsigned long>::min());
return cln::cl_I_to_ulong(d_value);
long getLong() const {
long si = d_value.get_si();
-#ifdef CVC4_ASSERTIONS
// ensure there wasn't overflow
- Assert(mpz_cmp_si(d_value.get_mpz_t(), si) == 0);
-#endif /* CVC4_ASSERTIONS */
+ AlwaysAssert(mpz_cmp_si(d_value.get_mpz_t(), si) == 0);
return si;
}
unsigned long getUnsignedLong() const {
unsigned long ui = d_value.get_ui();
-#ifdef CVC4_ASSERTIONS
// ensure there wasn't overflow
- Assert(mpz_cmp_ui(d_value.get_mpz_t(), ui) == 0);
-#endif /* CVC4_ASSERTIONS */
+ AlwaysAssert(mpz_cmp_ui(d_value.get_mpz_t(), ui) == 0);
return ui;
}