Z3
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Public Member Functions
FPNumRef Class Reference

FP Numerals. More...

+ Inheritance diagram for FPNumRef:

Public Member Functions

def isNaN
 
def isInf
 
def isZero
 
def isNegative
 
def sign
 
def significand
 
def exponent
 
def exponent_as_long
 
def as_string
 
- Public Member Functions inherited from FPRef
def sort
 
def ebits
 
def sbits
 
def as_string
 
def __le__
 
def __lt__
 
def __ge__
 
def __gt__
 
def __ne__
 
def __add__
 
def __radd__
 
def __sub__
 
def __rsub__
 
def __mul__
 
def __rmul__
 
def __pos__
 
def __neg__
 
def __truediv__
 
def __rtruediv__
 
def __mod__
 
def __rmod__
 
- Public Member Functions inherited from ExprRef
def as_ast
 
def get_id
 
def sort
 
def sort_kind
 
def __eq__
 
def __ne__
 
def decl
 
def num_args
 
def arg
 
def children
 
- Public Member Functions inherited from AstRef
def __init__
 
def __del__
 
def __str__
 
def __repr__
 
def sexpr
 
def as_ast
 
def get_id
 
def ctx_ref
 
def eq
 
def translate
 
def hash
 
- Public Member Functions inherited from Z3PPObject
def use_pp
 

Additional Inherited Members

- Data Fields inherited from AstRef
 ast
 
 ctx
 

Detailed Description

FP Numerals.

Definition at line 8014 of file z3py.py.

Member Function Documentation

def as_string (   self)

Definition at line 8081 of file z3py.py.

8082  def as_string(self):
8083  s = Z3_fpa_get_numeral_string(self.ctx.ref(), self.as_ast())
8084  return ("FPVal(%s, %s)" % (s, FPSortRef(self.sort()).as_string()))
8085 
def sort
Definition: z3py.py:752
def as_ast
Definition: z3py.py:296
FP Sorts.
Definition: z3py.py:7698
def as_string
Definition: z3py.py:8081
def exponent (   self)

Definition at line 8060 of file z3py.py.

8061  def exponent(self):
8062  return Z3_fpa_get_numeral_exponent_string(self.ctx.ref(), self.as_ast())
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.
def exponent
Definition: z3py.py:8060
def as_ast
Definition: z3py.py:296
def exponent_as_long (   self)

Definition at line 8069 of file z3py.py.

8070  def exponent_as_long(self):
8071  ptr = (ctypes.c_longlong * 1)()
8072  if not Z3_fpa_get_numeral_exponent_int64(self.ctx.ref(), self.as_ast(), ptr):
8073  raise Z3Exception("error retrieving the exponent of a numeral.")
8074  return ptr[0]
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. ...
def as_ast
Definition: z3py.py:296
def exponent_as_long
Definition: z3py.py:8069
def isInf (   self)

Definition at line 8018 of file z3py.py.

8019  def isInf(self):
8020  return self.decl().kind() == Z3_OP_FPA_PLUS_INF or self.decl().kind() == Z3_OP_FPA_MINUS_INF
def isInf
Definition: z3py.py:8018
def decl
Definition: z3py.py:810
def isNaN (   self)

Definition at line 8015 of file z3py.py.

8016  def isNaN(self):
8017  return self.decl().kind() == Z3_OP_FPA_NAN
def decl
Definition: z3py.py:810
def isNaN
Definition: z3py.py:8015
def isNegative (   self)

Definition at line 8024 of file z3py.py.

8025  def isNegative(self):
8026  k = self.decl().kind()
8027  return (self.num_args() == 0 and (k == Z3_OP_FPA_MINUS_INF or k == Z3_OP_FPA_MINUS_ZERO)) or (self.sign() == True)
def sign
Definition: z3py.py:8038
def isNegative
Definition: z3py.py:8024
def num_args
Definition: z3py.py:825
def decl
Definition: z3py.py:810
def isZero (   self)

Definition at line 8021 of file z3py.py.

8022  def isZero(self):
8023  return self.decl().kind() == Z3_OP_FPA_PLUS_ZERO or self.decl().kind() == Z3_OP_FPA_MINUS_ZERO
def isZero
Definition: z3py.py:8021
def decl
Definition: z3py.py:810
def sign (   self)

Definition at line 8038 of file z3py.py.

Referenced by FPNumRef.isNegative().

8039  def sign(self):
8040  l = (ctypes.c_int)()
8041  if Z3_fpa_get_numeral_sign(self.ctx.ref(), self.as_ast(), byref(l)) == False:
8042  raise Z3Exception("error retrieving the sign of a numeral.")
8043  return l.value != 0
def sign
Definition: z3py.py:8038
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.
def as_ast
Definition: z3py.py:296
def significand (   self)

Definition at line 8050 of file z3py.py.

8051  def significand(self):
8052  return Z3_fpa_get_numeral_significand_string(self.ctx.ref(), self.as_ast())
def significand
Definition: z3py.py:8050
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.
def as_ast
Definition: z3py.py:296