package owl

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Source file owl_maths_special.ml

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
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
# 1 "src/owl/maths/owl_maths_special.ml"
(*
 * OWL - OCaml Scientific and Engineering Computing
 * Copyright (c) 2016-2019 Liang Wang <liang.wang@cl.cam.ac.uk>
 *)

module CI = Cstubs_internals


(* Airy functions *)

external airy : float -> _ CI.fatptr -> _ CI.fatptr -> _ CI.fatptr -> _ CI.fatptr -> int = "stub_sf_airy"

let airy x ai aip bi bip = airy x (CI.cptr ai) (CI.cptr aip) (CI.cptr bi) (CI.cptr bip)


(* Elliptic Functions *)

external ellipj : float -> float -> _ CI.fatptr -> _ CI.fatptr -> _ CI.fatptr -> _ CI.fatptr -> int = "stub_sf_ellipj_byte6" "stub_sf_ellipj"

let ellipj u m sn cn dn phi = ellipj u m (CI.cptr sn) (CI.cptr cn) (CI.cptr dn) (CI.cptr phi)

external ellipk : float -> float = "owl_stub_sf_ellipk"

external ellipkm1 : float -> float = "owl_stub_sf_ellipkm1"

external ellipkinc : float -> float -> float = "owl_stub_sf_ellipkinc"

external ellipe : float -> float = "owl_stub_sf_ellipe"

external ellipeinc : float -> float -> float = "owl_stub_sf_ellipeinc"


(* Bessel functions *)

external j0 : float -> float = "owl_stub_sf_j0"

external j1 : float -> float = "owl_stub_sf_j1"

external jv : float -> float -> float = "owl_stub_sf_jv"

external y0 : float -> float = "owl_stub_sf_y0"

external y1 : float -> float = "owl_stub_sf_y1"

external yv : float -> float -> float = "owl_stub_sf_yv"

external yn : int -> float -> float = "owl_stub_sf_yn"

external i0 : float -> float = "owl_stub_sf_i0"

external i0e : float -> float = "owl_stub_sf_i0e"

external i1 : float -> float = "owl_stub_sf_i1"

external i1e : float -> float = "owl_stub_sf_i1e"

external iv : float -> float -> float = "owl_stub_sf_iv"

external k0 : float -> float = "owl_stub_sf_k0"

external k0e : float -> float = "owl_stub_sf_k0e"

external k1 : float -> float = "owl_stub_sf_k1"

external k1e : float -> float = "owl_stub_sf_k1e"


(* Gamma functions *)

external gamma : float -> float = "owl_stub_sf_gamma"

external rgamma : float -> float = "owl_stub_sf_rgamma"

external loggamma : float -> float = "owl_stub_sf_loggamma"

external gammainc : float -> float -> float = "owl_stub_sf_gammainc"

external gammaincinv : float -> float -> float = "owl_stub_sf_gammaincinv"

external gammaincc : float -> float -> float = "owl_stub_sf_gammaincc"

external gammainccinv : float -> float -> float = "owl_stub_sf_gammainccinv"

external psi : float -> float = "owl_stub_sf_psi"


(* Beta functions *)

external beta : float -> float -> float = "owl_stub_sf_beta"

external betainc : float -> float -> float -> float = "owl_stub_sf_betainc"

external betaincinv : float -> float -> float -> float = "owl_stub_sf_betaincinv"


(* Error Function and Fresnel Integrals *)

external erf : float -> float = "owl_stub_sf_erf"

external erfc : float -> float = "owl_stub_sf_erfc"

external erfcx : float -> float = "owl_stub_sf_erfcx"

external erfinv : float -> float = "owl_stub_sf_erfinv"

external erfcinv : float -> float = "owl_stub_sf_erfcinv"

external dawsn : float -> float = "owl_stub_sf_dawsn"

external fresnel : float -> _ CI.fatptr -> _ CI.fatptr -> int = "owl_stub_sf_fresnel"

let fresnel x ssa csa = fresnel x (CI.cptr ssa) (CI.cptr csa)


(* Other special functions *)

external expn : int -> float -> float = "owl_stub_sf_expn"

external exp2 : float -> float = "owl_stub_sf_exp2"

external exp10 : float -> float = "owl_stub_sf_exp10"

external expm1 : float -> float = "owl_stub_sf_expm1"

external shichi : float -> _ CI.fatptr -> _ CI.fatptr -> int = "owl_stub_sf_shichi"

let shichi x si ci = shichi x (CI.cptr si) (CI.cptr ci)

external sici : float -> _ CI.fatptr -> _ CI.fatptr -> int = "owl_stub_sf_sici"

let sici x si ci = sici x (CI.cptr si) (CI.cptr ci)

external zeta : float -> float -> float = "owl_stub_sf_zeta"

external zetac : float -> float = "owl_stub_sf_zetac"

external struve : float -> float -> float = "owl_stub_sf_struve"


(* From owl_maths_special_impl.c file *)

external asinh : float -> float = "owl_stub_sf_asinh"

external acosh : float -> float = "owl_stub_sf_acosh"

external atanh : float -> float = "owl_stub_sf_atanh"

external hypot : float -> float -> float = "owl_stub_sf_hypot"

external xlogy : float -> float -> float = "owl_stub_sf_xlogy"

external xlog1py : float -> float -> float = "owl_stub_sf_xlog1py"

external logit : float -> float = "owl_stub_sf_logit"

external expit : float -> float = "owl_stub_sf_expit"

external log1mexp : float -> float = "owl_stub_sf_log1mexp"

external log1pexp : float -> float = "owl_stub_sf_log1pexp"

external logabs : float -> float = "owl_stub_sf_logabs"

external sinc : float -> float = "owl_stub_sf_sinc"

external sindg : float -> float = "owl_stub_sf_sindg"

external cosdg : float -> float = "owl_stub_sf_cosdg"

external tandg : float -> float = "owl_stub_sf_tandg"

external cotdg : float -> float = "owl_stub_sf_cotdg"


(* Raw statistical functions *)

external bdtr : int -> int -> float -> float = "owl_stub_sf_bdtr"

external bdtrc : int -> int -> float -> float = "owl_stub_sf_bdtrc"

external bdtri : int -> int -> float -> float = "owl_stub_sf_bdtri"

external btdtr : float -> float -> float -> float = "owl_stub_sf_btdtr"

external btdtri : float -> float -> float -> float = "owl_stub_sf_btdtri"


(* Factorial functions *)

external fact : int -> float = "owl_stub_sf_fact"

external log_fact : int -> float = "owl_stub_sf_log_fact"

external doublefact : int -> float = "owl_stub_sf_doublefact"

external log_doublefact : int -> float = "owl_stub_sf_log_doublefact"

external combination : int -> int -> float = "owl_stub_sf_combination"

external log_combination : int -> int -> float = "owl_stub_sf_log_combination"


(* Modular arithmetic *)

external mulmod : int -> int -> int -> int = "owl_stub_mulmod"

external powmod : int -> int -> int -> int = "owl_stub_powmod"


(* Other helper functions *)

external nextafter : float -> float -> float = "stub_sf_nextafter"

external nextafterf : float -> float -> float = "stub_sf_nextafterf"
OCaml

Innovation. Community. Security.