diff options
Diffstat (limited to 'src/util/integer_cln_imp.h')
-rw-r--r-- | src/util/integer_cln_imp.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/util/integer_cln_imp.h b/src/util/integer_cln_imp.h index 9d67e8fba..d3e5c07ca 100644 --- a/src/util/integer_cln_imp.h +++ b/src/util/integer_cln_imp.h @@ -366,6 +366,18 @@ public: return cln::cl_I_to_int(sgn); } + bool isZero() const { + return cln::zerop(d_value); + } + + bool isOne() const { + return d_value == 1; + } + + bool isNegativeOne() const { + return d_value == -1; + } + //friend std::ostream& operator<<(std::ostream& os, const Integer& n); long getLong() const { |