summaryrefslogtreecommitdiff
path: root/tools/ci/inria/remove-sinh-primitive.patch
blob: c6a211573cab8fccfe75317c2699899b1c7596ff (plain)
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
98
99
100
101
102
103
The patch below removes the 'sinh' primitive from the OCaml runtime
and standard library.

It is used on Inria's CI to make sure the bootstrap procedure works.

diff --git a/otherlibs/threads/stdlib.ml b/otherlibs/threads/stdlib.ml
index 27cb01e54..eea32ee94 100644
--- a/otherlibs/threads/stdlib.ml
+++ b/otherlibs/threads/stdlib.ml
@@ -152,8 +152,6 @@ external log10 : float -> float = "caml_log10_float" "log10"
 external log1p : float -> float = "caml_log1p_float" "caml_log1p"
   [@@unboxed] [@@noalloc]
 external sin : float -> float = "caml_sin_float" "sin" [@@unboxed] [@@noalloc]
-external sinh : float -> float = "caml_sinh_float" "sinh"
-  [@@unboxed] [@@noalloc]
 external sqrt : float -> float = "caml_sqrt_float" "sqrt"
   [@@unboxed] [@@noalloc]
 external tan : float -> float = "caml_tan_float" "tan" [@@unboxed] [@@noalloc]
diff --git a/runtime/floats.c b/runtime/floats.c
index b93f6a409..6edbed9c6 100644
--- a/runtime/floats.c
+++ b/runtime/floats.c
@@ -536,11 +536,6 @@ CAMLprim value caml_sin_float(value f)
   return caml_copy_double(sin(Double_val(f)));
 }
 
-CAMLprim value caml_sinh_float(value f)
-{
-  return caml_copy_double(sinh(Double_val(f)));
-}
-
 CAMLprim value caml_cos_float(value f)
 {
   return caml_copy_double(cos(Double_val(f)));
diff --git a/stdlib/float.ml b/stdlib/float.ml
index 8d9c5cca6..3b3ca61bc 100644
--- a/stdlib/float.ml
+++ b/stdlib/float.ml
@@ -69,8 +69,6 @@ external hypot : float -> float -> float
                = "caml_hypot_float" "caml_hypot" [@@unboxed] [@@noalloc]
 external cosh : float -> float = "caml_cosh_float" "cosh"
   [@@unboxed] [@@noalloc]
-external sinh : float -> float = "caml_sinh_float" "sinh"
-  [@@unboxed] [@@noalloc]
 external tanh : float -> float = "caml_tanh_float" "tanh"
   [@@unboxed] [@@noalloc]
 external ceil : float -> float = "caml_ceil_float" "ceil"
diff --git a/stdlib/float.mli b/stdlib/float.mli
index 2cdd31608..904f4af0e 100644
--- a/stdlib/float.mli
+++ b/stdlib/float.mli
@@ -196,10 +196,6 @@ external cosh : float -> float = "caml_cosh_float" "cosh"
 [@@unboxed] [@@noalloc]
 (** Hyperbolic cosine.  Argument is in radians. *)
 
-external sinh : float -> float = "caml_sinh_float" "sinh"
-[@@unboxed] [@@noalloc]
-(** Hyperbolic sine.  Argument is in radians. *)
-
 external tanh : float -> float = "caml_tanh_float" "tanh"
 [@@unboxed] [@@noalloc]
 (** Hyperbolic tangent.  Argument is in radians. *)
diff --git a/stdlib/pervasives.ml b/stdlib/pervasives.ml
index 945512716..55bc9e921 100644
--- a/stdlib/pervasives.ml
+++ b/stdlib/pervasives.ml
@@ -97,8 +97,6 @@ external hypot : float -> float -> float = "caml_hypot_float" "caml_hypot"
   [@@unboxed] [@@noalloc]
 external cosh : float -> float = "caml_cosh_float" "cosh"
   [@@unboxed] [@@noalloc]
-external sinh : float -> float = "caml_sinh_float" "sinh"
-  [@@unboxed] [@@noalloc]
 external tanh : float -> float = "caml_tanh_float" "tanh"
   [@@unboxed] [@@noalloc]
 external ceil : float -> float = "caml_ceil_float" "ceil"
diff --git a/stdlib/stdlib.ml b/stdlib/stdlib.ml
index 425728f64..4057dbc90 100644
--- a/stdlib/stdlib.ml
+++ b/stdlib/stdlib.ml
@@ -148,8 +148,6 @@ external log10 : float -> float = "caml_log10_float" "log10"
 external log1p : float -> float = "caml_log1p_float" "caml_log1p"
   [@@unboxed] [@@noalloc]
 external sin : float -> float = "caml_sin_float" "sin" [@@unboxed] [@@noalloc]
-external sinh : float -> float = "caml_sinh_float" "sinh"
-  [@@unboxed] [@@noalloc]
 external sqrt : float -> float = "caml_sqrt_float" "sqrt"
   [@@unboxed] [@@noalloc]
 external tan : float -> float = "caml_tan_float" "tan" [@@unboxed] [@@noalloc]
diff --git a/stdlib/stdlib.mli b/stdlib/stdlib.mli
index d451bba9c..990a41467 100644
--- a/stdlib/stdlib.mli
+++ b/stdlib/stdlib.mli
@@ -461,10 +461,6 @@ external cosh : float -> float = "caml_cosh_float" "cosh"
   [@@unboxed] [@@noalloc]
 (** Hyperbolic cosine.  Argument is in radians. *)
 
-external sinh : float -> float = "caml_sinh_float" "sinh"
-  [@@unboxed] [@@noalloc]
-(** Hyperbolic sine.  Argument is in radians. *)
-
 external tanh : float -> float = "caml_tanh_float" "tanh"
   [@@unboxed] [@@noalloc]
 (** Hyperbolic tangent.  Argument is in radians. *)