Z3
Public Member Functions
FPNumRef Class Reference

FP Numerals. More...

+ Inheritance diagram for FPNumRef:

Public Member Functions

def isNaN (self)
 
def isInf (self)
 
def isZero (self)
 
def isNegative (self)
 
def sign (self)
 
def significand (self)
 
def exponent (self)
 
def exponent_as_long (self)
 
def as_string (self)
 
- Public Member Functions inherited from FPRef
def sort (self)
 
def ebits (self)
 
def sbits (self)
 
def as_string (self)
 
def __le__ (self, other)
 
def __lt__ (self, other)
 
def __ge__ (self, other)
 
def __gt__ (self, other)
 
def __add__ (self, other)
 
def __radd__ (self, other)
 
def __sub__ (self, other)
 
def __rsub__ (self, other)
 
def __mul__ (self, other)
 
def __rmul__ (self, other)
 
def __pos__ (self)
 
def __neg__ (self)
 
def __div__ (self, other)
 
def __rdiv__ (self, other)
 
def __truediv__ (self, other)
 
def __rtruediv__ (self, other)
 
def __mod__ (self, other)
 
def __rmod__ (self, other)
 
- Public Member Functions inherited from ExprRef
def as_ast (self)
 
def get_id (self)
 
def sort (self)
 
def sort_kind (self)
 
def __eq__ (self, other)
 
def __hash__ (self)
 
def __ne__ (self, other)
 
def decl (self)
 
def num_args (self)
 
def arg (self, idx)
 
def children (self)
 
- Public Member Functions inherited from AstRef
def __init__ (self, ast, ctx=None)
 
def __del__ (self)
 
def __str__ (self)
 
def __repr__ (self)
 
def __eq__ (self, other)
 
def __hash__ (self)
 
def __nonzero__ (self)
 
def __bool__ (self)
 
def sexpr (self)
 
def as_ast (self)
 
def get_id (self)
 
def ctx_ref (self)
 
def eq (self, other)
 
def translate (self, target)
 
def hash (self)
 
- Public Member Functions inherited from Z3PPObject
def use_pp (self)
 

Additional Inherited Members

- Data Fields inherited from AstRef
 ast
 
 ctx
 

Detailed Description

FP Numerals.

Definition at line 8455 of file z3py.py.

Member Function Documentation

§ as_string()

def as_string (   self)

Definition at line 8525 of file z3py.py.

8525  def as_string(self):
8526  s = Z3_fpa_get_numeral_string(self.ctx.ref(), self.as_ast())
8527  return ("FPVal(%s, %s)" % (s, self.sort()))
8528 

§ exponent()

def exponent (   self)

Definition at line 8502 of file z3py.py.

8502  def exponent(self):
8503  return Z3_fpa_get_numeral_exponent_string(self.ctx.ref(), self.as_ast())
8504 
Z3_string Z3_API Z3_fpa_get_numeral_exponent_string(Z3_context c, Z3_ast t)
Return the exponent value of a floating-point numeral as a string.

§ exponent_as_long()

def exponent_as_long (   self)

Definition at line 8512 of file z3py.py.

8512  def exponent_as_long(self):
8513  ptr = (ctypes.c_longlong * 1)()
8514  if not Z3_fpa_get_numeral_exponent_int64(self.ctx.ref(), self.as_ast(), ptr):
8515  raise Z3Exception("error retrieving the exponent of a numeral.")
8516  return ptr[0]
8517 
Z3_bool Z3_API Z3_fpa_get_numeral_exponent_int64(Z3_context c, Z3_ast t, __int64 *n)
Return the exponent value of a floating-point numeral as a signed 64-bit integer. ...

§ isInf()

def isInf (   self)

Definition at line 8459 of file z3py.py.

8459  def isInf(self):
8460  return self.decl().kind() == Z3_OP_FPA_PLUS_INF or self.decl().kind() == Z3_OP_FPA_MINUS_INF
8461 

§ isNaN()

def isNaN (   self)

Definition at line 8456 of file z3py.py.

8456  def isNaN(self):
8457  return self.decl().kind() == Z3_OP_FPA_NAN
8458 

§ isNegative()

def isNegative (   self)

Definition at line 8465 of file z3py.py.

8465  def isNegative(self):
8466  k = self.decl().kind()
8467  return (self.num_args() == 0 and (k == Z3_OP_FPA_MINUS_INF or k == Z3_OP_FPA_MINUS_ZERO)) or (self.sign() == True)
8468 

§ isZero()

def isZero (   self)

Definition at line 8462 of file z3py.py.

8462  def isZero(self):
8463  return self.decl().kind() == Z3_OP_FPA_PLUS_ZERO or self.decl().kind() == Z3_OP_FPA_MINUS_ZERO
8464 

§ sign()

def sign (   self)

Definition at line 8479 of file z3py.py.

8479  def sign(self):
8480  l = (ctypes.c_int)()
8481  if Z3_fpa_get_numeral_sign(self.ctx.ref(), self.as_ast(), byref(l)) == False:
8482  raise Z3Exception("error retrieving the sign of a numeral.")
8483  return l.value != 0
8484 
Z3_bool Z3_API Z3_fpa_get_numeral_sign(Z3_context c, Z3_ast t, int *sgn)
Retrieves the sign of a floating-point literal.

§ significand()

def significand (   self)

Definition at line 8492 of file z3py.py.

8492  def significand(self):
8493  return Z3_fpa_get_numeral_significand_string(self.ctx.ref(), self.as_ast())
8494 
Z3_string Z3_API Z3_fpa_get_numeral_significand_string(Z3_context c, Z3_ast t)
Return the significand value of a floating-point numeral as a string.