package bitwuzla
Library
Module
Module type
Parameter
Class
Class type
Floating-point
pos_zero sort
create a floating-point positive zero value (SMT-LIB: +zero
).
neg_zero sort
create a floating-point negative zero value (SMT-LIB: -zero
).
pos_inf sort
create a floating-point positive infinity value (SMT-LIB: +oo
).
neg_inf sort
create a floating-point negative infinity value (SMT-LIB: -oo
).
of_float sort rm value
create a floating-point value from its float representation, with respect to given rounding mode.
of_real sort rm real
create a floating-point value from its real representation, given as a decimal string, with respect to given rounding mode.
from_rational sort rm num den
create a floating-point value from its rational representation, given as a two decimal strings representing the numerator and denominator, with respect to given rounding mode.
Floating-point IEEE 754 representation.
type ('a, 'b, 'c) operator =
| Abs : (t -> t, t, fp) operator
(*Floating-point absolute value.
SMT-LIB:
*)fp.abs
| Add : (rm term -> t -> t -> t, rm term * t * t, fp) operator
(*Floating-point addition.
SMT-LIB:
*)fp.add
| Div : (rm term -> t -> t -> t, rm term * t * t, fp) operator
(*Floating-point division.
SMT-LIB:
*)fp.div
| Eq : (t -> t -> bv term, t * t, bv) operator
(*Floating-point equality.
SMT-LIB:
*)fp.eq
| Fma : (rm term -> t -> t -> t -> t, rm term * t * t * t, fp) operator
(*Floating-point fused multiplcation and addition.
SMT-LIB:
*)fp.fma
| Fp : (sign:bv term -> exponent:bv term -> bv term -> t, ieee_754, fp) operator
(*Floating-point IEEE 754 value.
SMT-LIB:
*)fp
| Geq : (t -> t -> bv term, t * t, bv) operator
(*Floating-point greater than or equal.
SMT-LIB:
*)fp.geq
| Gt : (t -> t -> bv term, t * t, bv) operator
(*Floating-point greater than.
SMT-LIB:
*)fp.gt
| Is_inf : (t -> bv term, t, bv) operator
(*Floating-point is infinity tester.
SMT-LIB:
*)fp.isInfinite
| Is_nan : (t -> bv term, t, bv) operator
(*Floating-point is Nan tester.
SMT-LIB:
*)fp.isNaN
| Is_neg : (t -> bv term, t, bv) operator
(*Floating-point is negative tester.
SMT-LIB:
*)fp.isNegative
| Is_normal : (t -> bv term, t, bv) operator
(*Floating-point is normal tester.
SMT-LIB:
*)fp.isNormal
| Is_pos : (t -> bv term, t, bv) operator
(*Floating-point is positive tester.
SMT-LIB:
*)fp.isPositive
| Is_subnormal : (t -> bv term, t, bv) operator
(*Floating-point is subnormal tester.
SMT-LIB:
*)fp.isSubnormal
| Is_zero : (t -> bv term, t, bv) operator
(*Floating-point is zero tester.
SMT-LIB:
*)fp.isZero
| Leq : (t -> t -> bv term, t * t, bv) operator
(*Floating-point less than or equal.
SMT-LIB:
*)fp.leq
| Lt : (t -> t -> bv term, t * t, bv) operator
(*Floating-point less than.
SMT-LIB:
*)fp.lt
| Max : (t -> t -> t, t * t, fp) operator
(*Floating-point max.
SMT-LIB:
*)fp.max
| Min : (t -> t -> t, t * t, fp) operator
(*Floating-point min.
SMT-LIB:
*)fp.min
| Mul : (rm term -> t -> t -> t, rm term * t * t, fp) operator
(*Floating-point multiplcation.
SMT-LIB:
*)fp.mul
| Neg : (t -> t, t, fp) operator
(*Floating-point negation.
SMT-LIB:
*)fp.neg
| Rem : (t -> t -> t, t * t, fp) operator
(*Floating-point remainder.
SMT-LIB:
*)fp.rem
| Rti : (rm term -> t -> t, rm term * t, fp) operator
(*Floating-point round to integral.
SMT-LIB:
*)fp.roundToIntegral
| Sqrt : (rm term -> t -> t, rm term * t, fp) operator
(*Floating-point round to square root.
SMT-LIB:
*)fp.sqrt
| Sub : (rm term -> t -> t -> t, rm term * t * t, fp) operator
(*Floating-point round to subtraction.
SMT-LIB:
*)fp.sqrt
| From_bv : (exponent:int -> int -> bv term -> t, int * int * bv term, fp) operator
(*Floating-point to_fp from IEEE 754 bit-vector.
SMT-LIB:
*)to_fp
(indexed)| From_fp : (exponent:int -> int -> rm term -> t -> t, int * int * rm term * t, fp) operator
(*Floating-point to_fp from floating-point.
SMT-LIB:
*)to_fp
(indexed)| From_sbv : (exponent:int -> int -> rm term -> bv term -> t, int * int * rm term * bv term, fp) operator
(*Floating-point to_fp from signed bit-vector value.
SMT-LIB:
*)to_fp
(indexed)| From_ubv : (exponent:int -> int -> rm term -> bv term -> t, int * int * rm term * bv term, fp) operator
(*Floating-point to_fp from unsigned bit-vector value.
SMT-LIB:
*)to_fp_unsigned
(indexed)| To_sbv : (int -> rm term -> t -> bv term, int * rm term * t, bv) operator
(*Floating-point to_sbv.
SMT-LIB:
*)fp.to_sbv
(indexed)| To_ubv : (int -> rm term -> t -> bv term, int * rm term * t, bv) operator
(*Floating-point to_ubv.
SMT-LIB:
*)fp.to_ubv
(indexed)
The term operator.
val term : ('a, 'b, 'c) operator -> 'a
term op ..
create a floating-point term constructor of given kind.
make ~sign ~exponent significand
create a floating-point value from its IEEE 754 standard representation given as three bitvectors representing the sign bit, the exponent and the significand.
of_sbv ~exponent size rm t
create a floatingt-point to_fp from signed bit-vector value.
of_ubv ~exponent size rm t
create a floatingt-point to_fp from unsigned bit-vector value.
of_bv ~exponent size rm t
create a floatingt-point to_fp from IEEE 754 bit-vector.
of_fp ~exponent size rm t
create a floatingt-point to_fp from floating-point.
fma rm t0 t1 t2
create a floating-point fused multiplication and addition.
val assignment : rm term Rm.operator -> fp value -> float
assignement t
get floatint-point representation of the current model value of given floating-point term.