diff options
Diffstat (limited to 'src/util/integer_cln_imp.cpp')
-rw-r--r-- | src/util/integer_cln_imp.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/util/integer_cln_imp.cpp b/src/util/integer_cln_imp.cpp index aa6cb03af..a7412b503 100644 --- a/src/util/integer_cln_imp.cpp +++ b/src/util/integer_cln_imp.cpp @@ -145,4 +145,14 @@ bool Integer::fitsUnsignedLong() const { return sgn() >= 0 && d_value <= s_unsignedLongMax; } +Integer Integer::pow(unsigned long int exp) const { + if (exp == 0) { + return Integer(1); + } else { + Assert(exp > 0); + cln::cl_I result = cln::expt_pos(d_value, exp); + return Integer(result); + } +} + } /* namespace CVC4 */ |