statement
stringlengths
1
15.9k
proof
stringlengths
0
44.6k
type
stringclasses
18 values
symbolic_name
stringlengths
1
61
library
stringclasses
21 values
filename
stringclasses
502 values
imports
listlengths
0
38
deps
listlengths
0
64
docstring
stringlengths
0
500
source_url
stringclasses
1 value
commit
stringclasses
1 value
round_error (x : t) : real
= abs (value x - exact x)
function
round_error
stdlib
stdlib/floating_point.mlw
[ "DoubleFormat", "GenFloat", "GenFloatFull", "GenFloatSpecFull", "GenFloatSpecMultiRounding", "GenFloatSpecStrict", "Rounding", "SingleFormat", "SpecialValues", "int.Int", "real.Abs", "real.FromInt", "real.Real", "real.Square" ]
[ "abs", "exact", "value" ]
https://gitlab.inria.fr/why3/why3
7c59064b4eed9a4059292599f3a657716aa34784
total_error (x : t) : real
= abs (value x - model x)
function
total_error
stdlib
stdlib/floating_point.mlw
[ "DoubleFormat", "GenFloat", "GenFloatFull", "GenFloatSpecFull", "GenFloatSpecMultiRounding", "GenFloatSpecStrict", "Rounding", "SingleFormat", "SpecialValues", "int.Int", "real.Abs", "real.FromInt", "real.Real", "real.Square" ]
[ "abs", "model", "value" ]
https://gitlab.inria.fr/why3/why3
7c59064b4eed9a4059292599f3a657716aa34784
max : real
constant
max
stdlib
stdlib/floating_point.mlw
[ "DoubleFormat", "GenFloat", "GenFloatFull", "GenFloatSpecFull", "GenFloatSpecMultiRounding", "GenFloatSpecStrict", "Rounding", "SingleFormat", "SpecialValues", "int.Int", "real.Abs", "real.FromInt", "real.Real", "real.Square" ]
[]
https://gitlab.inria.fr/why3/why3
7c59064b4eed9a4059292599f3a657716aa34784
no_overflow (m:mode) (x:real)
= abs (round m x) <= max
predicate
no_overflow
stdlib
stdlib/floating_point.mlw
[ "DoubleFormat", "GenFloat", "GenFloatFull", "GenFloatSpecFull", "GenFloatSpecMultiRounding", "GenFloatSpecStrict", "Rounding", "SingleFormat", "SpecialValues", "int.Int", "real.Abs", "real.FromInt", "real.Real", "real.Square" ]
[ "abs", "max", "mode", "round" ]
https://gitlab.inria.fr/why3/why3
7c59064b4eed9a4059292599f3a657716aa34784
Bounded_real_no_overflow : forall m:mode, x:real. abs x <= max -> no_overflow m x
axiom
Bounded_real_no_overflow
stdlib
stdlib/floating_point.mlw
[ "DoubleFormat", "GenFloat", "GenFloatFull", "GenFloatSpecFull", "GenFloatSpecMultiRounding", "GenFloatSpecStrict", "Rounding", "SingleFormat", "SpecialValues", "int.Int", "real.Abs", "real.FromInt", "real.Real", "real.Square" ]
[ "abs", "max", "mode", "no_overflow" ]
https://gitlab.inria.fr/why3/why3
7c59064b4eed9a4059292599f3a657716aa34784
Round_monotonic : forall m:mode, x y:real. x <= y -> round m x <= round m y
axiom
Round_monotonic
stdlib
stdlib/floating_point.mlw
[ "DoubleFormat", "GenFloat", "GenFloatFull", "GenFloatSpecFull", "GenFloatSpecMultiRounding", "GenFloatSpecStrict", "Rounding", "SingleFormat", "SpecialValues", "int.Int", "real.Abs", "real.FromInt", "real.Real", "real.Square" ]
[ "mode", "round" ]
https://gitlab.inria.fr/why3/why3
7c59064b4eed9a4059292599f3a657716aa34784
Round_idempotent : forall m1 m2:mode, x:real. round m1 (round m2 x) = round m2 x
axiom
Round_idempotent
stdlib
stdlib/floating_point.mlw
[ "DoubleFormat", "GenFloat", "GenFloatFull", "GenFloatSpecFull", "GenFloatSpecMultiRounding", "GenFloatSpecStrict", "Rounding", "SingleFormat", "SpecialValues", "int.Int", "real.Abs", "real.FromInt", "real.Real", "real.Square" ]
[ "mode", "round" ]
https://gitlab.inria.fr/why3/why3
7c59064b4eed9a4059292599f3a657716aa34784
Round_value : forall m:mode, x:t. round m (value x) = value x
axiom
Round_value
stdlib
stdlib/floating_point.mlw
[ "DoubleFormat", "GenFloat", "GenFloatFull", "GenFloatSpecFull", "GenFloatSpecMultiRounding", "GenFloatSpecStrict", "Rounding", "SingleFormat", "SpecialValues", "int.Int", "real.Abs", "real.FromInt", "real.Real", "real.Square" ]
[ "mode", "round", "value" ]
https://gitlab.inria.fr/why3/why3
7c59064b4eed9a4059292599f3a657716aa34784
Bounded_value : forall x:t. abs (value x) <= max
axiom
Bounded_value
stdlib
stdlib/floating_point.mlw
[ "DoubleFormat", "GenFloat", "GenFloatFull", "GenFloatSpecFull", "GenFloatSpecMultiRounding", "GenFloatSpecStrict", "Rounding", "SingleFormat", "SpecialValues", "int.Int", "real.Abs", "real.FromInt", "real.Real", "real.Square" ]
[ "abs", "max", "value" ]
https://gitlab.inria.fr/why3/why3
7c59064b4eed9a4059292599f3a657716aa34784
max_representable_integer : int
constant
max_representable_integer
stdlib
stdlib/floating_point.mlw
[ "DoubleFormat", "GenFloat", "GenFloatFull", "GenFloatSpecFull", "GenFloatSpecMultiRounding", "GenFloatSpecStrict", "Rounding", "SingleFormat", "SpecialValues", "int.Int", "real.Abs", "real.FromInt", "real.Real", "real.Square" ]
[ "int" ]
https://gitlab.inria.fr/why3/why3
7c59064b4eed9a4059292599f3a657716aa34784
Exact_rounding_for_integers: forall m:mode,i:int. Int.(<=) (Int.(-_) max_representable_integer) i /\ Int.(<=) i max_representable_integer -> round m (from_int i) = from_int i
axiom
Exact_rounding_for_integers
stdlib
stdlib/floating_point.mlw
[ "DoubleFormat", "GenFloat", "GenFloatFull", "GenFloatSpecFull", "GenFloatSpecMultiRounding", "GenFloatSpecStrict", "Rounding", "SingleFormat", "SpecialValues", "int.Int", "real.Abs", "real.FromInt", "real.Real", "real.Square" ]
[ "from_int", "int", "max_representable_integer", "mode", "round" ]
https://gitlab.inria.fr/why3/why3
7c59064b4eed9a4059292599f3a657716aa34784
Round_down_le: forall x:real. round Down x <= x
axiom
Round_down_le
stdlib
stdlib/floating_point.mlw
[ "DoubleFormat", "GenFloat", "GenFloatFull", "GenFloatSpecFull", "GenFloatSpecMultiRounding", "GenFloatSpecStrict", "Rounding", "SingleFormat", "SpecialValues", "int.Int", "real.Abs", "real.FromInt", "real.Real", "real.Square" ]
[ "round" ]
rounding up and down
https://gitlab.inria.fr/why3/why3
7c59064b4eed9a4059292599f3a657716aa34784
Round_up_ge: forall x:real. round Up x >= x
axiom
Round_up_ge
stdlib
stdlib/floating_point.mlw
[ "DoubleFormat", "GenFloat", "GenFloatFull", "GenFloatSpecFull", "GenFloatSpecMultiRounding", "GenFloatSpecStrict", "Rounding", "SingleFormat", "SpecialValues", "int.Int", "real.Abs", "real.FromInt", "real.Real", "real.Square" ]
[ "round" ]
https://gitlab.inria.fr/why3/why3
7c59064b4eed9a4059292599f3a657716aa34784
Round_down_neg: forall x:real. round Down (-x) = - round Up x
axiom
Round_down_neg
stdlib
stdlib/floating_point.mlw
[ "DoubleFormat", "GenFloat", "GenFloatFull", "GenFloatSpecFull", "GenFloatSpecMultiRounding", "GenFloatSpecStrict", "Rounding", "SingleFormat", "SpecialValues", "int.Int", "real.Abs", "real.FromInt", "real.Real", "real.Square" ]
[ "round" ]
https://gitlab.inria.fr/why3/why3
7c59064b4eed9a4059292599f3a657716aa34784
Round_up_neg: forall x:real. round Up (-x) = - round Down x
axiom
Round_up_neg
stdlib
stdlib/floating_point.mlw
[ "DoubleFormat", "GenFloat", "GenFloatFull", "GenFloatSpecFull", "GenFloatSpecMultiRounding", "GenFloatSpecStrict", "Rounding", "SingleFormat", "SpecialValues", "int.Int", "real.Abs", "real.FromInt", "real.Real", "real.Square" ]
[ "round" ]
https://gitlab.inria.fr/why3/why3
7c59064b4eed9a4059292599f3a657716aa34784
round_logic mode real : t
function
round_logic
stdlib
stdlib/floating_point.mlw
[ "DoubleFormat", "GenFloat", "GenFloatFull", "GenFloatSpecFull", "GenFloatSpecMultiRounding", "GenFloatSpecStrict", "Rounding", "SingleFormat", "SpecialValues", "int.Int", "real.Abs", "real.FromInt", "real.Real", "real.Square" ]
[ "mode" ]
rounding into a float instead of a real
https://gitlab.inria.fr/why3/why3
7c59064b4eed9a4059292599f3a657716aa34784
Round_logic_def: forall m:mode, x:real. no_overflow m x -> value (round_logic m x) = round m x
axiom
Round_logic_def
stdlib
stdlib/floating_point.mlw
[ "DoubleFormat", "GenFloat", "GenFloatFull", "GenFloatSpecFull", "GenFloatSpecMultiRounding", "GenFloatSpecStrict", "Rounding", "SingleFormat", "SpecialValues", "int.Int", "real.Abs", "real.FromInt", "real.Real", "real.Square" ]
[ "mode", "no_overflow", "round", "round_logic", "value" ]
https://gitlab.inria.fr/why3/why3
7c59064b4eed9a4059292599f3a657716aa34784
single
type
single
stdlib
stdlib/floating_point.mlw
[ "DoubleFormat", "GenFloat", "GenFloatFull", "GenFloatSpecFull", "GenFloatSpecMultiRounding", "GenFloatSpecStrict", "Rounding", "SingleFormat", "SpecialValues", "int.Int", "real.Abs", "real.FromInt", "real.Real", "real.Square" ]
[]
https://gitlab.inria.fr/why3/why3
7c59064b4eed9a4059292599f3a657716aa34784
max_single : real
= 0x1.FFFFFEp127
constant
max_single
stdlib
stdlib/floating_point.mlw
[ "DoubleFormat", "GenFloat", "GenFloatFull", "GenFloatSpecFull", "GenFloatSpecMultiRounding", "GenFloatSpecStrict", "Rounding", "SingleFormat", "SpecialValues", "int.Int", "real.Abs", "real.FromInt", "real.Real", "real.Square" ]
[]
https://gitlab.inria.fr/why3/why3
7c59064b4eed9a4059292599f3a657716aa34784
max_int : int
= 16777216
constant
max_int
stdlib
stdlib/floating_point.mlw
[ "DoubleFormat", "GenFloat", "GenFloatFull", "GenFloatSpecFull", "GenFloatSpecMultiRounding", "GenFloatSpecStrict", "Rounding", "SingleFormat", "SpecialValues", "int.Int", "real.Abs", "real.FromInt", "real.Real", "real.Square" ]
[ "int" ]
https://gitlab.inria.fr/why3/why3
7c59064b4eed9a4059292599f3a657716aa34784
double
type
double
stdlib
stdlib/floating_point.mlw
[ "DoubleFormat", "GenFloat", "GenFloatFull", "GenFloatSpecFull", "GenFloatSpecMultiRounding", "GenFloatSpecStrict", "Rounding", "SingleFormat", "SpecialValues", "int.Int", "real.Abs", "real.FromInt", "real.Real", "real.Square" ]
[]
https://gitlab.inria.fr/why3/why3
7c59064b4eed9a4059292599f3a657716aa34784
max_double : real
= 0x1.FFFFFFFFFFFFFp1023
constant
max_double
stdlib
stdlib/floating_point.mlw
[ "DoubleFormat", "GenFloat", "GenFloatFull", "GenFloatSpecFull", "GenFloatSpecMultiRounding", "GenFloatSpecStrict", "Rounding", "SingleFormat", "SpecialValues", "int.Int", "real.Abs", "real.FromInt", "real.Real", "real.Square" ]
[]
https://gitlab.inria.fr/why3/why3
7c59064b4eed9a4059292599f3a657716aa34784
max_int : int
= 9007199254740992
constant
max_int
stdlib
stdlib/floating_point.mlw
[ "DoubleFormat", "GenFloat", "GenFloatFull", "GenFloatSpecFull", "GenFloatSpecMultiRounding", "GenFloatSpecStrict", "Rounding", "SingleFormat", "SpecialValues", "int.Int", "real.Abs", "real.FromInt", "real.Real", "real.Square" ]
[ "int" ]
https://gitlab.inria.fr/why3/why3
7c59064b4eed9a4059292599f3a657716aa34784
of_real_post (m:mode) (x:real) (res:t)
= value res = round m x /\ exact res = x /\ model res = x
predicate
of_real_post
stdlib
stdlib/floating_point.mlw
[ "DoubleFormat", "GenFloat", "GenFloatFull", "GenFloatSpecFull", "GenFloatSpecMultiRounding", "GenFloatSpecStrict", "Rounding", "SingleFormat", "SpecialValues", "int.Int", "real.Abs", "real.FromInt", "real.Real", "real.Square" ]
[ "exact", "mode", "model", "round", "value" ]
https://gitlab.inria.fr/why3/why3
7c59064b4eed9a4059292599f3a657716aa34784
add_post (m:mode) (x y res:t)
= value res = round m (value x + value y) /\ exact res = exact x + exact y /\ model res = model x + model y
predicate
add_post
stdlib
stdlib/floating_point.mlw
[ "DoubleFormat", "GenFloat", "GenFloatFull", "GenFloatSpecFull", "GenFloatSpecMultiRounding", "GenFloatSpecStrict", "Rounding", "SingleFormat", "SpecialValues", "int.Int", "real.Abs", "real.FromInt", "real.Real", "real.Square" ]
[ "exact", "mode", "model", "round", "value" ]
{3 binary operations}
https://gitlab.inria.fr/why3/why3
7c59064b4eed9a4059292599f3a657716aa34784
sub_post (m:mode) (x y res:t)
= value res = round m (value x - value y) /\ exact res = exact x - exact y /\ model res = model x - model y
predicate
sub_post
stdlib
stdlib/floating_point.mlw
[ "DoubleFormat", "GenFloat", "GenFloatFull", "GenFloatSpecFull", "GenFloatSpecMultiRounding", "GenFloatSpecStrict", "Rounding", "SingleFormat", "SpecialValues", "int.Int", "real.Abs", "real.FromInt", "real.Real", "real.Square" ]
[ "exact", "mode", "model", "round", "value" ]
https://gitlab.inria.fr/why3/why3
7c59064b4eed9a4059292599f3a657716aa34784
mul_post (m:mode) (x y res:t)
= value res = round m (value x * value y) /\ exact res = exact x * exact y /\ model res = model x * model y
predicate
mul_post
stdlib
stdlib/floating_point.mlw
[ "DoubleFormat", "GenFloat", "GenFloatFull", "GenFloatSpecFull", "GenFloatSpecMultiRounding", "GenFloatSpecStrict", "Rounding", "SingleFormat", "SpecialValues", "int.Int", "real.Abs", "real.FromInt", "real.Real", "real.Square" ]
[ "exact", "mode", "model", "round", "value" ]
https://gitlab.inria.fr/why3/why3
7c59064b4eed9a4059292599f3a657716aa34784
div_post (m:mode) (x y res:t)
= value res = round m (value x / value y) /\ exact res = exact x / exact y /\ model res = model x / model y
predicate
div_post
stdlib
stdlib/floating_point.mlw
[ "DoubleFormat", "GenFloat", "GenFloatFull", "GenFloatSpecFull", "GenFloatSpecMultiRounding", "GenFloatSpecStrict", "Rounding", "SingleFormat", "SpecialValues", "int.Int", "real.Abs", "real.FromInt", "real.Real", "real.Square" ]
[ "exact", "mode", "model", "round", "value" ]
https://gitlab.inria.fr/why3/why3
7c59064b4eed9a4059292599f3a657716aa34784
neg_post (x res:t)
= value res = - value x /\ exact res = - exact x /\ model res = - model x
predicate
neg_post
stdlib
stdlib/floating_point.mlw
[ "DoubleFormat", "GenFloat", "GenFloatFull", "GenFloatSpecFull", "GenFloatSpecMultiRounding", "GenFloatSpecStrict", "Rounding", "SingleFormat", "SpecialValues", "int.Int", "real.Abs", "real.FromInt", "real.Real", "real.Square" ]
[ "exact", "model", "value" ]
https://gitlab.inria.fr/why3/why3
7c59064b4eed9a4059292599f3a657716aa34784
lt (x:t) (y:t)
= value x < value y
predicate
lt
stdlib
stdlib/floating_point.mlw
[ "DoubleFormat", "GenFloat", "GenFloatFull", "GenFloatSpecFull", "GenFloatSpecMultiRounding", "GenFloatSpecStrict", "Rounding", "SingleFormat", "SpecialValues", "int.Int", "real.Abs", "real.FromInt", "real.Real", "real.Square" ]
[ "value" ]
{3 Comparisons}
https://gitlab.inria.fr/why3/why3
7c59064b4eed9a4059292599f3a657716aa34784
gt (x:t) (y:t)
= value x > value y
predicate
gt
stdlib
stdlib/floating_point.mlw
[ "DoubleFormat", "GenFloat", "GenFloatFull", "GenFloatSpecFull", "GenFloatSpecMultiRounding", "GenFloatSpecStrict", "Rounding", "SingleFormat", "SpecialValues", "int.Int", "real.Abs", "real.FromInt", "real.Real", "real.Square" ]
[ "value" ]
https://gitlab.inria.fr/why3/why3
7c59064b4eed9a4059292599f3a657716aa34784
class t : class
function
class
stdlib
stdlib/floating_point.mlw
[ "DoubleFormat", "GenFloat", "GenFloatFull", "GenFloatSpecFull", "GenFloatSpecMultiRounding", "GenFloatSpecStrict", "Rounding", "SingleFormat", "SpecialValues", "int.Int", "real.Abs", "real.FromInt", "real.Real", "real.Square" ]
[]
{3 special values}
https://gitlab.inria.fr/why3/why3
7c59064b4eed9a4059292599f3a657716aa34784
is_finite (x:t)
= class x = Finite
predicate
is_finite
stdlib
stdlib/floating_point.mlw
[ "DoubleFormat", "GenFloat", "GenFloatFull", "GenFloatSpecFull", "GenFloatSpecMultiRounding", "GenFloatSpecStrict", "Rounding", "SingleFormat", "SpecialValues", "int.Int", "real.Abs", "real.FromInt", "real.Real", "real.Square" ]
[ "class" ]
https://gitlab.inria.fr/why3/why3
7c59064b4eed9a4059292599f3a657716aa34784
is_infinite (x:t)
= class x = Infinite
predicate
is_infinite
stdlib
stdlib/floating_point.mlw
[ "DoubleFormat", "GenFloat", "GenFloatFull", "GenFloatSpecFull", "GenFloatSpecMultiRounding", "GenFloatSpecStrict", "Rounding", "SingleFormat", "SpecialValues", "int.Int", "real.Abs", "real.FromInt", "real.Real", "real.Square" ]
[ "class" ]
https://gitlab.inria.fr/why3/why3
7c59064b4eed9a4059292599f3a657716aa34784
is_NaN (x:t)
= class x = NaN
predicate
is_NaN
stdlib
stdlib/floating_point.mlw
[ "DoubleFormat", "GenFloat", "GenFloatFull", "GenFloatSpecFull", "GenFloatSpecMultiRounding", "GenFloatSpecStrict", "Rounding", "SingleFormat", "SpecialValues", "int.Int", "real.Abs", "real.FromInt", "real.Real", "real.Square" ]
[ "class" ]
https://gitlab.inria.fr/why3/why3
7c59064b4eed9a4059292599f3a657716aa34784
is_not_NaN (x:t)
= is_finite x \/ is_infinite x
predicate
is_not_NaN
stdlib
stdlib/floating_point.mlw
[ "DoubleFormat", "GenFloat", "GenFloatFull", "GenFloatSpecFull", "GenFloatSpecMultiRounding", "GenFloatSpecStrict", "Rounding", "SingleFormat", "SpecialValues", "int.Int", "real.Abs", "real.FromInt", "real.Real", "real.Square" ]
[ "is_finite", "is_infinite" ]
https://gitlab.inria.fr/why3/why3
7c59064b4eed9a4059292599f3a657716aa34784
is_not_NaN: forall x:t. is_not_NaN x <-> not (is_NaN x)
lemma
is_not_NaN
stdlib
stdlib/floating_point.mlw
[ "DoubleFormat", "GenFloat", "GenFloatFull", "GenFloatSpecFull", "GenFloatSpecMultiRounding", "GenFloatSpecStrict", "Rounding", "SingleFormat", "SpecialValues", "int.Int", "real.Abs", "real.FromInt", "real.Real", "real.Square" ]
[ "is_NaN" ]
https://gitlab.inria.fr/why3/why3
7c59064b4eed9a4059292599f3a657716aa34784
sign t : sign
function
sign
stdlib
stdlib/floating_point.mlw
[ "DoubleFormat", "GenFloat", "GenFloatFull", "GenFloatSpecFull", "GenFloatSpecMultiRounding", "GenFloatSpecStrict", "Rounding", "SingleFormat", "SpecialValues", "int.Int", "real.Abs", "real.FromInt", "real.Real", "real.Square" ]
[]
https://gitlab.inria.fr/why3/why3
7c59064b4eed9a4059292599f3a657716aa34784
same_sign_real (x:t) (y:real)
= SpecialValues.same_sign_real (sign x) y
predicate
same_sign_real
stdlib
stdlib/floating_point.mlw
[ "DoubleFormat", "GenFloat", "GenFloatFull", "GenFloatSpecFull", "GenFloatSpecMultiRounding", "GenFloatSpecStrict", "Rounding", "SingleFormat", "SpecialValues", "int.Int", "real.Abs", "real.FromInt", "real.Real", "real.Square" ]
[ "sign" ]
https://gitlab.inria.fr/why3/why3
7c59064b4eed9a4059292599f3a657716aa34784
same_sign (x:t) (y:t)
= sign x = sign y
predicate
same_sign
stdlib
stdlib/floating_point.mlw
[ "DoubleFormat", "GenFloat", "GenFloatFull", "GenFloatSpecFull", "GenFloatSpecMultiRounding", "GenFloatSpecStrict", "Rounding", "SingleFormat", "SpecialValues", "int.Int", "real.Abs", "real.FromInt", "real.Real", "real.Square" ]
[ "sign" ]
https://gitlab.inria.fr/why3/why3
7c59064b4eed9a4059292599f3a657716aa34784
diff_sign (x:t) (y:t)
= sign x <> sign y
predicate
diff_sign
stdlib
stdlib/floating_point.mlw
[ "DoubleFormat", "GenFloat", "GenFloatFull", "GenFloatSpecFull", "GenFloatSpecMultiRounding", "GenFloatSpecStrict", "Rounding", "SingleFormat", "SpecialValues", "int.Int", "real.Abs", "real.FromInt", "real.Real", "real.Square" ]
[ "sign" ]
https://gitlab.inria.fr/why3/why3
7c59064b4eed9a4059292599f3a657716aa34784
sign_zero_result (m:mode) (x:t)
= value x = 0.0 -> match m with | Down -> sign x = Neg | _ -> sign x = Pos end
predicate
sign_zero_result
stdlib
stdlib/floating_point.mlw
[ "DoubleFormat", "GenFloat", "GenFloatFull", "GenFloatSpecFull", "GenFloatSpecMultiRounding", "GenFloatSpecStrict", "Rounding", "SingleFormat", "SpecialValues", "int.Int", "real.Abs", "real.FromInt", "real.Real", "real.Square" ]
[ "Neg", "mode", "sign", "value" ]
https://gitlab.inria.fr/why3/why3
7c59064b4eed9a4059292599f3a657716aa34784
is_minus_infinity (x:t)
= is_infinite x /\ sign x = Neg
predicate
is_minus_infinity
stdlib
stdlib/floating_point.mlw
[ "DoubleFormat", "GenFloat", "GenFloatFull", "GenFloatSpecFull", "GenFloatSpecMultiRounding", "GenFloatSpecStrict", "Rounding", "SingleFormat", "SpecialValues", "int.Int", "real.Abs", "real.FromInt", "real.Real", "real.Square" ]
[ "Neg", "is_infinite", "sign" ]
https://gitlab.inria.fr/why3/why3
7c59064b4eed9a4059292599f3a657716aa34784
is_plus_infinity (x:t)
= is_infinite x /\ sign x = Pos
predicate
is_plus_infinity
stdlib
stdlib/floating_point.mlw
[ "DoubleFormat", "GenFloat", "GenFloatFull", "GenFloatSpecFull", "GenFloatSpecMultiRounding", "GenFloatSpecStrict", "Rounding", "SingleFormat", "SpecialValues", "int.Int", "real.Abs", "real.FromInt", "real.Real", "real.Square" ]
[ "is_infinite", "sign" ]
https://gitlab.inria.fr/why3/why3
7c59064b4eed9a4059292599f3a657716aa34784
is_gen_zero (x:t)
= is_finite x /\ value x = 0.0
predicate
is_gen_zero
stdlib
stdlib/floating_point.mlw
[ "DoubleFormat", "GenFloat", "GenFloatFull", "GenFloatSpecFull", "GenFloatSpecMultiRounding", "GenFloatSpecStrict", "Rounding", "SingleFormat", "SpecialValues", "int.Int", "real.Abs", "real.FromInt", "real.Real", "real.Square" ]
[ "is_finite", "value" ]
https://gitlab.inria.fr/why3/why3
7c59064b4eed9a4059292599f3a657716aa34784
is_gen_zero_plus (x:t)
= is_gen_zero x /\ sign x = Pos
predicate
is_gen_zero_plus
stdlib
stdlib/floating_point.mlw
[ "DoubleFormat", "GenFloat", "GenFloatFull", "GenFloatSpecFull", "GenFloatSpecMultiRounding", "GenFloatSpecStrict", "Rounding", "SingleFormat", "SpecialValues", "int.Int", "real.Abs", "real.FromInt", "real.Real", "real.Square" ]
[ "is_gen_zero", "sign" ]
https://gitlab.inria.fr/why3/why3
7c59064b4eed9a4059292599f3a657716aa34784
is_gen_zero_minus (x:t)
= is_gen_zero x /\ sign x = Neg
predicate
is_gen_zero_minus
stdlib
stdlib/floating_point.mlw
[ "DoubleFormat", "GenFloat", "GenFloatFull", "GenFloatSpecFull", "GenFloatSpecMultiRounding", "GenFloatSpecStrict", "Rounding", "SingleFormat", "SpecialValues", "int.Int", "real.Abs", "real.FromInt", "real.Real", "real.Square" ]
[ "Neg", "is_gen_zero", "sign" ]
https://gitlab.inria.fr/why3/why3
7c59064b4eed9a4059292599f3a657716aa34784
finite_sign : forall x:t. class x = Finite /\ value x <> 0.0 -> same_sign_real x (value x)
lemma
finite_sign
stdlib
stdlib/floating_point.mlw
[ "DoubleFormat", "GenFloat", "GenFloatFull", "GenFloatSpecFull", "GenFloatSpecMultiRounding", "GenFloatSpecStrict", "Rounding", "SingleFormat", "SpecialValues", "int.Int", "real.Abs", "real.FromInt", "real.Real", "real.Square" ]
[ "class", "same_sign_real", "value" ]
non-zero finite gen_float has the same sign as its float_value
https://gitlab.inria.fr/why3/why3
7c59064b4eed9a4059292599f3a657716aa34784
finite_sign_pos1: forall x:t. class x = Finite /\ value x > 0.0 -> sign x = Pos
lemma
finite_sign_pos1
stdlib
stdlib/floating_point.mlw
[ "DoubleFormat", "GenFloat", "GenFloatFull", "GenFloatSpecFull", "GenFloatSpecMultiRounding", "GenFloatSpecStrict", "Rounding", "SingleFormat", "SpecialValues", "int.Int", "real.Abs", "real.FromInt", "real.Real", "real.Square" ]
[ "class", "sign", "value" ]
https://gitlab.inria.fr/why3/why3
7c59064b4eed9a4059292599f3a657716aa34784
finite_sign_pos2: forall x:t. class x = Finite /\ value x <> 0.0 /\ sign x = Pos -> value x > 0.0
lemma
finite_sign_pos2
stdlib
stdlib/floating_point.mlw
[ "DoubleFormat", "GenFloat", "GenFloatFull", "GenFloatSpecFull", "GenFloatSpecMultiRounding", "GenFloatSpecStrict", "Rounding", "SingleFormat", "SpecialValues", "int.Int", "real.Abs", "real.FromInt", "real.Real", "real.Square" ]
[ "class", "sign", "value" ]
https://gitlab.inria.fr/why3/why3
7c59064b4eed9a4059292599f3a657716aa34784
finite_sign_neg1: forall x:t. class x = Finite /\ value x < 0.0 -> sign x = Neg
lemma
finite_sign_neg1
stdlib
stdlib/floating_point.mlw
[ "DoubleFormat", "GenFloat", "GenFloatFull", "GenFloatSpecFull", "GenFloatSpecMultiRounding", "GenFloatSpecStrict", "Rounding", "SingleFormat", "SpecialValues", "int.Int", "real.Abs", "real.FromInt", "real.Real", "real.Square" ]
[ "Neg", "class", "sign", "value" ]
https://gitlab.inria.fr/why3/why3
7c59064b4eed9a4059292599f3a657716aa34784
finite_sign_neg2: forall x:t. class x = Finite /\ value x <> 0.0 /\ sign x = Neg -> value x < 0.0
lemma
finite_sign_neg2
stdlib
stdlib/floating_point.mlw
[ "DoubleFormat", "GenFloat", "GenFloatFull", "GenFloatSpecFull", "GenFloatSpecMultiRounding", "GenFloatSpecStrict", "Rounding", "SingleFormat", "SpecialValues", "int.Int", "real.Abs", "real.FromInt", "real.Real", "real.Square" ]
[ "Neg", "class", "sign", "value" ]
https://gitlab.inria.fr/why3/why3
7c59064b4eed9a4059292599f3a657716aa34784
diff_sign_trans: forall x y z:t. diff_sign x y /\ diff_sign y z -> same_sign x z
lemma
diff_sign_trans
stdlib
stdlib/floating_point.mlw
[ "DoubleFormat", "GenFloat", "GenFloatFull", "GenFloatSpecFull", "GenFloatSpecMultiRounding", "GenFloatSpecStrict", "Rounding", "SingleFormat", "SpecialValues", "int.Int", "real.Abs", "real.FromInt", "real.Real", "real.Square" ]
[ "diff_sign", "same_sign" ]
https://gitlab.inria.fr/why3/why3
7c59064b4eed9a4059292599f3a657716aa34784
diff_sign_product: forall x y:t. class x = Finite /\ class y = Finite /\ value x * value y < 0.0 -> diff_sign x y
lemma
diff_sign_product
stdlib
stdlib/floating_point.mlw
[ "DoubleFormat", "GenFloat", "GenFloatFull", "GenFloatSpecFull", "GenFloatSpecMultiRounding", "GenFloatSpecStrict", "Rounding", "SingleFormat", "SpecialValues", "int.Int", "real.Abs", "real.FromInt", "real.Real", "real.Square" ]
[ "class", "diff_sign", "value" ]
https://gitlab.inria.fr/why3/why3
7c59064b4eed9a4059292599f3a657716aa34784
same_sign_product: forall x y:t. class x = Finite /\ class y = Finite /\ same_sign x y -> value x * value y >= 0.0
lemma
same_sign_product
stdlib
stdlib/floating_point.mlw
[ "DoubleFormat", "GenFloat", "GenFloatFull", "GenFloatSpecFull", "GenFloatSpecMultiRounding", "GenFloatSpecStrict", "Rounding", "SingleFormat", "SpecialValues", "int.Int", "real.Abs", "real.FromInt", "real.Real", "real.Square" ]
[ "class", "same_sign", "value" ]
https://gitlab.inria.fr/why3/why3
7c59064b4eed9a4059292599f3a657716aa34784
overflow_value (m:mode) (x:t)
= match m, sign x with | Down, Neg -> is_infinite x | Down, Pos -> is_finite x /\ value x = max | Up, Neg -> is_finite x /\ value x = - max | Up, Pos -> is_infinite x | ToZero, Neg -> is_finite x /\ value x = - max | ToZero, Pos -> is_finite x /\ value x = max | (NearestTiesToAway | Near...
predicate
overflow_value
stdlib
stdlib/floating_point.mlw
[ "DoubleFormat", "GenFloat", "GenFloatFull", "GenFloatSpecFull", "GenFloatSpecMultiRounding", "GenFloatSpecStrict", "Rounding", "SingleFormat", "SpecialValues", "int.Int", "real.Abs", "real.FromInt", "real.Real", "real.Square" ]
[ "Neg", "is_finite", "is_infinite", "max", "mode", "sign", "value" ]
This predicate tells what is the result of a rounding in case of overflow
https://gitlab.inria.fr/why3/why3
7c59064b4eed9a4059292599f3a657716aa34784
round1 : forall m:mode, x:real. no_overflow m x -> is_finite (round_logic m x) /\ value(round_logic m x) = round m x
lemma
round1
stdlib
stdlib/floating_point.mlw
[ "DoubleFormat", "GenFloat", "GenFloatFull", "GenFloatSpecFull", "GenFloatSpecMultiRounding", "GenFloatSpecStrict", "Rounding", "SingleFormat", "SpecialValues", "int.Int", "real.Abs", "real.FromInt", "real.Real", "real.Square" ]
[ "is_finite", "mode", "no_overflow", "round", "round_logic", "value" ]
rounding in logic
https://gitlab.inria.fr/why3/why3
7c59064b4eed9a4059292599f3a657716aa34784
round2 : forall m:mode, x:real. not no_overflow m x -> same_sign_real (round_logic m x) x /\ overflow_value m (round_logic m x)
lemma
round2
stdlib
stdlib/floating_point.mlw
[ "DoubleFormat", "GenFloat", "GenFloatFull", "GenFloatSpecFull", "GenFloatSpecMultiRounding", "GenFloatSpecStrict", "Rounding", "SingleFormat", "SpecialValues", "int.Int", "real.Abs", "real.FromInt", "real.Real", "real.Square" ]
[ "mode", "no_overflow", "overflow_value", "round_logic", "same_sign_real" ]
https://gitlab.inria.fr/why3/why3
7c59064b4eed9a4059292599f3a657716aa34784
round3 : forall m:mode, x:real. exact (round_logic m x) = x
lemma
round3
stdlib
stdlib/floating_point.mlw
[ "DoubleFormat", "GenFloat", "GenFloatFull", "GenFloatSpecFull", "GenFloatSpecMultiRounding", "GenFloatSpecStrict", "Rounding", "SingleFormat", "SpecialValues", "int.Int", "real.Abs", "real.FromInt", "real.Real", "real.Square" ]
[ "exact", "mode", "round_logic" ]
https://gitlab.inria.fr/why3/why3
7c59064b4eed9a4059292599f3a657716aa34784
round4 : forall m:mode, x:real. model (round_logic m x) = x
lemma
round4
stdlib
stdlib/floating_point.mlw
[ "DoubleFormat", "GenFloat", "GenFloatFull", "GenFloatSpecFull", "GenFloatSpecMultiRounding", "GenFloatSpecStrict", "Rounding", "SingleFormat", "SpecialValues", "int.Int", "real.Abs", "real.FromInt", "real.Real", "real.Square" ]
[ "mode", "model", "round_logic" ]
https://gitlab.inria.fr/why3/why3
7c59064b4eed9a4059292599f3a657716aa34784
round_of_zero : forall m:mode. is_gen_zero (round_logic m 0.0)
lemma
round_of_zero
stdlib
stdlib/floating_point.mlw
[ "DoubleFormat", "GenFloat", "GenFloatFull", "GenFloatSpecFull", "GenFloatSpecMultiRounding", "GenFloatSpecStrict", "Rounding", "SingleFormat", "SpecialValues", "int.Int", "real.Abs", "real.FromInt", "real.Real", "real.Square" ]
[ "is_gen_zero", "mode", "round_logic" ]
rounding of zero
https://gitlab.inria.fr/why3/why3
7c59064b4eed9a4059292599f3a657716aa34784
round_logic_le : forall m:mode, x:real. is_finite (round_logic m x) -> abs (value (round_logic m x)) <= max
lemma
round_logic_le
stdlib
stdlib/floating_point.mlw
[ "DoubleFormat", "GenFloat", "GenFloatFull", "GenFloatSpecFull", "GenFloatSpecMultiRounding", "GenFloatSpecStrict", "Rounding", "SingleFormat", "SpecialValues", "int.Int", "real.Abs", "real.FromInt", "real.Real", "real.Square" ]
[ "abs", "is_finite", "max", "mode", "round_logic", "value" ]
https://gitlab.inria.fr/why3/why3
7c59064b4eed9a4059292599f3a657716aa34784
round_no_overflow : forall m:mode, x:real. abs x <= max -> is_finite (round_logic m x) /\ value (round_logic m x) = round m x
lemma
round_no_overflow
stdlib
stdlib/floating_point.mlw
[ "DoubleFormat", "GenFloat", "GenFloatFull", "GenFloatSpecFull", "GenFloatSpecMultiRounding", "GenFloatSpecStrict", "Rounding", "SingleFormat", "SpecialValues", "int.Int", "real.Abs", "real.FromInt", "real.Real", "real.Square" ]
[ "abs", "is_finite", "max", "mode", "round", "round_logic", "value" ]
https://gitlab.inria.fr/why3/why3
7c59064b4eed9a4059292599f3a657716aa34784
min : real
constant
min
stdlib
stdlib/floating_point.mlw
[ "DoubleFormat", "GenFloat", "GenFloatFull", "GenFloatSpecFull", "GenFloatSpecMultiRounding", "GenFloatSpecStrict", "Rounding", "SingleFormat", "SpecialValues", "int.Int", "real.Abs", "real.FromInt", "real.Real", "real.Square" ]
[]
https://gitlab.inria.fr/why3/why3
7c59064b4eed9a4059292599f3a657716aa34784
positive_constant : forall m:mode, x:real. min <= x <= max -> is_finite (round_logic m x) /\ value (round_logic m x) > 0.0 /\ sign (round_logic m x) = Pos
lemma
positive_constant
stdlib
stdlib/floating_point.mlw
[ "DoubleFormat", "GenFloat", "GenFloatFull", "GenFloatSpecFull", "GenFloatSpecMultiRounding", "GenFloatSpecStrict", "Rounding", "SingleFormat", "SpecialValues", "int.Int", "real.Abs", "real.FromInt", "real.Real", "real.Square" ]
[ "is_finite", "max", "min", "mode", "round_logic", "sign", "value" ]
https://gitlab.inria.fr/why3/why3
7c59064b4eed9a4059292599f3a657716aa34784
negative_constant : forall m:mode, x:real. - max <= x <= - min -> is_finite (round_logic m x) /\ value (round_logic m x) < 0.0 /\ sign (round_logic m x) = Neg
lemma
negative_constant
stdlib
stdlib/floating_point.mlw
[ "DoubleFormat", "GenFloat", "GenFloatFull", "GenFloatSpecFull", "GenFloatSpecMultiRounding", "GenFloatSpecStrict", "Rounding", "SingleFormat", "SpecialValues", "int.Int", "real.Abs", "real.FromInt", "real.Real", "real.Square" ]
[ "Neg", "is_finite", "max", "min", "mode", "round_logic", "sign", "value" ]
https://gitlab.inria.fr/why3/why3
7c59064b4eed9a4059292599f3a657716aa34784
is_gen_zero_comp1 : forall x y:t. is_gen_zero x /\ value x = value y /\ is_finite y -> is_gen_zero y
lemma
is_gen_zero_comp1
stdlib
stdlib/floating_point.mlw
[ "DoubleFormat", "GenFloat", "GenFloatFull", "GenFloatSpecFull", "GenFloatSpecMultiRounding", "GenFloatSpecStrict", "Rounding", "SingleFormat", "SpecialValues", "int.Int", "real.Abs", "real.FromInt", "real.Real", "real.Square" ]
[ "is_finite", "is_gen_zero", "value" ]
lemmas on `gen_zero`
https://gitlab.inria.fr/why3/why3
7c59064b4eed9a4059292599f3a657716aa34784
is_gen_zero_comp2 : forall x y:t. is_finite x /\ not (is_gen_zero x) /\ value x = value y -> not (is_gen_zero y)
lemma
is_gen_zero_comp2
stdlib
stdlib/floating_point.mlw
[ "DoubleFormat", "GenFloat", "GenFloatFull", "GenFloatSpecFull", "GenFloatSpecMultiRounding", "GenFloatSpecStrict", "Rounding", "SingleFormat", "SpecialValues", "int.Int", "real.Abs", "real.FromInt", "real.Real", "real.Square" ]
[ "is_finite", "is_gen_zero", "value" ]
https://gitlab.inria.fr/why3/why3
7c59064b4eed9a4059292599f3a657716aa34784
add_post (m:mode) (x:t) (y:t) (r:t)
= (is_NaN x \/ is_NaN y -> is_NaN r) /\ (is_finite x /\ is_infinite y -> is_infinite r /\ same_sign r y) /\ (is_infinite x /\ is_finite y -> is_infinite r /\ same_sign r x) /\ (is_infinite x /\ is_infinite y -> if same_sign x y then is_infinite r /\ same_sign r x else is_NaN r) ...
predicate
add_post
stdlib
stdlib/floating_point.mlw
[ "DoubleFormat", "GenFloat", "GenFloatFull", "GenFloatSpecFull", "GenFloatSpecMultiRounding", "GenFloatSpecStrict", "Rounding", "SingleFormat", "SpecialValues", "int.Int", "real.Abs", "real.FromInt", "real.Real", "real.Square" ]
[ "exact", "is_NaN", "is_finite", "is_infinite", "mode", "model", "no_overflow", "overflow_value", "round", "same_sign", "same_sign_real", "sign", "sign_zero_result", "value" ]
{3 binary operations}
https://gitlab.inria.fr/why3/why3
7c59064b4eed9a4059292599f3a657716aa34784
sub_post (m:mode) (x:t) (y:t) (r:t)
= (is_NaN x \/ is_NaN y -> is_NaN r) /\ (is_finite x /\ is_infinite y -> is_infinite r /\ diff_sign r y) /\ (is_infinite x /\ is_finite y -> is_infinite r /\ same_sign r x) /\ (is_infinite x /\ is_infinite y -> if diff_sign x y then is_infinite r /\ same_sign r x else is_NaN r) ...
predicate
sub_post
stdlib
stdlib/floating_point.mlw
[ "DoubleFormat", "GenFloat", "GenFloatFull", "GenFloatSpecFull", "GenFloatSpecMultiRounding", "GenFloatSpecStrict", "Rounding", "SingleFormat", "SpecialValues", "int.Int", "real.Abs", "real.FromInt", "real.Real", "real.Square" ]
[ "diff_sign", "exact", "is_NaN", "is_finite", "is_infinite", "mode", "model", "no_overflow", "overflow_value", "round", "same_sign", "same_sign_real", "sign", "sign_zero_result", "value" ]
https://gitlab.inria.fr/why3/why3
7c59064b4eed9a4059292599f3a657716aa34784
product_sign (z x y: t)
= (same_sign x y -> sign z = Pos) /\ (diff_sign x y -> sign z = Neg)
predicate
product_sign
stdlib
stdlib/floating_point.mlw
[ "DoubleFormat", "GenFloat", "GenFloatFull", "GenFloatSpecFull", "GenFloatSpecMultiRounding", "GenFloatSpecStrict", "Rounding", "SingleFormat", "SpecialValues", "int.Int", "real.Abs", "real.FromInt", "real.Real", "real.Square" ]
[ "Neg", "diff_sign", "same_sign", "sign" ]
https://gitlab.inria.fr/why3/why3
7c59064b4eed9a4059292599f3a657716aa34784
mul_post (m:mode) (x:t) (y:t) (r:t)
= (is_NaN x \/ is_NaN y -> is_NaN r) /\ (is_gen_zero x /\ is_infinite y -> is_NaN r) /\ (is_finite x /\ is_infinite y /\ value x <> 0.0 -> is_infinite r) /\ (is_infinite x /\ is_gen_zero y -> is_NaN r) /\ (is_infinite x /\ is_finite y /\ value y <> 0.0 -> is_infinite r) /\ (is_...
predicate
mul_post
stdlib
stdlib/floating_point.mlw
[ "DoubleFormat", "GenFloat", "GenFloatFull", "GenFloatSpecFull", "GenFloatSpecMultiRounding", "GenFloatSpecStrict", "Rounding", "SingleFormat", "SpecialValues", "int.Int", "real.Abs", "real.FromInt", "real.Real", "real.Square" ]
[ "exact", "is_NaN", "is_finite", "is_gen_zero", "is_infinite", "mode", "model", "no_overflow", "overflow_value", "product_sign", "round", "value" ]
https://gitlab.inria.fr/why3/why3
7c59064b4eed9a4059292599f3a657716aa34784
neg_post (x:t) (r:t)
= (is_NaN x -> is_NaN r) /\ (is_infinite x -> is_infinite r) /\ (is_finite x -> is_finite r /\ value r = - value x) /\ (not is_NaN r -> diff_sign r x) /\ exact r = - exact x /\ model r = - model x
predicate
neg_post
stdlib
stdlib/floating_point.mlw
[ "DoubleFormat", "GenFloat", "GenFloatFull", "GenFloatSpecFull", "GenFloatSpecMultiRounding", "GenFloatSpecStrict", "Rounding", "SingleFormat", "SpecialValues", "int.Int", "real.Abs", "real.FromInt", "real.Real", "real.Square" ]
[ "diff_sign", "exact", "is_NaN", "is_finite", "is_infinite", "model", "value" ]
https://gitlab.inria.fr/why3/why3
7c59064b4eed9a4059292599f3a657716aa34784
div_post (m:mode) (x:t) (y:t) (r:t)
= (is_NaN x \/ is_NaN y -> is_NaN r) /\ (is_finite x /\ is_infinite y -> is_gen_zero r) /\ (is_infinite x /\ is_finite y -> is_infinite r) /\ (is_infinite x /\ is_infinite y -> is_NaN r) /\ (is_finite x /\ is_finite y /\ value y <> 0.0 /\ no_overflow m (value x / value y) -> is_finit...
predicate
div_post
stdlib
stdlib/floating_point.mlw
[ "DoubleFormat", "GenFloat", "GenFloatFull", "GenFloatSpecFull", "GenFloatSpecMultiRounding", "GenFloatSpecStrict", "Rounding", "SingleFormat", "SpecialValues", "int.Int", "real.Abs", "real.FromInt", "real.Real", "real.Square" ]
[ "exact", "is_NaN", "is_finite", "is_gen_zero", "is_infinite", "mode", "model", "no_overflow", "overflow_value", "product_sign", "round", "value" ]
https://gitlab.inria.fr/why3/why3
7c59064b4eed9a4059292599f3a657716aa34784
fma_post (m:mode) (x y z:t) (r:t)
= (is_NaN x \/ is_NaN y \/ is_NaN z -> is_NaN r) /\ (is_gen_zero x /\ is_infinite y -> is_NaN r) /\ (is_infinite x /\ is_gen_zero y -> is_NaN r) /\ (is_finite x /\ value x <> 0.0 /\ is_infinite y /\ is_finite z -> is_infinite r /\ product_sign r x y) /\ (is_finite x /\ value x <> 0.0 /\ is_i...
predicate
fma_post
stdlib
stdlib/floating_point.mlw
[ "DoubleFormat", "GenFloat", "GenFloatFull", "GenFloatSpecFull", "GenFloatSpecMultiRounding", "GenFloatSpecStrict", "Rounding", "SingleFormat", "SpecialValues", "int.Int", "real.Abs", "real.FromInt", "real.Real", "real.Square" ]
[ "Neg", "exact", "is_NaN", "is_finite", "is_gen_zero", "is_infinite", "mode", "model", "no_overflow", "overflow_value", "product_sign", "round", "same_sign", "same_sign_real", "sign", "value" ]
https://gitlab.inria.fr/why3/why3
7c59064b4eed9a4059292599f3a657716aa34784
sqrt_post (m:mode) (x:t) (r:t)
= (is_NaN x -> is_NaN r) /\ (is_plus_infinity x -> is_plus_infinity r) /\ (is_minus_infinity x -> is_NaN r) /\ (is_finite x /\ value x < 0.0 -> is_NaN r) /\ (is_finite x /\ value x = 0.0 -> is_finite r /\ value r = 0.0 /\ same_sign r x) /\ (is_finite x /\ value x > 0.0 -> is_fini...
predicate
sqrt_post
stdlib
stdlib/floating_point.mlw
[ "DoubleFormat", "GenFloat", "GenFloatFull", "GenFloatSpecFull", "GenFloatSpecMultiRounding", "GenFloatSpecStrict", "Rounding", "SingleFormat", "SpecialValues", "int.Int", "real.Abs", "real.FromInt", "real.Real", "real.Square" ]
[ "exact", "is_NaN", "is_finite", "is_minus_infinity", "is_plus_infinity", "mode", "model", "round", "same_sign", "sign", "sqrt", "value" ]
https://gitlab.inria.fr/why3/why3
7c59064b4eed9a4059292599f3a657716aa34784
of_real_exact_post (x:real) (r:t)
= is_finite r /\ value r = x /\ exact r = x /\ model r = x
predicate
of_real_exact_post
stdlib
stdlib/floating_point.mlw
[ "DoubleFormat", "GenFloat", "GenFloatFull", "GenFloatSpecFull", "GenFloatSpecMultiRounding", "GenFloatSpecStrict", "Rounding", "SingleFormat", "SpecialValues", "int.Int", "real.Abs", "real.FromInt", "real.Real", "real.Square" ]
[ "exact", "is_finite", "model", "value" ]
https://gitlab.inria.fr/why3/why3
7c59064b4eed9a4059292599f3a657716aa34784
le (x:t) (y:t)
= (is_finite x /\ is_finite y /\ value x <= value y) \/ (is_minus_infinity x /\ is_not_NaN y) \/ (is_not_NaN x /\ is_plus_infinity y)
predicate
le
stdlib
stdlib/floating_point.mlw
[ "DoubleFormat", "GenFloat", "GenFloatFull", "GenFloatSpecFull", "GenFloatSpecMultiRounding", "GenFloatSpecStrict", "Rounding", "SingleFormat", "SpecialValues", "int.Int", "real.Abs", "real.FromInt", "real.Real", "real.Square" ]
[ "is_finite", "is_minus_infinity", "is_not_NaN", "is_plus_infinity", "value" ]
{3 Comparisons}
https://gitlab.inria.fr/why3/why3
7c59064b4eed9a4059292599f3a657716aa34784
lt (x:t) (y:t)
= (is_finite x /\ is_finite y /\ value x < value y) \/ (is_minus_infinity x /\ is_not_NaN y /\ not (is_minus_infinity y)) \/ (is_not_NaN x /\ not (is_plus_infinity x) /\ is_plus_infinity y)
predicate
lt
stdlib
stdlib/floating_point.mlw
[ "DoubleFormat", "GenFloat", "GenFloatFull", "GenFloatSpecFull", "GenFloatSpecMultiRounding", "GenFloatSpecStrict", "Rounding", "SingleFormat", "SpecialValues", "int.Int", "real.Abs", "real.FromInt", "real.Real", "real.Square" ]
[ "is_finite", "is_minus_infinity", "is_not_NaN", "is_plus_infinity", "value" ]
https://gitlab.inria.fr/why3/why3
7c59064b4eed9a4059292599f3a657716aa34784
ge (x:t) (y:t)
= le y x
predicate
ge
stdlib
stdlib/floating_point.mlw
[ "DoubleFormat", "GenFloat", "GenFloatFull", "GenFloatSpecFull", "GenFloatSpecMultiRounding", "GenFloatSpecStrict", "Rounding", "SingleFormat", "SpecialValues", "int.Int", "real.Abs", "real.FromInt", "real.Real", "real.Square" ]
[ "le" ]
https://gitlab.inria.fr/why3/why3
7c59064b4eed9a4059292599f3a657716aa34784
gt (x:t) (y:t)
= lt y x
predicate
gt
stdlib
stdlib/floating_point.mlw
[ "DoubleFormat", "GenFloat", "GenFloatFull", "GenFloatSpecFull", "GenFloatSpecMultiRounding", "GenFloatSpecStrict", "Rounding", "SingleFormat", "SpecialValues", "int.Int", "real.Abs", "real.FromInt", "real.Real", "real.Square" ]
[ "lt" ]
https://gitlab.inria.fr/why3/why3
7c59064b4eed9a4059292599f3a657716aa34784
eq (x:t) (y:t)
= (is_finite x /\ is_finite y /\ value x = value y) \/ (is_infinite x /\ is_infinite y /\ same_sign x y)
predicate
eq
stdlib
stdlib/floating_point.mlw
[ "DoubleFormat", "GenFloat", "GenFloatFull", "GenFloatSpecFull", "GenFloatSpecMultiRounding", "GenFloatSpecStrict", "Rounding", "SingleFormat", "SpecialValues", "int.Int", "real.Abs", "real.FromInt", "real.Real", "real.Square" ]
[ "is_finite", "is_infinite", "same_sign", "value" ]
https://gitlab.inria.fr/why3/why3
7c59064b4eed9a4059292599f3a657716aa34784
ne (x:t) (y:t)
= not (eq x y)
predicate
ne
stdlib
stdlib/floating_point.mlw
[ "DoubleFormat", "GenFloat", "GenFloatFull", "GenFloatSpecFull", "GenFloatSpecMultiRounding", "GenFloatSpecStrict", "Rounding", "SingleFormat", "SpecialValues", "int.Int", "real.Abs", "real.FromInt", "real.Real", "real.Square" ]
[ "eq" ]
https://gitlab.inria.fr/why3/why3
7c59064b4eed9a4059292599f3a657716aa34784
le_lt_trans: forall x y z:t. le x y /\ lt y z -> lt x z
lemma
le_lt_trans
stdlib
stdlib/floating_point.mlw
[ "DoubleFormat", "GenFloat", "GenFloatFull", "GenFloatSpecFull", "GenFloatSpecMultiRounding", "GenFloatSpecStrict", "Rounding", "SingleFormat", "SpecialValues", "int.Int", "real.Abs", "real.FromInt", "real.Real", "real.Square" ]
[ "le", "lt" ]
https://gitlab.inria.fr/why3/why3
7c59064b4eed9a4059292599f3a657716aa34784
lt_le_trans: forall x y z:t. lt x y /\ le y z -> lt x z
lemma
lt_le_trans
stdlib
stdlib/floating_point.mlw
[ "DoubleFormat", "GenFloat", "GenFloatFull", "GenFloatSpecFull", "GenFloatSpecMultiRounding", "GenFloatSpecStrict", "Rounding", "SingleFormat", "SpecialValues", "int.Int", "real.Abs", "real.FromInt", "real.Real", "real.Square" ]
[ "le", "lt" ]
https://gitlab.inria.fr/why3/why3
7c59064b4eed9a4059292599f3a657716aa34784
le_ge_asym: forall x y:t. le x y /\ ge x y -> eq x y
lemma
le_ge_asym
stdlib
stdlib/floating_point.mlw
[ "DoubleFormat", "GenFloat", "GenFloatFull", "GenFloatSpecFull", "GenFloatSpecMultiRounding", "GenFloatSpecStrict", "Rounding", "SingleFormat", "SpecialValues", "int.Int", "real.Abs", "real.FromInt", "real.Real", "real.Square" ]
[ "eq", "ge", "le" ]
https://gitlab.inria.fr/why3/why3
7c59064b4eed9a4059292599f3a657716aa34784
not_lt_ge: forall x y:t. not (lt x y) /\ is_not_NaN x /\ is_not_NaN y -> ge x y
lemma
not_lt_ge
stdlib
stdlib/floating_point.mlw
[ "DoubleFormat", "GenFloat", "GenFloatFull", "GenFloatSpecFull", "GenFloatSpecMultiRounding", "GenFloatSpecStrict", "Rounding", "SingleFormat", "SpecialValues", "int.Int", "real.Abs", "real.FromInt", "real.Real", "real.Square" ]
[ "ge", "is_not_NaN", "lt" ]
https://gitlab.inria.fr/why3/why3
7c59064b4eed9a4059292599f3a657716aa34784
not_gt_le: forall x y:t. not (gt x y) /\ is_not_NaN x /\ is_not_NaN y -> le x y
lemma
not_gt_le
stdlib
stdlib/floating_point.mlw
[ "DoubleFormat", "GenFloat", "GenFloatFull", "GenFloatSpecFull", "GenFloatSpecMultiRounding", "GenFloatSpecStrict", "Rounding", "SingleFormat", "SpecialValues", "int.Int", "real.Abs", "real.FromInt", "real.Real", "real.Square" ]
[ "gt", "is_not_NaN", "le" ]
https://gitlab.inria.fr/why3/why3
7c59064b4eed9a4059292599f3a657716aa34784
min_single : real
= 0x1p-149
constant
min_single
stdlib
stdlib/floating_point.mlw
[ "DoubleFormat", "GenFloat", "GenFloatFull", "GenFloatSpecFull", "GenFloatSpecMultiRounding", "GenFloatSpecStrict", "Rounding", "SingleFormat", "SpecialValues", "int.Int", "real.Abs", "real.FromInt", "real.Real", "real.Square" ]
[]
https://gitlab.inria.fr/why3/why3
7c59064b4eed9a4059292599f3a657716aa34784
min_double : real
= 0x1p-1074
constant
min_double
stdlib
stdlib/floating_point.mlw
[ "DoubleFormat", "GenFloat", "GenFloatFull", "GenFloatSpecFull", "GenFloatSpecMultiRounding", "GenFloatSpecStrict", "Rounding", "SingleFormat", "SpecialValues", "int.Int", "real.Abs", "real.FromInt", "real.Real", "real.Square" ]
[]
https://gitlab.inria.fr/why3/why3
7c59064b4eed9a4059292599f3a657716aa34784
min_normalized : real
constant
min_normalized
stdlib
stdlib/floating_point.mlw
[ "DoubleFormat", "GenFloat", "GenFloatFull", "GenFloatSpecFull", "GenFloatSpecMultiRounding", "GenFloatSpecStrict", "Rounding", "SingleFormat", "SpecialValues", "int.Int", "real.Abs", "real.FromInt", "real.Real", "real.Square" ]
[]
{3 binary operations}
https://gitlab.inria.fr/why3/why3
7c59064b4eed9a4059292599f3a657716aa34784
eps_normalized : real
constant
eps_normalized
stdlib
stdlib/floating_point.mlw
[ "DoubleFormat", "GenFloat", "GenFloatFull", "GenFloatSpecFull", "GenFloatSpecMultiRounding", "GenFloatSpecStrict", "Rounding", "SingleFormat", "SpecialValues", "int.Int", "real.Abs", "real.FromInt", "real.Real", "real.Square" ]
[]
https://gitlab.inria.fr/why3/why3
7c59064b4eed9a4059292599f3a657716aa34784
eta_normalized : real
constant
eta_normalized
stdlib
stdlib/floating_point.mlw
[ "DoubleFormat", "GenFloat", "GenFloatFull", "GenFloatSpecFull", "GenFloatSpecMultiRounding", "GenFloatSpecStrict", "Rounding", "SingleFormat", "SpecialValues", "int.Int", "real.Abs", "real.FromInt", "real.Real", "real.Square" ]
[]
https://gitlab.inria.fr/why3/why3
7c59064b4eed9a4059292599f3a657716aa34784
add_post (_m:mode) (x y res:t)
= ((* CASE 1 : normalized numbers *) (abs(value x + value y) >= min_normalized -> abs(value res - (value x + value y)) <= eps_normalized * abs(value x + value y)) /\ (*CASE 2: denormalized numbers *) (abs(value x + value y) <= min_normalized -> abs(value res - (value x + value y)) <=...
predicate
add_post
stdlib
stdlib/floating_point.mlw
[ "DoubleFormat", "GenFloat", "GenFloatFull", "GenFloatSpecFull", "GenFloatSpecMultiRounding", "GenFloatSpecStrict", "Rounding", "SingleFormat", "SpecialValues", "int.Int", "real.Abs", "real.FromInt", "real.Real", "real.Square" ]
[ "abs", "eps_normalized", "eta_normalized", "exact", "min_normalized", "mode", "model", "value" ]
https://gitlab.inria.fr/why3/why3
7c59064b4eed9a4059292599f3a657716aa34784
sub_post (_m:mode) (x y res:t)
= ((* CASE 1 : normalized numbers *) (abs(value x - value y) >= min_normalized -> abs(value res - (value x - value y)) <= eps_normalized * abs(value x - value y)) /\ (*CASE 2: denormalized numbers *) (abs(value x - value y) <= min_normalized -> abs(value res - (value x - value y)) <=...
predicate
sub_post
stdlib
stdlib/floating_point.mlw
[ "DoubleFormat", "GenFloat", "GenFloatFull", "GenFloatSpecFull", "GenFloatSpecMultiRounding", "GenFloatSpecStrict", "Rounding", "SingleFormat", "SpecialValues", "int.Int", "real.Abs", "real.FromInt", "real.Real", "real.Square" ]
[ "abs", "eps_normalized", "eta_normalized", "exact", "min_normalized", "mode", "model", "value" ]
https://gitlab.inria.fr/why3/why3
7c59064b4eed9a4059292599f3a657716aa34784
mul_post (_m:mode) (x y res:t)
= ((* CASE 1 : normalized numbers *) (abs(value x * value y) >= min_normalized -> abs(value res - (value x * value y)) <= eps_normalized * abs(value x * value y)) /\ (*CASE 2: denormalized numbers *) (abs(value x * value y) <= min_normalized -> abs(value res - (value x * value y)) <=...
predicate
mul_post
stdlib
stdlib/floating_point.mlw
[ "DoubleFormat", "GenFloat", "GenFloatFull", "GenFloatSpecFull", "GenFloatSpecMultiRounding", "GenFloatSpecStrict", "Rounding", "SingleFormat", "SpecialValues", "int.Int", "real.Abs", "real.FromInt", "real.Real", "real.Square" ]
[ "abs", "eps_normalized", "eta_normalized", "exact", "min_normalized", "mode", "model", "value" ]
https://gitlab.inria.fr/why3/why3
7c59064b4eed9a4059292599f3a657716aa34784
neg_post (_m:mode) (x res:t)
= ((abs(value x) >= min_normalized -> abs(value res - (- value x)) <= eps_normalized * abs(- value x)) /\ (abs(value x) <= min_normalized -> abs(value res - (- value x)) <= eta_normalized)) /\ exact res = - exact x /\ model res = - model x
predicate
neg_post
stdlib
stdlib/floating_point.mlw
[ "DoubleFormat", "GenFloat", "GenFloatFull", "GenFloatSpecFull", "GenFloatSpecMultiRounding", "GenFloatSpecStrict", "Rounding", "SingleFormat", "SpecialValues", "int.Int", "real.Abs", "real.FromInt", "real.Real", "real.Square" ]
[ "abs", "eps_normalized", "eta_normalized", "exact", "min_normalized", "mode", "model", "value" ]
https://gitlab.inria.fr/why3/why3
7c59064b4eed9a4059292599f3a657716aa34784
of_real_exact_post (x:real) (r:t)
= value r = x /\ exact r = x /\ model r = x
predicate
of_real_exact_post
stdlib
stdlib/floating_point.mlw
[ "DoubleFormat", "GenFloat", "GenFloatFull", "GenFloatSpecFull", "GenFloatSpecMultiRounding", "GenFloatSpecStrict", "Rounding", "SingleFormat", "SpecialValues", "int.Int", "real.Abs", "real.FromInt", "real.Real", "real.Square" ]
[ "exact", "model", "value" ]
https://gitlab.inria.fr/why3/why3
7c59064b4eed9a4059292599f3a657716aa34784
min_normalized_double : real
= 0x1p-1022
constant
min_normalized_double
stdlib
stdlib/floating_point.mlw
[ "DoubleFormat", "GenFloat", "GenFloatFull", "GenFloatSpecFull", "GenFloatSpecMultiRounding", "GenFloatSpecStrict", "Rounding", "SingleFormat", "SpecialValues", "int.Int", "real.Abs", "real.FromInt", "real.Real", "real.Square" ]
[]
https://gitlab.inria.fr/why3/why3
7c59064b4eed9a4059292599f3a657716aa34784
eps_normalized_double : real
= 0x1.004p-53
constant
eps_normalized_double
stdlib
stdlib/floating_point.mlw
[ "DoubleFormat", "GenFloat", "GenFloatFull", "GenFloatSpecFull", "GenFloatSpecMultiRounding", "GenFloatSpecStrict", "Rounding", "SingleFormat", "SpecialValues", "int.Int", "real.Abs", "real.FromInt", "real.Real", "real.Square" ]
[]
https://gitlab.inria.fr/why3/why3
7c59064b4eed9a4059292599f3a657716aa34784