Z3
Public Member Functions | Data Fields
FPSortRef Class Reference
+ Inheritance diagram for FPSortRef:

Public Member Functions

def ebits (self)
 
def sbits (self)
 
def cast (self, val)
 
- Public Member Functions inherited from SortRef
def as_ast (self)
 
def get_id (self)
 
def kind (self)
 
def subsort (self, other)
 
def cast (self, val)
 
def name (self)
 
def __eq__ (self, other)
 
def __ne__ (self, other)
 
def __hash__ (self)
 
- Public Member Functions inherited from AstRef
def __init__
 
def __del__ (self)
 
def __deepcopy__
 
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 __copy__ (self)
 
def hash (self)
 
def py_value (self)
 
- Public Member Functions inherited from Z3PPObject
def use_pp (self)
 

Data Fields

 ctx
 
- Data Fields inherited from AstRef
 ast
 
 ctx
 

Detailed Description

Floating-point sort.

Definition at line 9599 of file z3py.py.

Member Function Documentation

def cast (   self,
  val 
)
Try to cast `val` as a floating-point expression.
>>> b = FPSort(8, 24)
>>> b.cast(1.0)
1
>>> b.cast(1.0).sexpr()
'(fp #b0 #x7f #b00000000000000000000000)'

Definition at line 9618 of file z3py.py.

9618  def cast(self, val):
9619  """Try to cast `val` as a floating-point expression.
9620  >>> b = FPSort(8, 24)
9621  >>> b.cast(1.0)
9622  1
9623  >>> b.cast(1.0).sexpr()
9624  '(fp #b0 #x7f #b00000000000000000000000)'
9625  """
9626  if is_expr(val):
9627  if z3_debug():
9628  _z3_assert(self.ctx == val.ctx, "Context mismatch")
9629  return val
9630  else:
9631  return FPVal(val, None, self, self.ctx)
9632 
9633 
def cast(self, val)
Definition: z3py.py:9618
def FPVal
Definition: z3py.py:10266
def z3_debug()
Definition: z3py.py:70
def is_expr(a)
Definition: z3py.py:1285
def ebits (   self)
Retrieves the number of bits reserved for the exponent in the FloatingPoint sort `self`.
>>> b = FPSort(8, 24)
>>> b.ebits()
8

Definition at line 9602 of file z3py.py.

9602  def ebits(self):
9603  """Retrieves the number of bits reserved for the exponent in the FloatingPoint sort `self`.
9604  >>> b = FPSort(8, 24)
9605  >>> b.ebits()
9606  8
9607  """
9608  return int(Z3_fpa_get_ebits(self.ctx_ref(), self.ast))
9609 
unsigned Z3_API Z3_fpa_get_ebits(Z3_context c, Z3_sort s)
Retrieves the number of bits reserved for the exponent in a FloatingPoint sort.
def ctx_ref(self)
Definition: z3py.py:410
def ebits(self)
Definition: z3py.py:9602
def sbits (   self)
Retrieves the number of bits reserved for the significand in the FloatingPoint sort `self`.
>>> b = FPSort(8, 24)
>>> b.sbits()
24

Definition at line 9610 of file z3py.py.

9610  def sbits(self):
9611  """Retrieves the number of bits reserved for the significand in the FloatingPoint sort `self`.
9612  >>> b = FPSort(8, 24)
9613  >>> b.sbits()
9614  24
9615  """
9616  return int(Z3_fpa_get_sbits(self.ctx_ref(), self.ast))
9617 
unsigned Z3_API Z3_fpa_get_sbits(Z3_context c, Z3_sort s)
Retrieves the number of bits reserved for the significand in a FloatingPoint sort.
def sbits(self)
Definition: z3py.py:9610
def ctx_ref(self)
Definition: z3py.py:410

Field Documentation

ctx

Definition at line 9628 of file z3py.py.