summaryrefslogtreecommitdiff
path: root/lib/GSL/Special/Gamma.hs
diff options
context:
space:
mode:
authorAlberto Ruiz <aruiz@um.es>2007-07-28 10:44:43 +0000
committerAlberto Ruiz <aruiz@um.es>2007-07-28 10:44:43 +0000
commit774924233c87a20c31a3232cbd01d9bf5170a951 (patch)
tree944efe08c6b0921b5b7e496f9e96e5ca4389e5fb /lib/GSL/Special/Gamma.hs
parent34b094b7589bf400114d802549fcba3ce1481683 (diff)
a few automatic wrappers
Diffstat (limited to 'lib/GSL/Special/Gamma.hs')
-rw-r--r--lib/GSL/Special/Gamma.hs277
1 files changed, 277 insertions, 0 deletions
diff --git a/lib/GSL/Special/Gamma.hs b/lib/GSL/Special/Gamma.hs
new file mode 100644
index 0000000..4586cb5
--- /dev/null
+++ b/lib/GSL/Special/Gamma.hs
@@ -0,0 +1,277 @@
1------------------------------------------------------------
2{- |
3Module : GSL.Special.Gamma
4Copyright : (c) Alberto Ruiz 2006
5License : GPL-style
6Maintainer : Alberto Ruiz (aruiz at um dot es)
7Stability : provisional
8Portability : uses ffi
9
10Wrappers for selected functions described at:
11
12<http://www.gnu.org/software/gsl/manual/html_node/Gamma-and-Beta-Functions.html>
13
14
15-}
16------------------------------------------------------------
17
18module GSL.Special.Gamma(
19 lngamma_e
20, lngamma
21, gamma_e
22, gamma
23, gammastar_e
24, gammastar
25, gammainv_e
26, gammainv
27, taylorcoeff_e
28, taylorcoeff
29, fact_e
30, fact
31, doublefact_e
32, doublefact
33, lnfact_e
34, lnfact
35, lndoublefact_e
36, lndoublefact
37, lnchoose_e
38, lnchoose
39, choose_e
40, choose
41, lnpoch_e
42, lnpoch
43, poch_e
44, poch
45, pochrel_e
46, pochrel
47, gamma_inc_Q_e
48, gamma_inc_Q
49, gamma_inc_P_e
50, gamma_inc_P
51, gamma_inc_e
52, gamma_inc
53, lnbeta_e
54, lnbeta
55, beta_e
56, beta
57, beta_inc_e
58, beta_inc
59) where
60
61import Foreign(Ptr)
62import GSL.Special.Internal
63
64-- | wrapper for int gsl_sf_lngamma_e(double x,gsl_sf_result* result);
65lngamma_e :: Double -> (Double,Double)
66lngamma_e x = createSFR "lngamma_e" $ gsl_sf_lngamma_e x
67foreign import ccall "gamma.h gsl_sf_lngamma_e" gsl_sf_lngamma_e :: Double -> Ptr Double -> IO(Int)
68
69-- | wrapper for double gsl_sf_lngamma(double x);
70lngamma :: Double -> Double
71lngamma = gsl_sf_lngamma
72foreign import ccall "gamma.h gsl_sf_lngamma" gsl_sf_lngamma :: Double -> Double
73
74-- | wrapper for int gsl_sf_lngamma_sgn_e(double x,gsl_sf_result* result_lg,double* sgn);
75lngamma_sgn_e :: Double -> Ptr Double -> Ptr Double -> Int
76lngamma_sgn_e = gsl_sf_lngamma_sgn_e
77foreign import ccall "gamma.h gsl_sf_lngamma_sgn_e" gsl_sf_lngamma_sgn_e :: Double -> Ptr Double -> Ptr Double -> Int
78
79-- | wrapper for int gsl_sf_gamma_e(double x,gsl_sf_result* result);
80gamma_e :: Double -> (Double,Double)
81gamma_e x = createSFR "gamma_e" $ gsl_sf_gamma_e x
82foreign import ccall "gamma.h gsl_sf_gamma_e" gsl_sf_gamma_e :: Double -> Ptr Double -> IO(Int)
83
84-- | wrapper for double gsl_sf_gamma(double x);
85gamma :: Double -> Double
86gamma = gsl_sf_gamma
87foreign import ccall "gamma.h gsl_sf_gamma" gsl_sf_gamma :: Double -> Double
88
89-- | wrapper for int gsl_sf_gammastar_e(double x,gsl_sf_result* result);
90gammastar_e :: Double -> (Double,Double)
91gammastar_e x = createSFR "gammastar_e" $ gsl_sf_gammastar_e x
92foreign import ccall "gamma.h gsl_sf_gammastar_e" gsl_sf_gammastar_e :: Double -> Ptr Double -> IO(Int)
93
94-- | wrapper for double gsl_sf_gammastar(double x);
95gammastar :: Double -> Double
96gammastar = gsl_sf_gammastar
97foreign import ccall "gamma.h gsl_sf_gammastar" gsl_sf_gammastar :: Double -> Double
98
99-- | wrapper for int gsl_sf_gammainv_e(double x,gsl_sf_result* result);
100gammainv_e :: Double -> (Double,Double)
101gammainv_e x = createSFR "gammainv_e" $ gsl_sf_gammainv_e x
102foreign import ccall "gamma.h gsl_sf_gammainv_e" gsl_sf_gammainv_e :: Double -> Ptr Double -> IO(Int)
103
104-- | wrapper for double gsl_sf_gammainv(double x);
105gammainv :: Double -> Double
106gammainv = gsl_sf_gammainv
107foreign import ccall "gamma.h gsl_sf_gammainv" gsl_sf_gammainv :: Double -> Double
108
109-- | wrapper for int gsl_sf_lngamma_complex_e(double zr,double zi,gsl_sf_result* lnr,gsl_sf_result* arg);
110lngamma_complex_e :: Double -> Double -> Ptr Double -> (Double,Double)
111lngamma_complex_e zr zi lnr = createSFR "lngamma_complex_e" $ gsl_sf_lngamma_complex_e zr zi lnr
112foreign import ccall "gamma.h gsl_sf_lngamma_complex_e" gsl_sf_lngamma_complex_e :: Double -> Double -> Ptr Double -> Ptr Double -> IO(Int)
113
114-- | wrapper for int gsl_sf_taylorcoeff_e(int n,double x,gsl_sf_result* result);
115taylorcoeff_e :: Int -> Double -> (Double,Double)
116taylorcoeff_e n x = createSFR "taylorcoeff_e" $ gsl_sf_taylorcoeff_e n x
117foreign import ccall "gamma.h gsl_sf_taylorcoeff_e" gsl_sf_taylorcoeff_e :: Int -> Double -> Ptr Double -> IO(Int)
118
119-- | wrapper for double gsl_sf_taylorcoeff(int n,double x);
120taylorcoeff :: Int -> Double -> Double
121taylorcoeff = gsl_sf_taylorcoeff
122foreign import ccall "gamma.h gsl_sf_taylorcoeff" gsl_sf_taylorcoeff :: Int -> Double -> Double
123
124-- | wrapper for int gsl_sf_fact_e(int n,gsl_sf_result* result);
125fact_e :: Int -> (Double,Double)
126fact_e n = createSFR "fact_e" $ gsl_sf_fact_e n
127foreign import ccall "gamma.h gsl_sf_fact_e" gsl_sf_fact_e :: Int -> Ptr Double -> IO(Int)
128
129-- | wrapper for double gsl_sf_fact(int n);
130fact :: Int -> Double
131fact = gsl_sf_fact
132foreign import ccall "gamma.h gsl_sf_fact" gsl_sf_fact :: Int -> Double
133
134-- | wrapper for int gsl_sf_doublefact_e(int n,gsl_sf_result* result);
135doublefact_e :: Int -> (Double,Double)
136doublefact_e n = createSFR "doublefact_e" $ gsl_sf_doublefact_e n
137foreign import ccall "gamma.h gsl_sf_doublefact_e" gsl_sf_doublefact_e :: Int -> Ptr Double -> IO(Int)
138
139-- | wrapper for double gsl_sf_doublefact(int n);
140doublefact :: Int -> Double
141doublefact = gsl_sf_doublefact
142foreign import ccall "gamma.h gsl_sf_doublefact" gsl_sf_doublefact :: Int -> Double
143
144-- | wrapper for int gsl_sf_lnfact_e(int n,gsl_sf_result* result);
145lnfact_e :: Int -> (Double,Double)
146lnfact_e n = createSFR "lnfact_e" $ gsl_sf_lnfact_e n
147foreign import ccall "gamma.h gsl_sf_lnfact_e" gsl_sf_lnfact_e :: Int -> Ptr Double -> IO(Int)
148
149-- | wrapper for double gsl_sf_lnfact(int n);
150lnfact :: Int -> Double
151lnfact = gsl_sf_lnfact
152foreign import ccall "gamma.h gsl_sf_lnfact" gsl_sf_lnfact :: Int -> Double
153
154-- | wrapper for int gsl_sf_lndoublefact_e(int n,gsl_sf_result* result);
155lndoublefact_e :: Int -> (Double,Double)
156lndoublefact_e n = createSFR "lndoublefact_e" $ gsl_sf_lndoublefact_e n
157foreign import ccall "gamma.h gsl_sf_lndoublefact_e" gsl_sf_lndoublefact_e :: Int -> Ptr Double -> IO(Int)
158
159-- | wrapper for double gsl_sf_lndoublefact(int n);
160lndoublefact :: Int -> Double
161lndoublefact = gsl_sf_lndoublefact
162foreign import ccall "gamma.h gsl_sf_lndoublefact" gsl_sf_lndoublefact :: Int -> Double
163
164-- | wrapper for int gsl_sf_lnchoose_e(int n,int m,gsl_sf_result* result);
165lnchoose_e :: Int -> Int -> (Double,Double)
166lnchoose_e n m = createSFR "lnchoose_e" $ gsl_sf_lnchoose_e n m
167foreign import ccall "gamma.h gsl_sf_lnchoose_e" gsl_sf_lnchoose_e :: Int -> Int -> Ptr Double -> IO(Int)
168
169-- | wrapper for double gsl_sf_lnchoose(int n,int m);
170lnchoose :: Int -> Int -> Double
171lnchoose = gsl_sf_lnchoose
172foreign import ccall "gamma.h gsl_sf_lnchoose" gsl_sf_lnchoose :: Int -> Int -> Double
173
174-- | wrapper for int gsl_sf_choose_e(int n,int m,gsl_sf_result* result);
175choose_e :: Int -> Int -> (Double,Double)
176choose_e n m = createSFR "choose_e" $ gsl_sf_choose_e n m
177foreign import ccall "gamma.h gsl_sf_choose_e" gsl_sf_choose_e :: Int -> Int -> Ptr Double -> IO(Int)
178
179-- | wrapper for double gsl_sf_choose(int n,int m);
180choose :: Int -> Int -> Double
181choose = gsl_sf_choose
182foreign import ccall "gamma.h gsl_sf_choose" gsl_sf_choose :: Int -> Int -> Double
183
184-- | wrapper for int gsl_sf_lnpoch_e(double a,double x,gsl_sf_result* result);
185lnpoch_e :: Double -> Double -> (Double,Double)
186lnpoch_e a x = createSFR "lnpoch_e" $ gsl_sf_lnpoch_e a x
187foreign import ccall "gamma.h gsl_sf_lnpoch_e" gsl_sf_lnpoch_e :: Double -> Double -> Ptr Double -> IO(Int)
188
189-- | wrapper for double gsl_sf_lnpoch(double a,double x);
190lnpoch :: Double -> Double -> Double
191lnpoch = gsl_sf_lnpoch
192foreign import ccall "gamma.h gsl_sf_lnpoch" gsl_sf_lnpoch :: Double -> Double -> Double
193
194-- | wrapper for int gsl_sf_lnpoch_sgn_e(double a,double x,gsl_sf_result* result,double* sgn);
195lnpoch_sgn_e :: Double -> Double -> Ptr Double -> Ptr Double -> Int
196lnpoch_sgn_e = gsl_sf_lnpoch_sgn_e
197foreign import ccall "gamma.h gsl_sf_lnpoch_sgn_e" gsl_sf_lnpoch_sgn_e :: Double -> Double -> Ptr Double -> Ptr Double -> Int
198
199-- | wrapper for int gsl_sf_poch_e(double a,double x,gsl_sf_result* result);
200poch_e :: Double -> Double -> (Double,Double)
201poch_e a x = createSFR "poch_e" $ gsl_sf_poch_e a x
202foreign import ccall "gamma.h gsl_sf_poch_e" gsl_sf_poch_e :: Double -> Double -> Ptr Double -> IO(Int)
203
204-- | wrapper for double gsl_sf_poch(double a,double x);
205poch :: Double -> Double -> Double
206poch = gsl_sf_poch
207foreign import ccall "gamma.h gsl_sf_poch" gsl_sf_poch :: Double -> Double -> Double
208
209-- | wrapper for int gsl_sf_pochrel_e(double a,double x,gsl_sf_result* result);
210pochrel_e :: Double -> Double -> (Double,Double)
211pochrel_e a x = createSFR "pochrel_e" $ gsl_sf_pochrel_e a x
212foreign import ccall "gamma.h gsl_sf_pochrel_e" gsl_sf_pochrel_e :: Double -> Double -> Ptr Double -> IO(Int)
213
214-- | wrapper for double gsl_sf_pochrel(double a,double x);
215pochrel :: Double -> Double -> Double
216pochrel = gsl_sf_pochrel
217foreign import ccall "gamma.h gsl_sf_pochrel" gsl_sf_pochrel :: Double -> Double -> Double
218
219-- | wrapper for int gsl_sf_gamma_inc_Q_e(double a,double x,gsl_sf_result* result);
220gamma_inc_Q_e :: Double -> Double -> (Double,Double)
221gamma_inc_Q_e a x = createSFR "gamma_inc_Q_e" $ gsl_sf_gamma_inc_Q_e a x
222foreign import ccall "gamma.h gsl_sf_gamma_inc_Q_e" gsl_sf_gamma_inc_Q_e :: Double -> Double -> Ptr Double -> IO(Int)
223
224-- | wrapper for double gsl_sf_gamma_inc_Q(double a,double x);
225gamma_inc_Q :: Double -> Double -> Double
226gamma_inc_Q = gsl_sf_gamma_inc_Q
227foreign import ccall "gamma.h gsl_sf_gamma_inc_Q" gsl_sf_gamma_inc_Q :: Double -> Double -> Double
228
229-- | wrapper for int gsl_sf_gamma_inc_P_e(double a,double x,gsl_sf_result* result);
230gamma_inc_P_e :: Double -> Double -> (Double,Double)
231gamma_inc_P_e a x = createSFR "gamma_inc_P_e" $ gsl_sf_gamma_inc_P_e a x
232foreign import ccall "gamma.h gsl_sf_gamma_inc_P_e" gsl_sf_gamma_inc_P_e :: Double -> Double -> Ptr Double -> IO(Int)
233
234-- | wrapper for double gsl_sf_gamma_inc_P(double a,double x);
235gamma_inc_P :: Double -> Double -> Double
236gamma_inc_P = gsl_sf_gamma_inc_P
237foreign import ccall "gamma.h gsl_sf_gamma_inc_P" gsl_sf_gamma_inc_P :: Double -> Double -> Double
238
239-- | wrapper for int gsl_sf_gamma_inc_e(double a,double x,gsl_sf_result* result);
240gamma_inc_e :: Double -> Double -> (Double,Double)
241gamma_inc_e a x = createSFR "gamma_inc_e" $ gsl_sf_gamma_inc_e a x
242foreign import ccall "gamma.h gsl_sf_gamma_inc_e" gsl_sf_gamma_inc_e :: Double -> Double -> Ptr Double -> IO(Int)
243
244-- | wrapper for double gsl_sf_gamma_inc(double a,double x);
245gamma_inc :: Double -> Double -> Double
246gamma_inc = gsl_sf_gamma_inc
247foreign import ccall "gamma.h gsl_sf_gamma_inc" gsl_sf_gamma_inc :: Double -> Double -> Double
248
249-- | wrapper for int gsl_sf_lnbeta_e(double a,double b,gsl_sf_result* result);
250lnbeta_e :: Double -> Double -> (Double,Double)
251lnbeta_e a b = createSFR "lnbeta_e" $ gsl_sf_lnbeta_e a b
252foreign import ccall "gamma.h gsl_sf_lnbeta_e" gsl_sf_lnbeta_e :: Double -> Double -> Ptr Double -> IO(Int)
253
254-- | wrapper for double gsl_sf_lnbeta(double a,double b);
255lnbeta :: Double -> Double -> Double
256lnbeta = gsl_sf_lnbeta
257foreign import ccall "gamma.h gsl_sf_lnbeta" gsl_sf_lnbeta :: Double -> Double -> Double
258
259-- | wrapper for int gsl_sf_beta_e(double a,double b,gsl_sf_result* result);
260beta_e :: Double -> Double -> (Double,Double)
261beta_e a b = createSFR "beta_e" $ gsl_sf_beta_e a b
262foreign import ccall "gamma.h gsl_sf_beta_e" gsl_sf_beta_e :: Double -> Double -> Ptr Double -> IO(Int)
263
264-- | wrapper for double gsl_sf_beta(double a,double b);
265beta :: Double -> Double -> Double
266beta = gsl_sf_beta
267foreign import ccall "gamma.h gsl_sf_beta" gsl_sf_beta :: Double -> Double -> Double
268
269-- | wrapper for int gsl_sf_beta_inc_e(double a,double b,double x,gsl_sf_result* result);
270beta_inc_e :: Double -> Double -> Double -> (Double,Double)
271beta_inc_e a b x = createSFR "beta_inc_e" $ gsl_sf_beta_inc_e a b x
272foreign import ccall "gamma.h gsl_sf_beta_inc_e" gsl_sf_beta_inc_e :: Double -> Double -> Double -> Ptr Double -> IO(Int)
273
274-- | wrapper for double gsl_sf_beta_inc(double a,double b,double x);
275beta_inc :: Double -> Double -> Double -> Double
276beta_inc = gsl_sf_beta_inc
277foreign import ccall "gamma.h gsl_sf_beta_inc" gsl_sf_beta_inc :: Double -> Double -> Double -> Double