3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-15 13:28:47 +00:00

Fix misc issues in Python API docstrings

This commit is contained in:
Andres Notzli 2015-12-06 19:00:17 -08:00
parent 89fe24342d
commit ced9ba17e9

View file

@ -8201,7 +8201,7 @@ class FPNumRef(FPRef):
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 the numeral
The sign of the numeral.
>>> x = FPNumRef(+1.0, FPSort(8, 24))
>>> x.sign()
@ -8217,28 +8217,30 @@ class FPNumRef(FPRef):
return l.value != 0
"""
The significand of the numeral
The significand of the numeral.
>>> x = FPNumRef(2.5, FPSort(8, 24))
>>> x.significand()
1.25
"""
def significand(self):
return Z3_fpa_get_numeral_significand_string(self.ctx.ref(), self.as_ast())
"""
The exponent of the numeral
The exponent of the numeral.
>>> x = FPNumRef(2.5, FPSort(8, 24))
>>>
>>> x.exponent()
1
"""
def exponent(self):
return Z3_fpa_get_numeral_exponent_string(self.ctx.ref(), self.as_ast())
"""
The exponent of the numeral as a long
The exponent of the numeral as a long.
>>> x = FPNumRef(2.5, FPSort(8, 24))
>>> x.exponent_as_long()
1
"""
def exponent_as_long(self):
@ -8248,9 +8250,10 @@ class FPNumRef(FPRef):
return ptr[0]
"""
The string representation of the numeral
The string representation of the numeral.
>>> x = FPNumRef(20, FPSort(8, 24))
>>> x.as_string()
1.25*(2**4)
"""
def as_string(self):
@ -8640,42 +8643,42 @@ def fpIsNaN(a):
return FPRef(Z3_mk_fpa_is_nan(a.ctx_ref(), a.as_ast()), a.ctx)
def fpIsInfinite(a):
"""Create a Z3 floating-point isNaN expression.
"""Create a Z3 floating-point isInfinite expression.
"""
if __debug__:
_z3_assert(is_fp(a), "Argument must be Z3 floating-point expressions")
return FPRef(Z3_mk_fpa_is_infinite(a.ctx_ref(), a.as_ast()), a.ctx)
def fpIsZero(a):
"""Create a Z3 floating-point isNaN expression.
"""Create a Z3 floating-point isZero expression.
"""
if __debug__:
_z3_assert(is_fp(a), "Argument must be Z3 floating-point expressions")
return FPRef(Z3_mk_fpa_is_zero(a.ctx_ref(), a.as_ast()), a.ctx)
def fpIsNormal(a):
"""Create a Z3 floating-point isNaN expression.
"""Create a Z3 floating-point isNormal expression.
"""
if __debug__:
_z3_assert(is_fp(a), "Argument must be Z3 floating-point expressions")
return FPRef(Z3_mk_fpa_is_normal(a.ctx_ref(), a.as_ast()), a.ctx)
def fpIsSubnormal(a):
"""Create a Z3 floating-point isNaN expression.
"""Create a Z3 floating-point isSubnormal expression.
"""
if __debug__:
_z3_assert(is_fp(a), "Argument must be Z3 floating-point expressions")
return FPRef(Z3_mk_fpa_is_subnormal(a.ctx_ref(), a.as_ast()), a.ctx)
def fpIsNegative(a):
"""Create a Z3 floating-point isNaN expression.
"""Create a Z3 floating-point isNegative expression.
"""
if __debug__:
_z3_assert(is_fp(a), "Argument must be Z3 floating-point expressions")
return FPRef(Z3_mk_fpa_is_negative(a.ctx_ref(), a.as_ast()), a.ctx)
def fpIsPositive(a):
"""Create a Z3 floating-point isNaN expression.
"""Create a Z3 floating-point isPositive expression.
"""
if __debug__:
_z3_assert(is_fp(a), "Argument must be Z3 floating-point expressions")