diff options
Diffstat (limited to 'src/util/integer_gmp_imp.cpp')
-rw-r--r-- | src/util/integer_gmp_imp.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/util/integer_gmp_imp.cpp b/src/util/integer_gmp_imp.cpp index d165dbec3..e0472ac4c 100644 --- a/src/util/integer_gmp_imp.cpp +++ b/src/util/integer_gmp_imp.cpp @@ -73,6 +73,14 @@ unsigned int Integer::getUnsignedInt() const { return (unsigned int) d_value.get_ui(); } +bool Integer::fitsSignedLong() const { + return d_value.fits_slong_p(); +} + +bool Integer::fitsUnsignedLong() const { + return d_value.fits_ulong_p(); +} + Integer Integer::oneExtend(uint32_t size, uint32_t amount) const { // check that the size is accurate DebugCheckArgument((*this) < Integer(1).multiplyByPow2(size), size); |