Frama-C API - Numerors_interval
Opaque type of an interval. The type as an invariant : both bounds of the interval use the same precision
val pretty : Stdlib.Format.formatter -> t -> unitval prec : t -> Numerors_utils.Precisions.tReturns the precisions of the bounds of its input
val get_max_exponent : t -> intReturns the biggest exponent of its input
val get_exponents : t -> int * intReturns the exponent of the bounds ot its input
val get_bounds : t -> Numerors_float.t * Numerors_float.tReturns the bounds of its inputs
val top : prec:Numerors_utils.Precisions.t -> tReturns the interval -oo ; +oo with NaNs at the precision <prec>
val pos_inf : prec:Numerors_utils.Precisions.t -> tReturns the interval +oo ; +oo at the precision <prec>
val neg_inf : prec:Numerors_utils.Precisions.t -> tReturns the interval -oo ; -oo at the precision <prec>
val nan : prec:Numerors_utils.Precisions.t -> tReturns an interval containing only NaN values at the precision <prec>
val zero : prec:Numerors_utils.Precisions.t -> tReturns the interval -0 ; +0 at the precision <prec>
val pos_zero : prec:Numerors_utils.Precisions.t -> tReturns the interval +0 ; +0 at the precision <prec>
val make_finite : prec:Numerors_utils.Precisions.t -> t -> t Eva.Eval.or_bottomReplace the infinite bounds of its input into the maximum float of the precision. Does not change the interval if it is finite
Enlarge the bounds of the interval by taking the previous float of the lower bound and the following float of the upper bound
val of_ints : prec:Numerors_utils.Precisions.t -> (int * int) -> tThe function of_<typ> ~prec (x, y) returns the interval x' ; y' where x' is a Numerors float containing the value of x (of type <typ>) rounded toward -oo and y' is a Numerors float containing the value of y rounded toward +oo. Both use the precision <prec>
val of_floats : prec:Numerors_utils.Precisions.t -> (float * float) -> tval of_strings : prec:Numerors_utils.Precisions.t -> (string * string) -> tval of_numerors_floats : (Numerors_float.t * Numerors_float.t) -> tReturns the interval corresponding to the given bounds. Fails with an exception if the inputs do not have the same precision
val of_floats_without_rounding : prec:Numerors_utils.Precisions.t -> (float * float) -> tWorks in the same way as of_floats but the bounds are rounded toward nearest
val change_prec : Numerors_utils.Precisions.t -> t -> tChange the precision of the bounds
val epsilon : Numerors_utils.Precisions.t -> tReturns the interval -epsilon ; +epsilon for the input precision
Lattice functions. Those functions work only if their inputs use the same precision. One can see this as if there is a lattice for each precision.
val narrow : t -> t -> t Eva.Eval.or_bottomval is_nan : t -> boolCheck if the interval contains only NaN values
val is_finite : t -> boolCheck if the bounds of its input are finite
val is_zero : t -> boolCheck if the bounds of its input are both zero (without considering their signs)
val is_pos_zero : t -> boolCheck if the bounds of its input are positive zeros
val is_neg_zero : t -> boolCheck if the bounds of its input are negative zeros
val is_pos_inf : t -> boolCheck if the bounds of its input are positive infinites
val is_neg_inf : t -> boolCheck if the bounds of its input are negative infinites
val contains_nan : t -> boolCheck if its input contains at least a NaN value
val contains_a_zero : t -> boolCheck if there is a zero between the bounds of its input (without considering the signs
val contains_pos_zero : t -> boolCheck if there is a positive zero between the bounds of its input
val contains_neg_zero : t -> boolCheck if there is a negative zero between the bounds of its input
val contains_infinity : t -> boolCheck if its input contains at least an infinite bound
val contains_strictly_pos : t -> boolCheck if there is at least a strictly positive value in its input
val contains_strictly_neg : t -> boolCheck if there is at least a strictly negative value in its input
val is_strictly_pos : t -> boolCheck if all the values of its input are positives
val is_strictly_neg : t -> boolCheck if all the values of its input are negatives
val add : ?prec:Numerors_utils.Precisions.t -> t -> t -> tThese functions perform arithmetic operations on intervals using the precision <prec>. If exact=true then the bounds are computed using rounding to nearest mode else they are computed using rounding toward +oo for the upper bound and toward -oo for the lower one
val sub : ?prec:Numerors_utils.Precisions.t -> t -> t -> tval mul : ?prec:Numerors_utils.Precisions.t -> t -> t -> tval div : ?prec:Numerors_utils.Precisions.t -> t -> t -> tThese functions perform mathematic unidimensionnal operations of intervals using the precision <prec>
val sqrt : ?prec:Numerors_utils.Precisions.t -> t -> tval square : ?prec:Numerors_utils.Precisions.t -> t -> tval log : ?prec:Numerors_utils.Precisions.t -> t -> tval exp : ?prec:Numerors_utils.Precisions.t -> t -> tval backward_le : ?prec:Numerors_utils.Precisions.t -> t -> t -> t Frama_c_kernel.Lattice_bounds.or_bottomThese functions perform backward propagation on intervals using the precision <prec>
val backward_lt : ?prec:Numerors_utils.Precisions.t -> t -> t -> t Frama_c_kernel.Lattice_bounds.or_bottomval backward_ge : ?prec:Numerors_utils.Precisions.t -> t -> t -> t Frama_c_kernel.Lattice_bounds.or_bottomval backward_gt : ?prec:Numerors_utils.Precisions.t -> t -> t -> t Frama_c_kernel.Lattice_bounds.or_bottomval backward_add : ?prec:Numerors_utils.Precisions.t -> left:t -> right:t -> result:t -> unit -> (t * t) Frama_c_kernel.Lattice_bounds.or_bottomThese functions perform backward propagation for arithmetic
val backward_sub : ?prec:Numerors_utils.Precisions.t -> left:t -> right:t -> result:t -> unit -> (t * t) Frama_c_kernel.Lattice_bounds.or_bottomval backward_mul : ?prec:Numerors_utils.Precisions.t -> left:t -> right:t -> result:t -> unit -> (t * t) Frama_c_kernel.Lattice_bounds.or_bottomval backward_div : ?prec:Numerors_utils.Precisions.t -> left:t -> right:t -> result:t -> unit -> (t * t) Frama_c_kernel.Lattice_bounds.or_bottom