Z3Algebraic
public class Z3Algebraic : AnyZ3Ast
An algebraic number that can be used in the Z3 real algebraic number package.
-
Returns
trueifselfis positive,falseotherwise.Declaration
Swift
public var isPositive: Bool { get } -
Returns
trueifselfis negative,falseotherwise.Declaration
Swift
public var isNegative: Bool { get } -
Returns
trueifselfis zero,falseotherwise.Declaration
Swift
public var isZero: Bool { get } -
Returns
1ifselfis positive,0ifselfis zero, and-1if it is negative.Declaration
Swift
public var sign: Int { get } -
Return the
self^(1/k)Declaration
Swift
public func root(_ k: UInt32) -> Z3Algebraic -
Return the
self^kDeclaration
Swift
public func power(_ k: UInt32) -> Z3Algebraic -
Given a multivariate polynomial
self(x_0, ..., x_{n-1}, x_n), returns the roots of the univariate polynomialself(a[0], ..., a[n-1], x_n).Precondition
selfis a Z3 expression that contains only arithmetic terms and free variables.Declaration
Swift
public func roots(_ a: [Z3Algebraic]) -> Z3AstVector -
Given a multivariate polynomial
self(x_0, ..., x_{n-1}), return the sign ofself(a[0], ..., a[n-1]).Precondition
selfis a Z3 expression that contains only arithmetic terms and free variables.Declaration
Swift
public func eval(_ a: [Z3Algebraic]) -> Int -
Return the coefficients of this polynomial.
Declaration
Swift
public func coefficients() -> Z3AstVector -
Return which root of a polynomial the algebraic number represents.
Declaration
Swift
public func polynomialRootIndex() -> UInt32 -
Return the value a + b.
Declaration
Swift
static func + (lhs: Z3Algebraic, rhs: Z3Algebraic) -> Z3Algebraic -
Return the value a - b.
Declaration
Swift
static func - (lhs: Z3Algebraic, rhs: Z3Algebraic) -> Z3Algebraic -
Return the value a * b.
Declaration
Swift
static func * (lhs: Z3Algebraic, rhs: Z3Algebraic) -> Z3Algebraic -
Return the value a / b.
Declaration
Swift
static func / (lhs: Z3Algebraic, rhs: Z3Algebraic) -> Z3Algebraic -
Return
trueiflhs < rhs,falseotherwise.Declaration
Swift
static func < (lhs: Z3Algebraic, rhs: Z3Algebraic) -> Bool -
Return
trueiflhs <= rhs,falseotherwise.Declaration
Swift
static func <= (lhs: Z3Algebraic, rhs: Z3Algebraic) -> Bool -
Return
trueiflhs > rhs,falseotherwise.Declaration
Swift
static func > (lhs: Z3Algebraic, rhs: Z3Algebraic) -> Bool -
Return
trueiflhs >= rhs,falseotherwise.Declaration
Swift
static func >= (lhs: Z3Algebraic, rhs: Z3Algebraic) -> Bool -
Return
trueiflhs == rhs,falseotherwise.Declaration
Swift
static func == (lhs: Z3Algebraic, rhs: Z3Algebraic) -> Bool -
Return
trueiflhs != rhs,falseotherwise.Declaration
Swift
static func != (lhs: Z3Algebraic, rhs: Z3Algebraic) -> Bool
Z3Algebraic Class Reference