3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-28 11:25:51 +00:00

Add power operator to C and Python RCF APIs

Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
This commit is contained in:
Leonardo de Moura 2013-01-10 13:05:47 -08:00
parent 191e503418
commit 4cd2998743
3 changed files with 24 additions and 0 deletions

View file

@ -203,6 +203,17 @@ extern "C" {
Z3_CATCH_RETURN(0);
}
Z3_rcf_num Z3_API Z3_rcf_power(Z3_context c, Z3_rcf_num a, unsigned k) {
Z3_TRY;
LOG_Z3_rcf_power(c, a, k);
RESET_ERROR_CODE();
reset_rcf_cancel(c);
rcnumeral r;
rcfm(c).power(to_rcnumeral(a), k, r);
RETURN_Z3(from_rcnumeral(r));
Z3_CATCH_RETURN(0);
}
Z3_bool Z3_API Z3_rcf_lt(Z3_context c, Z3_rcf_num a, Z3_rcf_num b) {
Z3_TRY;
LOG_Z3_rcf_lt(c, a, b);