3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2026-02-23 08:47:37 +00:00

optimize has_sign_bit and mod2k to not compute powers of two

this is very useful for bitvectors of large bitwidths
This commit is contained in:
Nuno Lopes 2026-01-31 10:36:43 +00:00 committed by Nikolaj Bjorner
parent 9771839005
commit 6c3f9a3540
6 changed files with 97 additions and 34 deletions

View file

@ -461,8 +461,7 @@ public:
MATCH_UNARY(is_int2bv);
bool is_bit2bool(expr* e, expr*& bv, unsigned& idx) const;
rational norm(rational const & val, unsigned bv_size, bool is_signed) const ;
rational norm(rational const & val, unsigned bv_size) const { return norm(val, bv_size, false); }
rational norm(rational const & val, unsigned bv_size, bool is_signed = false) const ;
bool has_sign_bit(rational const & n, unsigned bv_size) const;
};