File: remove-sinh-primitive.patch

package info (click to toggle)
ocaml 5.4.0-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 44,372 kB
  • sloc: ml: 370,196; ansic: 52,820; sh: 27,396; asm: 5,462; makefile: 3,679; python: 974; awk: 278; javascript: 273; perl: 59; fortran: 21; cs: 9
file content (77 lines) | stat: -rw-r--r-- 2,928 bytes parent folder | download | duplicates (3)
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
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/runtime/floats.c b/runtime/floats.c
index 7561bfba8..db246978c 100644
--- a/runtime/floats.c
+++ b/runtime/floats.c
@@ -858,11 +858,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 ab5cd5c07..e09cbe215 100644
--- a/stdlib/float.ml
+++ b/stdlib/float.ml
@@ -85,8 +85,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 acosh : float -> float = "caml_acosh_float" "caml_acosh"
diff --git a/stdlib/float.mli b/stdlib/float.mli
index ba84d9b0e..8132f93f7 100644
--- a/stdlib/float.mli
+++ b/stdlib/float.mli
@@ -285,10 +285,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/stdlib.ml b/stdlib/stdlib.ml
index aac8fcc17..663ce44f2 100644
--- a/stdlib/stdlib.ml
+++ b/stdlib/stdlib.ml
@@ -146,8 +146,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 asinh : float -> float = "caml_asinh_float" "caml_asinh"
   [@@unboxed] [@@noalloc]
 external sqrt : float -> float = "caml_sqrt_float" "sqrt"
diff --git a/stdlib/stdlib.mli b/stdlib/stdlib.mli
index e2e898266..2e18f16d3 100644
--- a/stdlib/stdlib.mli
+++ b/stdlib/stdlib.mli
@@ -556,10 +556,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. *)