-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathrounding.mli
54 lines (36 loc) · 1.67 KB
/
rounding.mli
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
(* ========================================================================== *)
(* FPTaylor: A Tool for Rigorous Estimation of Round-off Errors *)
(* *)
(* Author: Alexey Solovyev, University of Utah *)
(* *)
(* This file is distributed under the terms of the MIT license *)
(* ========================================================================== *)
(* -------------------------------------------------------------------------- *)
(* Parameters for rounding operations *)
(* -------------------------------------------------------------------------- *)
type value_type
type rnd_type = Rnd_ne | Rnd_up | Rnd_down | Rnd_0
type rnd_info = {
(* Approximation of the maximum value *)
max_val : float;
eps_exp : int;
delta_exp : int;
coefficient : float;
fp_type : value_type;
rnd_type : rnd_type;
special_flag : bool;
}
val mk_value_type : int -> value_type
val real_type : value_type
val string_to_value_type : string -> value_type
val value_type_to_string : value_type -> string
val is_subtype : value_type -> value_type -> bool
val is_no_rnd : rnd_info -> bool
val type_size : value_type -> int
val type_precision : value_type -> int
val type_min_exp : value_type -> int
val create_rounding : int -> string -> float -> rnd_info
val create_explicit_rounding : int -> string -> float -> int -> int -> rnd_info
val string_to_rounding : string -> rnd_info
val rounding_to_string : rnd_info -> string
val get_eps : int -> float