forked from soarlab/FPTaylor
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfpu_rename_all.mli
More file actions
executable file
·97 lines (69 loc) · 2.78 KB
/
fpu_rename_all.mli
File metadata and controls
executable file
·97 lines (69 loc) · 2.78 KB
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
(*
Copyright 2011 Jean-Marc Alliot / Jean-Baptiste Gotteland
This file is part of the ocaml interval library.
The ocaml interval library is free software:
you can redistribute it and/or modify it under the terms of
the GNU Lesser General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
The ocaml interval library is distributed in the hope that it will be
useful,but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with the ocaml interval library.
If not, see <http://www.gnu.org/licenses/>.
*)
(**
Aliases floating point functions to their "constant" counterparts.
As described in the [Fpu] module documentation, there are problems when mixing
some C-lib or ocaml native functions with interval programming on 64 bits machine.
The standard floating point functions results will always lie in the [low; high]
interval computed by the Fpu module, but they are slightly different on 32 and 64
bits machines.
Using [Open Fpu_rename_all] at the beginning of your program guarantees that floating
computation will give the same results on 32 and 64 bits machines. This is not
mandatory but might help.
NB: while most transcendantal function are almost as fast, and sometimes faster than
their "standard" ocaml counterparts, +. -. *. and /. are much slower (from 50% to 100%
depending on the processor. If you want to rename transcendantal functions but not
+. -. *. and /. then use the [Fpu_rename] module.
*)
val (+.) : float -> float -> float
(** Computes x + y *)
val (-.) : float -> float -> float
(** Computes x - y *)
val (/.) : float -> float -> float
(** Computes x / y *)
val ( *.) : float -> float -> float
(** Computes x * y *)
val mod_float : float -> float -> float
(** Computes x mod y *)
val sqrt : float -> float
(** square root function*)
val log : float -> float
(** log function *)
val exp : float -> float
(** exp function *)
val ( ** ) : float -> float -> float
(** Computes x^y *)
val cos : float -> float
(** Computes cos(x) for x in \[-2^63, 2^63\] *)
val sin : float -> float
(** Computes sin(x) for x in \[-2^63, 2^63\] *)
val tan : float -> float
(** Computes tan(x) for x in \[-2^63, 2^63\] *)
val asin : float -> float
(** arc-sinus function *)
val acos : float -> float
(** arc-cosine function *)
val atan2 : float -> float -> float
(** atan2 function *)
val atan : float -> float
(** arc-tan function *)
val cosh: float -> float
(** cosh function *)
val sinh: float -> float
(** sinh function *)
val tanh: float -> float
(** tanh function *)