mirror of
https://github.com/Z3Prover/z3
synced 2025-04-27 10:55:50 +00:00
Added accessors to extract sign/exponent/significand BV numerals from FP numerals.
This commit is contained in:
parent
5716eaafed
commit
6b474adc8a
7 changed files with 246 additions and 5 deletions
|
@ -8446,6 +8446,30 @@ class FPNumRef(FPRef):
|
|||
k = self.decl().kind()
|
||||
return (self.num_args() == 0 and (k == Z3_OP_FPA_MINUS_INF or k == Z3_OP_FPA_MINUS_ZERO)) or (self.sign() == True)
|
||||
|
||||
"""
|
||||
The sign of a floating-point numeral as a bit-vector expression
|
||||
|
||||
Remark: NaN's do not have a bit-vector sign, so they are invalid arguments.
|
||||
"""
|
||||
def BVSign(self):
|
||||
return BitVecNumRef(Z3_fpa_get_numeral_sign_bv(self.ctx.ref(), self.as_ast()), ctx)
|
||||
|
||||
"""
|
||||
The exponent of a floating-point numeral as a bit-vector expression
|
||||
|
||||
Remark: +oo, -oo and NaN's do not have a bit-vector exponent, so they are invalid arguments.
|
||||
"""
|
||||
def BVExponent(self):
|
||||
return BitVecNumRef(Z3_fpa_get_numeral_exponent_bv(self.ctx.ref(), self.as_ast()), ctx)
|
||||
|
||||
"""
|
||||
The sign of a floating-point numeral as a bit-vector expression
|
||||
|
||||
Remark: +oo, -oo and NaN's do not have a bit-vector significand, so they are invalid arguments.
|
||||
"""
|
||||
def BVSignificand(self):
|
||||
return BitVecNumRef(Z3_fpa_get_numeral_significand_bv(self.ctx.ref(), self.as_ast()), ctx)
|
||||
|
||||
"""
|
||||
The sign of the numeral.
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue