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 __ne__ (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 __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 __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__
 
def __del__ (self)
 
def __str__ (self)
 
def __repr__ (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 7815 of file z3py.py.

Member Function Documentation

def as_string (   self)

Definition at line 7882 of file z3py.py.

7882  def as_string(self):
7883  s = Z3_fpa_get_numeral_string(self.ctx.ref(), self.as_ast())
7884  return ("FPVal(%s, %s)" % (s, FPSortRef(self.sort()).as_string()))
7885 
7886 
def as_ast(self)
Definition: z3py.py:296
def sort(self)
Definition: z3py.py:752
FP Sorts.
Definition: z3py.py:7499
def as_string(self)
Definition: z3py.py:7882
def exponent (   self)

Definition at line 7861 of file z3py.py.

7861  def exponent(self):
7862  return Z3_fpa_get_numeral_exponent_string(self.ctx.ref(), self.as_ast())
7863 
def as_ast(self)
Definition: z3py.py:296
def exponent(self)
Definition: z3py.py:7861
Z3_string Z3_API Z3_fpa_get_numeral_exponent_string(__in Z3_context c, __in Z3_ast t)
Return the exponent value of a floating-point numeral as a string.
def exponent_as_long (   self)

Definition at line 7870 of file z3py.py.

7870  def exponent_as_long(self):
7871  ptr = (ctypes.c_longlong * 1)()
7872  if not Z3_fpa_get_numeral_exponent_int64(self.ctx.ref(), self.as_ast(), ptr):
7873  raise Z3Exception("error retrieving the exponent of a numeral.")
7874  return ptr[0]
7875 
Z3_bool Z3_API Z3_fpa_get_numeral_exponent_int64(__in Z3_context c, __in Z3_ast t, __out __int64 *n)
Return the exponent value of a floating-point numeral as a signed 64-bit integer. ...
def as_ast(self)
Definition: z3py.py:296
def exponent_as_long(self)
Definition: z3py.py:7870
def isInf (   self)

Definition at line 7819 of file z3py.py.

7819  def isInf(self):
7820  return self.decl().kind() == Z3_OP_FPA_PLUS_INF or self.decl().kind() == Z3_OP_FPA_MINUS_INF
7821 
def isInf(self)
Definition: z3py.py:7819
def decl(self)
Definition: z3py.py:810
def isNaN (   self)

Definition at line 7816 of file z3py.py.

7816  def isNaN(self):
7817  return self.decl().kind() == Z3_OP_FPA_NAN
7818 
def isNaN(self)
Definition: z3py.py:7816
def decl(self)
Definition: z3py.py:810
def isNegative (   self)

Definition at line 7825 of file z3py.py.

7825  def isNegative(self):
7826  k = self.decl().kind()
7827  return (self.num_args() == 0 and (k == Z3_OP_FPA_MINUS_INF or k == Z3_OP_FPA_MINUS_ZERO)) or (self.sign() == True)
7828 
def isNegative(self)
Definition: z3py.py:7825
def decl(self)
Definition: z3py.py:810
def num_args(self)
Definition: z3py.py:825
def sign(self)
Definition: z3py.py:7839
def isZero (   self)

Definition at line 7822 of file z3py.py.

7822  def isZero(self):
7823  return self.decl().kind() == Z3_OP_FPA_PLUS_ZERO or self.decl().kind() == Z3_OP_FPA_MINUS_ZERO
7824 
def decl(self)
Definition: z3py.py:810
def isZero(self)
Definition: z3py.py:7822
def sign (   self)

Definition at line 7839 of file z3py.py.

Referenced by FPNumRef.isNegative().

7839  def sign(self):
7840  l = (ctypes.c_int)()
7841  if Z3_fpa_get_numeral_sign(self.ctx.ref(), self.as_ast(), byref(l)) == False:
7842  raise Z3Exception("error retrieving the sign of a numeral.")
7843  return l.value != 0
7844 
def as_ast(self)
Definition: z3py.py:296
Z3_bool Z3_API Z3_fpa_get_numeral_sign(__in Z3_context c, __in Z3_ast t, __out int *sgn)
Retrieves the sign of a floating-point literal.
def sign(self)
Definition: z3py.py:7839
def significand (   self)

Definition at line 7851 of file z3py.py.

7851  def significand(self):
7852  return Z3_fpa_get_numeral_significand_string(self.ctx.ref(), self.as_ast())
7853 
def as_ast(self)
Definition: z3py.py:296
Z3_string Z3_API Z3_fpa_get_numeral_significand_string(__in Z3_context c, __in Z3_ast t)
Return the significand value of a floating-point numeral as a string.
def significand(self)
Definition: z3py.py:7851