summaryrefslogtreecommitdiff
path: root/lib/Numeric/GSL
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Numeric/GSL')
-rw-r--r--lib/Numeric/GSL/Differentiation.hs79
-rw-r--r--lib/Numeric/GSL/Fourier.hs46
-rw-r--r--lib/Numeric/GSL/Integration.hs90
-rw-r--r--lib/Numeric/GSL/Matrix.hs302
-rw-r--r--lib/Numeric/GSL/Minimization.hs213
-rw-r--r--lib/Numeric/GSL/Polynomials.hs54
-rw-r--r--lib/Numeric/GSL/Special.hs74
-rw-r--r--lib/Numeric/GSL/Special/Airy.hs166
-rw-r--r--lib/Numeric/GSL/Special/Bessel.hs809
-rw-r--r--lib/Numeric/GSL/Special/Clausen.hs37
-rw-r--r--lib/Numeric/GSL/Special/Coulomb.hs103
-rw-r--r--lib/Numeric/GSL/Special/Coupling.hs81
-rw-r--r--lib/Numeric/GSL/Special/Dawson.hs37
-rw-r--r--lib/Numeric/GSL/Special/Debye.hs85
-rw-r--r--lib/Numeric/GSL/Special/Dilog.hs58
-rw-r--r--lib/Numeric/GSL/Special/Elementary.hs45
-rw-r--r--lib/Numeric/GSL/Special/Ellint.hs181
-rw-r--r--lib/Numeric/GSL/Special/Erf.hs117
-rw-r--r--lib/Numeric/GSL/Special/Exp.hs129
-rw-r--r--lib/Numeric/GSL/Special/Expint.hs213
-rw-r--r--lib/Numeric/GSL/Special/Fermi_dirac.hs165
-rw-r--r--lib/Numeric/GSL/Special/Gamma.hs362
-rw-r--r--lib/Numeric/GSL/Special/Gegenbauer.hs92
-rw-r--r--lib/Numeric/GSL/Special/Hyperg.hs197
-rw-r--r--lib/Numeric/GSL/Special/Internal.hs68
-rw-r--r--lib/Numeric/GSL/Special/Laguerre.hs85
-rw-r--r--lib/Numeric/GSL/Special/Lambert.hs53
-rw-r--r--lib/Numeric/GSL/Special/Legendre.hs278
-rw-r--r--lib/Numeric/GSL/Special/Log.hs74
-rw-r--r--lib/Numeric/GSL/Special/Pow_int.hs37
-rw-r--r--lib/Numeric/GSL/Special/Psi.hs117
-rw-r--r--lib/Numeric/GSL/Special/Synchrotron.hs53
-rw-r--r--lib/Numeric/GSL/Special/Trig.hs164
-rw-r--r--lib/Numeric/GSL/Special/Zeta.hs133
-rw-r--r--lib/Numeric/GSL/Special/airy.h24
-rw-r--r--lib/Numeric/GSL/Special/auto.hs233
-rw-r--r--lib/Numeric/GSL/Special/autoall.sh41
-rw-r--r--lib/Numeric/GSL/Special/bessel.h100
-rw-r--r--lib/Numeric/GSL/Special/clausen.h2
-rw-r--r--lib/Numeric/GSL/Special/coulomb.h11
-rw-r--r--lib/Numeric/GSL/Special/coupling.h10
-rw-r--r--lib/Numeric/GSL/Special/dawson.h2
-rw-r--r--lib/Numeric/GSL/Special/debye.h8
-rw-r--r--lib/Numeric/GSL/Special/dilog.h5
-rw-r--r--lib/Numeric/GSL/Special/elementary.h3
-rw-r--r--lib/Numeric/GSL/Special/ellint.h20
-rw-r--r--lib/Numeric/GSL/Special/erf.h12
-rw-r--r--lib/Numeric/GSL/Special/exp.h18
-rw-r--r--lib/Numeric/GSL/Special/expint.h24
-rw-r--r--lib/Numeric/GSL/Special/fermi_dirac.h18
-rw-r--r--lib/Numeric/GSL/Special/gamma.h43
-rw-r--r--lib/Numeric/GSL/Special/gegenbauer.h9
-rw-r--r--lib/Numeric/GSL/Special/gsl_sf_exp.h146
-rw-r--r--lib/Numeric/GSL/Special/gsl_sf_log.h90
-rw-r--r--lib/Numeric/GSL/Special/hyperg.h22
-rw-r--r--lib/Numeric/GSL/Special/laguerre.h8
-rw-r--r--lib/Numeric/GSL/Special/lambert.h4
-rw-r--r--lib/Numeric/GSL/Special/legendre.h44
-rw-r--r--lib/Numeric/GSL/Special/log.h9
-rw-r--r--lib/Numeric/GSL/Special/pow_int.h2
-rw-r--r--lib/Numeric/GSL/Special/psi.h12
-rw-r--r--lib/Numeric/GSL/Special/synchrotron.h4
-rw-r--r--lib/Numeric/GSL/Special/trig.h25
-rw-r--r--lib/Numeric/GSL/Special/zeta.h14
-rw-r--r--lib/Numeric/GSL/Vector.hs145
-rw-r--r--lib/Numeric/GSL/gsl-aux.c743
-rw-r--r--lib/Numeric/GSL/gsl-aux.h62
67 files changed, 6710 insertions, 0 deletions
diff --git a/lib/Numeric/GSL/Differentiation.hs b/lib/Numeric/GSL/Differentiation.hs
new file mode 100644
index 0000000..e7fea92
--- /dev/null
+++ b/lib/Numeric/GSL/Differentiation.hs
@@ -0,0 +1,79 @@
1{-# OPTIONS #-}
2-----------------------------------------------------------------------------
3{- |
4Module : Numeric.GSL.Differentiation
5Copyright : (c) Alberto Ruiz 2006
6License : GPL-style
7
8Maintainer : Alberto Ruiz (aruiz at um dot es)
9Stability : provisional
10Portability : uses ffi
11
12Numerical differentiation.
13
14<http://www.gnu.org/software/gsl/manual/html_node/Numerical-Differentiation.html#Numerical-Differentiation>
15
16From the GSL manual: \"The functions described in this chapter compute numerical derivatives by finite differencing. An adaptive algorithm is used to find the best choice of finite difference and to estimate the error in the derivative.\"
17-}
18-----------------------------------------------------------------------------
19module Numeric.GSL.Differentiation (
20 derivCentral,
21 derivForward,
22 derivBackward
23) where
24
25import Foreign
26import Data.Packed.Internal(mkfun,check,(//))
27
28derivGen ::
29 Int -- ^ type: 0 central, 1 forward, 2 backward
30 -> Double -- ^ initial step size
31 -> (Double -> Double) -- ^ function
32 -> Double -- ^ point where the derivative is taken
33 -> (Double, Double) -- ^ result and error
34derivGen c h f x = unsafePerformIO $ do
35 r <- malloc
36 e <- malloc
37 fp <- mkfun (\x _ -> f x)
38 c_deriv c fp x h r e // check "deriv" []
39 vr <- peek r
40 ve <- peek e
41 let result = (vr,ve)
42 free r
43 free e
44 freeHaskellFunPtr fp
45 return result
46
47foreign import ccall "gsl-aux.h deriv"
48 c_deriv :: Int -> FunPtr (Double -> Ptr () -> Double) -> Double -> Double
49 -> Ptr Double -> Ptr Double -> IO Int
50
51
52{- | Adaptive central difference algorithm, /gsl_deriv_central/. For example:
53
54> > let deriv = derivCentral 0.01
55> > deriv sin (pi/4)
56>(0.7071067812000676,1.0600063101654055e-10)
57> > cos (pi/4)
58>0.7071067811865476
59
60-}
61derivCentral :: Double -- ^ initial step size
62 -> (Double -> Double) -- ^ function
63 -> Double -- ^ point where the derivative is taken
64 -> (Double, Double) -- ^ result and absolute error
65derivCentral = derivGen 0
66
67-- | Adaptive forward difference algorithm, /gsl_deriv_forward/. The function is evaluated only at points greater than x, and never at x itself. The derivative is returned in result and an estimate of its absolute error is returned in abserr. This function should be used if f(x) has a discontinuity at x, or is undefined for values less than x. A backward derivative can be obtained using a negative step.
68derivForward :: Double -- ^ initial step size
69 -> (Double -> Double) -- ^ function
70 -> Double -- ^ point where the derivative is taken
71 -> (Double, Double) -- ^ result and absolute error
72derivForward = derivGen 1
73
74-- | Adaptive backward difference algorithm, /gsl_deriv_backward/.
75derivBackward ::Double -- ^ initial step size
76 -> (Double -> Double) -- ^ function
77 -> Double -- ^ point where the derivative is taken
78 -> (Double, Double) -- ^ result and absolute error
79derivBackward = derivGen 2
diff --git a/lib/Numeric/GSL/Fourier.hs b/lib/Numeric/GSL/Fourier.hs
new file mode 100644
index 0000000..e975fbf
--- /dev/null
+++ b/lib/Numeric/GSL/Fourier.hs
@@ -0,0 +1,46 @@
1{-# OPTIONS_GHC -fglasgow-exts #-}
2-----------------------------------------------------------------------------
3{- |
4Module : Numeric.GSL.Fourier
5Copyright : (c) Alberto Ruiz 2006
6License : GPL-style
7
8Maintainer : Alberto Ruiz (aruiz at um dot es)
9Stability : provisional
10Portability : uses ffi
11
12Fourier Transform.
13
14<http://www.gnu.org/software/gsl/manual/html_node/Fast-Fourier-Transforms.html#Fast-Fourier-Transforms>
15
16-}
17-----------------------------------------------------------------------------
18module Numeric.GSL.Fourier (
19 fft,
20 ifft
21) where
22
23import Data.Packed.Internal
24import Complex
25import Foreign
26
27genfft code v = unsafePerformIO $ do
28 r <- createVector (dim v)
29 c_fft code // vec v // vec r // check "fft" [v]
30 return r
31
32foreign import ccall "gsl-aux.h fft" c_fft :: Int -> TCVCV
33
34
35{- | Fast 1D Fourier transform of a 'Vector' @(@'Complex' 'Double'@)@ using /gsl_fft_complex_forward/. It uses the same scaling conventions as GNU Octave.
36
37@> fft ('GSL.Matrix.fromList' [1,2,3,4])
38vector (4) [10.0 :+ 0.0,(-2.0) :+ 2.0,(-2.0) :+ 0.0,(-2.0) :+ (-2.0)]@
39
40-}
41fft :: Vector (Complex Double) -> Vector (Complex Double)
42fft = genfft 0
43
44-- | The inverse of 'fft', using /gsl_fft_complex_inverse/.
45ifft :: Vector (Complex Double) -> Vector (Complex Double)
46ifft = genfft 1
diff --git a/lib/Numeric/GSL/Integration.hs b/lib/Numeric/GSL/Integration.hs
new file mode 100644
index 0000000..d756417
--- /dev/null
+++ b/lib/Numeric/GSL/Integration.hs
@@ -0,0 +1,90 @@
1{-# OPTIONS #-}
2-----------------------------------------------------------------------------
3{- |
4Module : Numeric.GSL.Integration
5Copyright : (c) Alberto Ruiz 2006
6License : GPL-style
7
8Maintainer : Alberto Ruiz (aruiz at um dot es)
9Stability : provisional
10Portability : uses ffi
11
12Numerical integration routines.
13
14<http://www.gnu.org/software/gsl/manual/html_node/Numerical-Integration.html#Numerical-Integration>
15-}
16-----------------------------------------------------------------------------
17
18module Numeric.GSL.Integration (
19 integrateQNG,
20 integrateQAGS
21) where
22
23import Foreign
24import Data.Packed.Internal(mkfun,check,(//))
25
26
27--------------------------------------------------------------------
28{- | Numerical integration using /gsl_integration_qags/ (adaptive integration with singularities). For example:
29
30@\> let quad = integrateQAGS 1E-9 1000
31\> let f a x = x**(-0.5) * log (a*x)
32\> quad (f 1) 0 1
33(-3.999999999999974,4.871658632055187e-13)@
34
35-}
36
37integrateQAGS :: Double -- ^ precision (e.g. 1E-9)
38 -> Int -- ^ size of auxiliary workspace (e.g. 1000)
39 -> (Double -> Double) -- ^ function to be integrated on the interval (a,b)
40 -> Double -- ^ a
41 -> Double -- ^ b
42 -> (Double, Double) -- ^ result of the integration and error
43integrateQAGS prec n f a b = unsafePerformIO $ do
44 r <- malloc
45 e <- malloc
46 fp <- mkfun (\x _ -> f x)
47 c_integrate_qags fp a b prec n r e // check "integrate_qags" []
48 vr <- peek r
49 ve <- peek e
50 let result = (vr,ve)
51 free r
52 free e
53 freeHaskellFunPtr fp
54 return result
55
56foreign import ccall "gsl-aux.h integrate_qags"
57 c_integrate_qags :: FunPtr (Double-> Ptr() -> Double) -> Double -> Double -> Double -> Int
58 -> Ptr Double -> Ptr Double -> IO Int
59
60-----------------------------------------------------------------
61{- | Numerical integration using /gsl_integration_qng/ (useful for fast integration of smooth functions). For example:
62
63@\> let quad = integrateQNG 1E-6
64\> quad (\\x -> 4\/(1+x*x)) 0 1
65(3.141592653589793,3.487868498008632e-14)@
66
67-}
68
69integrateQNG :: Double -- ^ precision (e.g. 1E-9)
70 -> (Double -> Double) -- ^ function to be integrated on the interval (a,b)
71 -> Double -- ^ a
72 -> Double -- ^ b
73 -> (Double, Double) -- ^ result of the integration and error
74integrateQNG prec f a b = unsafePerformIO $ do
75 r <- malloc
76 e <- malloc
77 fp <- mkfun (\x _ -> f x)
78 c_integrate_qng fp a b prec r e // check "integrate_qng" []
79 vr <- peek r
80 ve <- peek e
81 let result = (vr,ve)
82 free r
83 free e
84 freeHaskellFunPtr fp
85 return result
86
87foreign import ccall "gsl-aux.h integrate_qng"
88 c_integrate_qng :: FunPtr (Double-> Ptr() -> Double) -> Double -> Double -> Double
89 -> Ptr Double -> Ptr Double -> IO Int
90
diff --git a/lib/Numeric/GSL/Matrix.hs b/lib/Numeric/GSL/Matrix.hs
new file mode 100644
index 0000000..eb1931a
--- /dev/null
+++ b/lib/Numeric/GSL/Matrix.hs
@@ -0,0 +1,302 @@
1-----------------------------------------------------------------------------
2-- |
3-- Module : Numeric.GSL.Matrix
4-- Copyright : (c) Alberto Ruiz 2007
5-- License : GPL-style
6--
7-- Maintainer : Alberto Ruiz <aruiz@um.es>
8-- Stability : provisional
9-- Portability : portable (uses FFI)
10--
11-- A few linear algebra computations based on the Numeric.GSL (<http://www.gnu.org/software/Numeric.GSL>).
12--
13-----------------------------------------------------------------------------
14-- #hide
15
16module Numeric.GSL.Matrix(
17 eigSg, eigHg,
18 svdg,
19 qr,
20 cholR, -- cholC,
21 luSolveR, luSolveC,
22 luR, luC
23) where
24
25import Data.Packed.Internal
26import Data.Packed.Matrix(fromLists,ident,takeDiag)
27import Numeric.GSL.Vector
28import Foreign
29import Complex
30
31{- | eigendecomposition of a real symmetric matrix using /gsl_eigen_symmv/.
32
33> > let (l,v) = eigS $ 'fromLists' [[1,2],[2,1]]
34> > l
35> 3.000 -1.000
36>
37> > v
38> 0.707 -0.707
39> 0.707 0.707
40>
41> > v <> diag l <> trans v
42> 1.000 2.000
43> 2.000 1.000
44
45-}
46eigSg :: Matrix Double -> (Vector Double, Matrix Double)
47eigSg m
48 | r == 1 = (fromList [cdat m `at` 0], singleton 1)
49 | otherwise = unsafePerformIO $ do
50 l <- createVector r
51 v <- createMatrix RowMajor r r
52 c_eigS // mat cdat m // vec l // mat dat v // check "eigSg" [cdat m]
53 return (l,v)
54 where r = rows m
55foreign import ccall "gsl-aux.h eigensystemR" c_eigS :: TMVM
56
57------------------------------------------------------------------
58
59
60
61{- | eigendecomposition of a complex hermitian matrix using /gsl_eigen_hermv/
62
63> > let (l,v) = eigH $ 'fromLists' [[1,2+i],[2-i,3]]
64>
65> > l
66> 4.449 -0.449
67>
68> > v
69> -0.544 0.839
70> (-0.751,0.375) (-0.487,0.243)
71>
72> > v <> diag l <> (conjTrans) v
73> 1.000 (2.000,1.000)
74> (2.000,-1.000) 3.000
75
76-}
77eigHg :: Matrix (Complex Double)-> (Vector Double, Matrix (Complex Double))
78eigHg m
79 | r == 1 = (fromList [realPart $ cdat m `at` 0], singleton 1)
80 | otherwise = unsafePerformIO $ do
81 l <- createVector r
82 v <- createMatrix RowMajor r r
83 c_eigH // mat cdat m // vec l // mat dat v // check "eigHg" [cdat m]
84 return (l,v)
85 where r = rows m
86foreign import ccall "gsl-aux.h eigensystemC" c_eigH :: TCMVCM
87
88
89{- | Singular value decomposition of a real matrix, using /gsl_linalg_SV_decomp_mod/:
90
91@\> let (u,s,v) = svdg $ 'fromLists' [[1,2,3],[-4,1,7]]
92\
93\> u
940.310 -0.951
950.951 0.310
96\
97\> s
988.497 2.792
99\
100\> v
101-0.411 -0.785
102 0.185 -0.570
103 0.893 -0.243
104\
105\> u \<\> 'diag' s \<\> 'trans' v
106 1. 2. 3.
107-4. 1. 7.@
108
109-}
110svdg :: Matrix Double -> (Matrix Double, Vector Double, Matrix Double)
111svdg x = if rows x >= cols x
112 then svd' x
113 else (v, s, u) where (u,s,v) = svd' (trans x)
114
115svd' x = unsafePerformIO $ do
116 u <- createMatrix RowMajor r c
117 s <- createVector c
118 v <- createMatrix RowMajor c c
119 c_svd // mat cdat x // mat dat u // vec s // mat dat v // check "svdg" [cdat x]
120 return (u,s,v)
121 where r = rows x
122 c = cols x
123foreign import ccall "gsl-aux.h svd" c_svd :: TMMVM
124
125{- | QR decomposition of a real matrix using /gsl_linalg_QR_decomp/ and /gsl_linalg_QR_unpack/.
126
127@\> let (q,r) = qr $ 'fromLists' [[1,3,5,7],[2,0,-2,4]]
128\
129\> q
130-0.447 -0.894
131-0.894 0.447
132\
133\> r
134-2.236 -1.342 -0.447 -6.708
135 0. -2.683 -5.367 -4.472
136\
137\> q \<\> r
1381.000 3.000 5.000 7.000
1392.000 0. -2.000 4.000@
140
141-}
142qr :: Matrix Double -> (Matrix Double, Matrix Double)
143qr x = unsafePerformIO $ do
144 q <- createMatrix RowMajor r r
145 rot <- createMatrix RowMajor r c
146 c_qr // mat cdat x // mat dat q // mat dat rot // check "qr" [cdat x]
147 return (q,rot)
148 where r = rows x
149 c = cols x
150foreign import ccall "gsl-aux.h QR" c_qr :: TMMM
151
152{- | Cholesky decomposition of a symmetric positive definite real matrix using /gsl_linalg_cholesky_decomp/.
153
154@\> chol $ (2><2) [1,2,
155 2,9::Double]
156(2><2)
157 [ 1.0, 0.0
158 , 2.0, 2.23606797749979 ]@
159
160-}
161cholR :: Matrix Double -> Matrix Double
162cholR x = unsafePerformIO $ do
163 res <- createMatrix RowMajor r r
164 c_cholR // mat cdat x // mat dat res // check "cholR" [cdat x]
165 return res
166 where r = rows x
167foreign import ccall "gsl-aux.h cholR" c_cholR :: TMM
168
169cholC :: Matrix (Complex Double) -> Matrix (Complex Double)
170cholC x = unsafePerformIO $ do
171 res <- createMatrix RowMajor r r
172 c_cholC // mat cdat x // mat dat res // check "cholC" [cdat x]
173 return res
174 where r = rows x
175foreign import ccall "gsl-aux.h cholC" c_cholC :: TCMCM
176
177
178--------------------------------------------------------
179
180{- -| efficient multiplication by the inverse of a matrix (for real matrices)
181-}
182luSolveR :: Matrix Double -> Matrix Double -> Matrix Double
183luSolveR a b
184 | n1==n2 && n1==r = unsafePerformIO $ do
185 s <- createMatrix RowMajor r c
186 c_luSolveR // mat cdat a // mat cdat b // mat dat s // check "luSolveR" [cdat a, cdat b]
187 return s
188 | otherwise = error "luSolveR of nonsquare matrix"
189 where n1 = rows a
190 n2 = cols a
191 r = rows b
192 c = cols b
193foreign import ccall "gsl-aux.h luSolveR" c_luSolveR :: TMMM
194
195{- -| efficient multiplication by the inverse of a matrix (for complex matrices).
196-}
197luSolveC :: Matrix (Complex Double) -> Matrix (Complex Double) -> Matrix (Complex Double)
198luSolveC a b
199 | n1==n2 && n1==r = unsafePerformIO $ do
200 s <- createMatrix RowMajor r c
201 c_luSolveC // mat cdat a // mat cdat b // mat dat s // check "luSolveC" [cdat a, cdat b]
202 return s
203 | otherwise = error "luSolveC of nonsquare matrix"
204 where n1 = rows a
205 n2 = cols a
206 r = rows b
207 c = cols b
208foreign import ccall "gsl-aux.h luSolveC" c_luSolveC :: TCMCMCM
209
210{- | lu decomposition of real matrix (packed as a vector including l, u, the permutation and sign)
211-}
212luRaux :: Matrix Double -> Vector Double
213luRaux x = unsafePerformIO $ do
214 res <- createVector (r*r+r+1)
215 c_luRaux // mat cdat x // vec res // check "luRaux" [cdat x]
216 return res
217 where r = rows x
218 c = cols x
219foreign import ccall "gsl-aux.h luRaux" c_luRaux :: TMV
220
221{- | lu decomposition of complex matrix (packed as a vector including l, u, the permutation and sign)
222-}
223luCaux :: Matrix (Complex Double) -> Vector (Complex Double)
224luCaux x = unsafePerformIO $ do
225 res <- createVector (r*r+r+1)
226 c_luCaux // mat cdat x // vec res // check "luCaux" [cdat x]
227 return res
228 where r = rows x
229 c = cols x
230foreign import ccall "gsl-aux.h luCaux" c_luCaux :: TCMCV
231
232{- | The LU decomposition of a square matrix. Is based on /gsl_linalg_LU_decomp/ and /gsl_linalg_complex_LU_decomp/ as described in <http://www.gnu.org/software/Numeric.GSL/manual/Numeric.GSL-ref_13.html#SEC223>.
233
234@\> let m = 'fromLists' [[1,2,-3],[2+3*i,-7,0],[1,-i,2*i]]
235\> let (l,u,p,s) = luR m@
236
237L is the lower triangular:
238
239@\> l
240 1. 0. 0.
2410.154-0.231i 1. 0.
2420.154-0.231i 0.624-0.522i 1.@
243
244U is the upper triangular:
245
246@\> u
2472.+3.i -7. 0.
248 0. 3.077-1.615i -3.
249 0. 0. 1.873+0.433i@
250
251p is a permutation:
252
253@\> p
254[1,0,2]@
255
256L \* U obtains a permuted version of the original matrix:
257
258@\> extractRows p m
259 2.+3.i -7. 0.
260 1. 2. -3.
261 1. -1.i 2.i
262\
263\> l \<\> u
264 2.+3.i -7. 0.
265 1. 2. -3.
266 1. -1.i 2.i@
267
268s is the sign of the permutation, required to obtain sign of the determinant:
269
270@\> s * product ('toList' $ 'takeDiag' u)
271(-18.0) :+ (-16.000000000000004)
272\> 'LinearAlgebra.Algorithms.det' m
273(-18.0) :+ (-16.000000000000004)@
274
275 -}
276luR :: Matrix Double -> (Matrix Double, Matrix Double, [Int], Double)
277luR m = (l,u,p, fromIntegral s') where
278 r = rows m
279 v = luRaux m
280 lu = reshape r $ subVector 0 (r*r) v
281 s':p = map round . toList . subVector (r*r) (r+1) $ v
282 u = triang r r 0 1`mul` lu
283 l = (triang r r 0 0 `mul` lu) `add` ident r
284 add = liftMatrix2 $ vectorZipR Add
285 mul = liftMatrix2 $ vectorZipR Mul
286
287-- | Complex version of 'luR'.
288luC :: Matrix (Complex Double) -> (Matrix (Complex Double), Matrix (Complex Double), [Int], Complex Double)
289luC m = (l,u,p, fromIntegral s') where
290 r = rows m
291 v = luCaux m
292 lu = reshape r $ subVector 0 (r*r) v
293 s':p = map (round.realPart) . toList . subVector (r*r) (r+1) $ v
294 u = triang r r 0 1 `mul` lu
295 l = (triang r r 0 0 `mul` lu) `add` liftMatrix comp (ident r)
296 add = liftMatrix2 $ vectorZipC Add
297 mul = liftMatrix2 $ vectorZipC Mul
298
299{- auxiliary function to get triangular matrices
300-}
301triang r c h v = reshape c $ fromList [el i j | i<-[0..r-1], j<-[0..c-1]]
302 where el i j = if j-i>=h then v else 1 - v
diff --git a/lib/Numeric/GSL/Minimization.hs b/lib/Numeric/GSL/Minimization.hs
new file mode 100644
index 0000000..23ca51b
--- /dev/null
+++ b/lib/Numeric/GSL/Minimization.hs
@@ -0,0 +1,213 @@
1{-# OPTIONS_GHC -fglasgow-exts #-}
2-----------------------------------------------------------------------------
3{- |
4Module : Numeric.GSL.Minimization
5Copyright : (c) Alberto Ruiz 2006
6License : GPL-style
7
8Maintainer : Alberto Ruiz (aruiz at um dot es)
9Stability : provisional
10Portability : uses ffi
11
12Minimization of a multidimensional function Minimization of a multidimensional function using some of the algorithms described in:
13
14<http://www.gnu.org/software/gsl/manual/html_node/Multidimensional-Minimization.html>
15
16-}
17-----------------------------------------------------------------------------
18module Numeric.GSL.Minimization (
19 minimizeConjugateGradient,
20 minimizeNMSimplex
21) where
22
23
24import Data.Packed.Internal
25import Data.Packed.Matrix
26import Foreign
27import Complex
28
29
30-------------------------------------------------------------------------
31
32{- | The method of Nelder and Mead, implemented by /gsl_multimin_fminimizer_nmsimplex/. The gradient of the function is not required. This is the example in the GSL manual:
33
34@minimize f xi = minimizeNMSimplex f xi (replicate (length xi) 1) 1e-2 100
35\
36f [x,y] = 10*(x-1)^2 + 20*(y-2)^2 + 30
37\
38main = do
39 let (s,p) = minimize f [5,7]
40 print s
41 print p
42\
43\> main
44[0.9920430849306285,1.9969168063253164]
450. 512.500 1.082 6.500 5.
46 1. 290.625 1.372 5.250 4.
47 2. 290.625 1.372 5.250 4.
48 3. 252.500 1.372 5.500 1.
49 4. 101.406 1.823 2.625 3.500
50 5. 101.406 1.823 2.625 3.500
51 6. 60. 1.823 0. 3.
52 7. 42.275 1.303 2.094 1.875
53 8. 42.275 1.303 2.094 1.875
54 9. 35.684 1.026 0.258 1.906
5510. 35.664 0.804 0.588 2.445
5611. 30.680 0.467 1.258 2.025
5712. 30.680 0.356 1.258 2.025
5813. 30.539 0.285 1.093 1.849
5914. 30.137 0.168 0.883 2.004
6015. 30.137 0.123 0.883 2.004
6116. 30.090 0.100 0.958 2.060
6217. 30.005 6.051e-2 1.022 2.004
6318. 30.005 4.249e-2 1.022 2.004
6419. 30.005 4.249e-2 1.022 2.004
6520. 30.005 2.742e-2 1.022 2.004
6621. 30.005 2.119e-2 1.022 2.004
6722. 30.001 1.530e-2 0.992 1.997
6823. 30.001 1.259e-2 0.992 1.997
6924. 30.001 7.663e-3 0.992 1.997@
70
71The path to the solution can be graphically shown by means of:
72
73@'GSL.Plot.mplot' $ drop 3 ('toColumns' p)@
74
75-}
76minimizeNMSimplex :: ([Double] -> Double) -- ^ function to minimize
77 -> [Double] -- ^ starting point
78 -> [Double] -- ^ sizes of the initial search box
79 -> Double -- ^ desired precision of the solution
80 -> Int -- ^ maximum number of iterations allowed
81 -> ([Double], Matrix Double)
82 -- ^ solution vector, and the optimization trajectory followed by the algorithm
83minimizeNMSimplex f xi sz tol maxit = unsafePerformIO $ do
84 let xiv = fromList xi
85 szv = fromList sz
86 n = dim xiv
87 fp <- mkVecfun (iv (f.toList))
88 rawpath <- createMIO maxit (n+3)
89 (c_minimizeNMSimplex fp tol maxit // vec xiv // vec szv)
90 "minimizeNMSimplex" [xiv,szv]
91 let it = round (rawpath @@> (maxit-1,0))
92 path = takeRows it rawpath
93 [sol] = toLists $ dropRows (it-1) path
94 freeHaskellFunPtr fp
95 return (drop 3 sol, path)
96
97
98foreign import ccall "gsl-aux.h minimize"
99 c_minimizeNMSimplex:: FunPtr (Int -> Ptr Double -> Double) -> Double -> Int
100 -> TVVM
101
102----------------------------------------------------------------------------------
103
104{- | The Fletcher-Reeves conjugate gradient algorithm /gsl_multimin_fminimizer_conjugate_fr/. This is the example in the GSL manual:
105
106@minimize = minimizeConjugateGradient 1E-2 1E-4 1E-3 30
107f [x,y] = 10*(x-1)^2 + 20*(y-2)^2 + 30
108\
109df [x,y] = [20*(x-1), 40*(y-2)]
110\
111main = do
112 let (s,p) = minimize f df [5,7]
113 print s
114 print p
115\
116\> main
117[1.0,2.0]
118 0. 687.848 4.996 6.991
119 1. 683.555 4.989 6.972
120 2. 675.013 4.974 6.935
121 3. 658.108 4.944 6.861
122 4. 625.013 4.885 6.712
123 5. 561.684 4.766 6.415
124 6. 446.467 4.528 5.821
125 7. 261.794 4.053 4.632
126 8. 75.498 3.102 2.255
127 9. 67.037 2.852 1.630
12810. 45.316 2.191 1.762
12911. 30.186 0.869 2.026
13012. 30. 1. 2.@
131
132The path to the solution can be graphically shown by means of:
133
134@'GSL.Plot.mplot' $ drop 2 ('toColumns' p)@
135
136-}
137minimizeConjugateGradient ::
138 Double -- ^ initial step size
139 -> Double -- ^ minimization parameter
140 -> Double -- ^ desired precision of the solution (gradient test)
141 -> Int -- ^ maximum number of iterations allowed
142 -> ([Double] -> Double) -- ^ function to minimize
143 -> ([Double] -> [Double]) -- ^ gradient
144 -> [Double] -- ^ starting point
145 -> ([Double], Matrix Double) -- ^ solution vector, and the optimization trajectory followed by the algorithm
146minimizeConjugateGradient istep minimpar tol maxit f df xi = unsafePerformIO $ do
147 let xiv = fromList xi
148 n = dim xiv
149 f' = f . toList
150 df' = (fromList . df . toList)
151 fp <- mkVecfun (iv f')
152 dfp <- mkVecVecfun (aux_vTov df')
153 print "entro"
154 rawpath <- createMIO maxit (n+2)
155 (c_minimizeConjugateGradient fp dfp istep minimpar tol maxit // vec xiv)
156 "minimizeDerivV" [xiv]
157 print "salgo"
158 let it = round (rawpath @@> (maxit-1,0))
159 path = takeRows it rawpath
160 sol = toList $ cdat $ dropColumns 2 $ dropRows (it-1) path
161 freeHaskellFunPtr fp
162 freeHaskellFunPtr dfp
163 return (sol,path)
164
165
166foreign import ccall "gsl-aux.h minimizeWithDeriv"
167 c_minimizeConjugateGradient :: FunPtr (Int -> Ptr Double -> Double)
168 -> FunPtr (Int -> Ptr Double -> Ptr Double -> IO ())
169 -> Double -> Double -> Double -> Int
170 -> TVM
171
172---------------------------------------------------------------------
173iv :: (Vector Double -> Double) -> (Int -> Ptr Double -> Double)
174iv f n p = f (createV n copy "iv" []) where
175 copy n q = do
176 copyArray q p n
177 return 0
178
179-- | conversion of Haskell functions into function pointers that can be used in the C side
180foreign import ccall "wrapper"
181 mkVecfun :: (Int -> Ptr Double -> Double)
182 -> IO( FunPtr (Int -> Ptr Double -> Double))
183
184-- | another required conversion
185foreign import ccall "wrapper"
186 mkVecVecfun :: (Int -> Ptr Double -> Ptr Double -> IO ())
187 -> IO (FunPtr (Int -> Ptr Double -> Ptr Double->IO()))
188
189aux_vTov :: (Vector Double -> Vector Double) -> (Int -> Ptr Double -> Ptr Double -> IO())
190aux_vTov f n p r = g where
191 V {fptr = pr, ptr = t} = f x
192 x = createV n copy "aux_vTov" []
193 copy n q = do
194 copyArray q p n
195 return 0
196 g = withForeignPtr pr $ \_ -> copyArray r t n
197
198--------------------------------------------------------------------
199
200createV n fun msg ptrs = unsafePerformIO $ do
201 r <- createVector n
202 fun // vec r // check msg ptrs
203 return r
204
205createM r c fun msg ptrs = unsafePerformIO $ do
206 r <- createMatrix RowMajor r c
207 fun // mat cdat r // check msg ptrs
208 return r
209
210createMIO r c fun msg ptrs = do
211 r <- createMatrix RowMajor r c
212 fun // mat cdat r // check msg ptrs
213 return r
diff --git a/lib/Numeric/GSL/Polynomials.hs b/lib/Numeric/GSL/Polynomials.hs
new file mode 100644
index 0000000..42694f0
--- /dev/null
+++ b/lib/Numeric/GSL/Polynomials.hs
@@ -0,0 +1,54 @@
1{-# OPTIONS_GHC -fglasgow-exts #-}
2-----------------------------------------------------------------------------
3{- |
4Module : Numeric.GSL.Polynomials
5Copyright : (c) Alberto Ruiz 2006
6License : GPL-style
7
8Maintainer : Alberto Ruiz (aruiz at um dot es)
9Stability : provisional
10Portability : uses ffi
11
12Polynomials.
13
14<http://www.gnu.org/software/gsl/manual/html_node/General-Polynomial-Equations.html#General-Polynomial-Equations>
15
16-}
17-----------------------------------------------------------------------------
18module Numeric.GSL.Polynomials (
19 polySolve
20) where
21
22import Data.Packed.Internal
23import Complex
24import Foreign
25
26{- | Solution of general polynomial equations, using /gsl_poly_complex_solve/. For example,
27 the three solutions of x^3 + 8 = 0
28
29@\> polySolve [8,0,0,1]
30[(-1.9999999999999998) :+ 0.0,
31 1.0 :+ 1.732050807568877,
32 1.0 :+ (-1.732050807568877)]@
33
34The example in the GSL manual: To find the roots of x^5 -1 = 0:
35
36@\> polySolve [-1, 0, 0, 0, 0, 1]
37[(-0.8090169943749475) :+ 0.5877852522924731,
38(-0.8090169943749475) :+ (-0.5877852522924731),
390.30901699437494734 :+ 0.9510565162951536,
400.30901699437494734 :+ (-0.9510565162951536),
411.0 :+ 0.0]@
42
43-}
44polySolve :: [Double] -> [Complex Double]
45polySolve = toList . polySolve' . fromList
46
47polySolve' :: Vector Double -> Vector (Complex Double)
48polySolve' v | dim v > 1 = unsafePerformIO $ do
49 r <- createVector (dim v-1)
50 c_polySolve // vec v // vec r // check "polySolve" [v]
51 return r
52 | otherwise = error "polySolve on a polynomial of degree zero"
53
54foreign import ccall "gsl-aux.h polySolve" c_polySolve:: TVCV
diff --git a/lib/Numeric/GSL/Special.hs b/lib/Numeric/GSL/Special.hs
new file mode 100644
index 0000000..b6cea2b
--- /dev/null
+++ b/lib/Numeric/GSL/Special.hs
@@ -0,0 +1,74 @@
1-----------------------------------------------------------------------------
2{- |
3Module : Numeric.GSL.Special
4Copyright : (c) Alberto Ruiz 2006
5License : GPL-style
6
7Maintainer : Alberto Ruiz (aruiz at um dot es)
8Stability : provisional
9Portability : uses ffi
10
11Wrappers for selected special functions.
12
13<http://www.gnu.org/software/gsl/manual/html_node/Special-Functions.html#Special-Functions>
14-}
15-----------------------------------------------------------------------------
16
17module Numeric.GSL.Special (
18 module Numeric.GSL.Special.Airy
19, module Numeric.GSL.Special.Bessel
20, module Numeric.GSL.Special.Clausen
21, module Numeric.GSL.Special.Coulomb
22, module Numeric.GSL.Special.Coupling
23, module Numeric.GSL.Special.Dawson
24, module Numeric.GSL.Special.Debye
25, module Numeric.GSL.Special.Dilog
26, module Numeric.GSL.Special.Elementary
27, module Numeric.GSL.Special.Ellint
28, module Numeric.GSL.Special.Erf
29, module Numeric.GSL.Special.Exp
30, module Numeric.GSL.Special.Expint
31, module Numeric.GSL.Special.Fermi_dirac
32, module Numeric.GSL.Special.Gamma
33, module Numeric.GSL.Special.Gegenbauer
34, module Numeric.GSL.Special.Hyperg
35, module Numeric.GSL.Special.Laguerre
36, module Numeric.GSL.Special.Lambert
37, module Numeric.GSL.Special.Legendre
38, module Numeric.GSL.Special.Log
39, module Numeric.GSL.Special.Pow_int
40, module Numeric.GSL.Special.Psi
41, module Numeric.GSL.Special.Synchrotron
42, module Numeric.GSL.Special.Trig
43, module Numeric.GSL.Special.Zeta
44)
45where
46
47import Foreign
48import Numeric.GSL.Special.Internal
49import Numeric.GSL.Special.Airy
50import Numeric.GSL.Special.Bessel
51import Numeric.GSL.Special.Clausen
52import Numeric.GSL.Special.Coulomb
53import Numeric.GSL.Special.Coupling
54import Numeric.GSL.Special.Dawson
55import Numeric.GSL.Special.Debye
56import Numeric.GSL.Special.Dilog
57import Numeric.GSL.Special.Elementary
58import Numeric.GSL.Special.Ellint
59import Numeric.GSL.Special.Erf
60import Numeric.GSL.Special.Exp
61import Numeric.GSL.Special.Expint
62import Numeric.GSL.Special.Fermi_dirac
63import Numeric.GSL.Special.Gamma
64import Numeric.GSL.Special.Gegenbauer
65import Numeric.GSL.Special.Hyperg
66import Numeric.GSL.Special.Laguerre
67import Numeric.GSL.Special.Lambert
68import Numeric.GSL.Special.Legendre
69import Numeric.GSL.Special.Log
70import Numeric.GSL.Special.Pow_int
71import Numeric.GSL.Special.Psi
72import Numeric.GSL.Special.Synchrotron
73import Numeric.GSL.Special.Trig
74import Numeric.GSL.Special.Zeta
diff --git a/lib/Numeric/GSL/Special/Airy.hs b/lib/Numeric/GSL/Special/Airy.hs
new file mode 100644
index 0000000..d987e1f
--- /dev/null
+++ b/lib/Numeric/GSL/Special/Airy.hs
@@ -0,0 +1,166 @@
1------------------------------------------------------------
2{- |
3Module : Numeric.GSL.Special.Airy
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/Airy-Functions-and-Derivatives.html>
13
14-}
15------------------------------------------------------------
16
17module Numeric.GSL.Special.Airy(
18 Precision (..)
19, airy_Ai_e
20, airy_Ai
21, airy_Bi_e
22, airy_Bi
23, airy_Ai_scaled_e
24, airy_Ai_scaled
25, airy_Bi_scaled_e
26, airy_Bi_scaled
27, airy_Ai_deriv_e
28, airy_Ai_deriv
29, airy_Bi_deriv_e
30, airy_Bi_deriv
31, airy_Ai_deriv_scaled_e
32, airy_Ai_deriv_scaled
33, airy_Bi_deriv_scaled_e
34, airy_Bi_deriv_scaled
35, airy_zero_Ai_e
36, airy_zero_Ai
37, airy_zero_Bi_e
38, airy_zero_Bi
39, airy_zero_Ai_deriv_e
40, airy_zero_Ai_deriv
41, airy_zero_Bi_deriv_e
42, airy_zero_Bi_deriv
43) where
44
45import Foreign(Ptr)
46import Numeric.GSL.Special.Internal
47
48-- | wrapper for int gsl_sf_airy_Ai_e(double x,gsl_mode_t mode,gsl_sf_result* result);
49airy_Ai_e :: Double -> Precision -> (Double,Double)
50airy_Ai_e x mode = createSFR "airy_Ai_e" $ gsl_sf_airy_Ai_e x (precCode mode)
51foreign import ccall "airy.h gsl_sf_airy_Ai_e" gsl_sf_airy_Ai_e :: Double -> Gsl_mode_t -> Ptr Double -> IO(Int)
52
53-- | wrapper for double gsl_sf_airy_Ai(double x,gsl_mode_t mode);
54airy_Ai :: Double -> Precision -> Double
55airy_Ai x mode = gsl_sf_airy_Ai x (precCode mode)
56foreign import ccall "airy.h gsl_sf_airy_Ai" gsl_sf_airy_Ai :: Double -> Gsl_mode_t -> Double
57
58-- | wrapper for int gsl_sf_airy_Bi_e(double x,gsl_mode_t mode,gsl_sf_result* result);
59airy_Bi_e :: Double -> Precision -> (Double,Double)
60airy_Bi_e x mode = createSFR "airy_Bi_e" $ gsl_sf_airy_Bi_e x (precCode mode)
61foreign import ccall "airy.h gsl_sf_airy_Bi_e" gsl_sf_airy_Bi_e :: Double -> Gsl_mode_t -> Ptr Double -> IO(Int)
62
63-- | wrapper for double gsl_sf_airy_Bi(double x,gsl_mode_t mode);
64airy_Bi :: Double -> Precision -> Double
65airy_Bi x mode = gsl_sf_airy_Bi x (precCode mode)
66foreign import ccall "airy.h gsl_sf_airy_Bi" gsl_sf_airy_Bi :: Double -> Gsl_mode_t -> Double
67
68-- | wrapper for int gsl_sf_airy_Ai_scaled_e(double x,gsl_mode_t mode,gsl_sf_result* result);
69airy_Ai_scaled_e :: Double -> Precision -> (Double,Double)
70airy_Ai_scaled_e x mode = createSFR "airy_Ai_scaled_e" $ gsl_sf_airy_Ai_scaled_e x (precCode mode)
71foreign import ccall "airy.h gsl_sf_airy_Ai_scaled_e" gsl_sf_airy_Ai_scaled_e :: Double -> Gsl_mode_t -> Ptr Double -> IO(Int)
72
73-- | wrapper for double gsl_sf_airy_Ai_scaled(double x,gsl_mode_t mode);
74airy_Ai_scaled :: Double -> Precision -> Double
75airy_Ai_scaled x mode = gsl_sf_airy_Ai_scaled x (precCode mode)
76foreign import ccall "airy.h gsl_sf_airy_Ai_scaled" gsl_sf_airy_Ai_scaled :: Double -> Gsl_mode_t -> Double
77
78-- | wrapper for int gsl_sf_airy_Bi_scaled_e(double x,gsl_mode_t mode,gsl_sf_result* result);
79airy_Bi_scaled_e :: Double -> Precision -> (Double,Double)
80airy_Bi_scaled_e x mode = createSFR "airy_Bi_scaled_e" $ gsl_sf_airy_Bi_scaled_e x (precCode mode)
81foreign import ccall "airy.h gsl_sf_airy_Bi_scaled_e" gsl_sf_airy_Bi_scaled_e :: Double -> Gsl_mode_t -> Ptr Double -> IO(Int)
82
83-- | wrapper for double gsl_sf_airy_Bi_scaled(double x,gsl_mode_t mode);
84airy_Bi_scaled :: Double -> Precision -> Double
85airy_Bi_scaled x mode = gsl_sf_airy_Bi_scaled x (precCode mode)
86foreign import ccall "airy.h gsl_sf_airy_Bi_scaled" gsl_sf_airy_Bi_scaled :: Double -> Gsl_mode_t -> Double
87
88-- | wrapper for int gsl_sf_airy_Ai_deriv_e(double x,gsl_mode_t mode,gsl_sf_result* result);
89airy_Ai_deriv_e :: Double -> Precision -> (Double,Double)
90airy_Ai_deriv_e x mode = createSFR "airy_Ai_deriv_e" $ gsl_sf_airy_Ai_deriv_e x (precCode mode)
91foreign import ccall "airy.h gsl_sf_airy_Ai_deriv_e" gsl_sf_airy_Ai_deriv_e :: Double -> Gsl_mode_t -> Ptr Double -> IO(Int)
92
93-- | wrapper for double gsl_sf_airy_Ai_deriv(double x,gsl_mode_t mode);
94airy_Ai_deriv :: Double -> Precision -> Double
95airy_Ai_deriv x mode = gsl_sf_airy_Ai_deriv x (precCode mode)
96foreign import ccall "airy.h gsl_sf_airy_Ai_deriv" gsl_sf_airy_Ai_deriv :: Double -> Gsl_mode_t -> Double
97
98-- | wrapper for int gsl_sf_airy_Bi_deriv_e(double x,gsl_mode_t mode,gsl_sf_result* result);
99airy_Bi_deriv_e :: Double -> Precision -> (Double,Double)
100airy_Bi_deriv_e x mode = createSFR "airy_Bi_deriv_e" $ gsl_sf_airy_Bi_deriv_e x (precCode mode)
101foreign import ccall "airy.h gsl_sf_airy_Bi_deriv_e" gsl_sf_airy_Bi_deriv_e :: Double -> Gsl_mode_t -> Ptr Double -> IO(Int)
102
103-- | wrapper for double gsl_sf_airy_Bi_deriv(double x,gsl_mode_t mode);
104airy_Bi_deriv :: Double -> Precision -> Double
105airy_Bi_deriv x mode = gsl_sf_airy_Bi_deriv x (precCode mode)
106foreign import ccall "airy.h gsl_sf_airy_Bi_deriv" gsl_sf_airy_Bi_deriv :: Double -> Gsl_mode_t -> Double
107
108-- | wrapper for int gsl_sf_airy_Ai_deriv_scaled_e(double x,gsl_mode_t mode,gsl_sf_result* result);
109airy_Ai_deriv_scaled_e :: Double -> Precision -> (Double,Double)
110airy_Ai_deriv_scaled_e x mode = createSFR "airy_Ai_deriv_scaled_e" $ gsl_sf_airy_Ai_deriv_scaled_e x (precCode mode)
111foreign import ccall "airy.h gsl_sf_airy_Ai_deriv_scaled_e" gsl_sf_airy_Ai_deriv_scaled_e :: Double -> Gsl_mode_t -> Ptr Double -> IO(Int)
112
113-- | wrapper for double gsl_sf_airy_Ai_deriv_scaled(double x,gsl_mode_t mode);
114airy_Ai_deriv_scaled :: Double -> Precision -> Double
115airy_Ai_deriv_scaled x mode = gsl_sf_airy_Ai_deriv_scaled x (precCode mode)
116foreign import ccall "airy.h gsl_sf_airy_Ai_deriv_scaled" gsl_sf_airy_Ai_deriv_scaled :: Double -> Gsl_mode_t -> Double
117
118-- | wrapper for int gsl_sf_airy_Bi_deriv_scaled_e(double x,gsl_mode_t mode,gsl_sf_result* result);
119airy_Bi_deriv_scaled_e :: Double -> Precision -> (Double,Double)
120airy_Bi_deriv_scaled_e x mode = createSFR "airy_Bi_deriv_scaled_e" $ gsl_sf_airy_Bi_deriv_scaled_e x (precCode mode)
121foreign import ccall "airy.h gsl_sf_airy_Bi_deriv_scaled_e" gsl_sf_airy_Bi_deriv_scaled_e :: Double -> Gsl_mode_t -> Ptr Double -> IO(Int)
122
123-- | wrapper for double gsl_sf_airy_Bi_deriv_scaled(double x,gsl_mode_t mode);
124airy_Bi_deriv_scaled :: Double -> Precision -> Double
125airy_Bi_deriv_scaled x mode = gsl_sf_airy_Bi_deriv_scaled x (precCode mode)
126foreign import ccall "airy.h gsl_sf_airy_Bi_deriv_scaled" gsl_sf_airy_Bi_deriv_scaled :: Double -> Gsl_mode_t -> Double
127
128-- | wrapper for int gsl_sf_airy_zero_Ai_e(int s,gsl_sf_result* result);
129airy_zero_Ai_e :: Int -> (Double,Double)
130airy_zero_Ai_e s = createSFR "airy_zero_Ai_e" $ gsl_sf_airy_zero_Ai_e s
131foreign import ccall "airy.h gsl_sf_airy_zero_Ai_e" gsl_sf_airy_zero_Ai_e :: Int -> Ptr Double -> IO(Int)
132
133-- | wrapper for double gsl_sf_airy_zero_Ai(int s);
134airy_zero_Ai :: Int -> Double
135airy_zero_Ai = gsl_sf_airy_zero_Ai
136foreign import ccall "airy.h gsl_sf_airy_zero_Ai" gsl_sf_airy_zero_Ai :: Int -> Double
137
138-- | wrapper for int gsl_sf_airy_zero_Bi_e(int s,gsl_sf_result* result);
139airy_zero_Bi_e :: Int -> (Double,Double)
140airy_zero_Bi_e s = createSFR "airy_zero_Bi_e" $ gsl_sf_airy_zero_Bi_e s
141foreign import ccall "airy.h gsl_sf_airy_zero_Bi_e" gsl_sf_airy_zero_Bi_e :: Int -> Ptr Double -> IO(Int)
142
143-- | wrapper for double gsl_sf_airy_zero_Bi(int s);
144airy_zero_Bi :: Int -> Double
145airy_zero_Bi = gsl_sf_airy_zero_Bi
146foreign import ccall "airy.h gsl_sf_airy_zero_Bi" gsl_sf_airy_zero_Bi :: Int -> Double
147
148-- | wrapper for int gsl_sf_airy_zero_Ai_deriv_e(int s,gsl_sf_result* result);
149airy_zero_Ai_deriv_e :: Int -> (Double,Double)
150airy_zero_Ai_deriv_e s = createSFR "airy_zero_Ai_deriv_e" $ gsl_sf_airy_zero_Ai_deriv_e s
151foreign import ccall "airy.h gsl_sf_airy_zero_Ai_deriv_e" gsl_sf_airy_zero_Ai_deriv_e :: Int -> Ptr Double -> IO(Int)
152
153-- | wrapper for double gsl_sf_airy_zero_Ai_deriv(int s);
154airy_zero_Ai_deriv :: Int -> Double
155airy_zero_Ai_deriv = gsl_sf_airy_zero_Ai_deriv
156foreign import ccall "airy.h gsl_sf_airy_zero_Ai_deriv" gsl_sf_airy_zero_Ai_deriv :: Int -> Double
157
158-- | wrapper for int gsl_sf_airy_zero_Bi_deriv_e(int s,gsl_sf_result* result);
159airy_zero_Bi_deriv_e :: Int -> (Double,Double)
160airy_zero_Bi_deriv_e s = createSFR "airy_zero_Bi_deriv_e" $ gsl_sf_airy_zero_Bi_deriv_e s
161foreign import ccall "airy.h gsl_sf_airy_zero_Bi_deriv_e" gsl_sf_airy_zero_Bi_deriv_e :: Int -> Ptr Double -> IO(Int)
162
163-- | wrapper for double gsl_sf_airy_zero_Bi_deriv(int s);
164airy_zero_Bi_deriv :: Int -> Double
165airy_zero_Bi_deriv = gsl_sf_airy_zero_Bi_deriv
166foreign import ccall "airy.h gsl_sf_airy_zero_Bi_deriv" gsl_sf_airy_zero_Bi_deriv :: Int -> Double
diff --git a/lib/Numeric/GSL/Special/Bessel.hs b/lib/Numeric/GSL/Special/Bessel.hs
new file mode 100644
index 0000000..e059666
--- /dev/null
+++ b/lib/Numeric/GSL/Special/Bessel.hs
@@ -0,0 +1,809 @@
1------------------------------------------------------------
2{- |
3Module : Numeric.GSL.Special.Bessel
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.google.com/search?q=gsl_sf_bessel.h&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
13
14-}
15------------------------------------------------------------
16
17module Numeric.GSL.Special.Bessel(
18 bessel_J0_e
19, bessel_J0
20, bessel_J1_e
21, bessel_J1
22, bessel_Jn_e
23, bessel_Jn
24, bessel_Y0_e
25, bessel_Y0
26, bessel_Y1_e
27, bessel_Y1
28, bessel_Yn_e
29, bessel_Yn
30, bessel_I0_e
31, bessel_I0
32, bessel_I1_e
33, bessel_I1
34, bessel_In_e
35, bessel_In
36, bessel_I0_scaled_e
37, bessel_I0_scaled
38, bessel_I1_scaled_e
39, bessel_I1_scaled
40, bessel_In_scaled_e
41, bessel_In_scaled
42, bessel_K0_e
43, bessel_K0
44, bessel_K1_e
45, bessel_K1
46, bessel_Kn_e
47, bessel_Kn
48, bessel_K0_scaled_e
49, bessel_K0_scaled
50, bessel_K1_scaled_e
51, bessel_K1_scaled
52, bessel_Kn_scaled_e
53, bessel_Kn_scaled
54, bessel_j0_e
55, bessel_j0
56, bessel_j1_e
57, bessel_j1
58, bessel_j2_e
59, bessel_j2
60, bessel_jl_e
61, bessel_jl
62, bessel_y0_e
63, bessel_y0
64, bessel_y1_e
65, bessel_y1
66, bessel_y2_e
67, bessel_y2
68, bessel_yl_e
69, bessel_yl
70, bessel_i0_scaled_e
71, bessel_i0_scaled
72, bessel_i1_scaled_e
73, bessel_i1_scaled
74, bessel_i2_scaled_e
75, bessel_i2_scaled
76, bessel_il_scaled_e
77, bessel_il_scaled
78, bessel_k0_scaled_e
79, bessel_k0_scaled
80, bessel_k1_scaled_e
81, bessel_k1_scaled
82, bessel_k2_scaled_e
83, bessel_k2_scaled
84, bessel_kl_scaled_e
85, bessel_kl_scaled
86, bessel_Jnu_e
87, bessel_Jnu
88, bessel_Ynu_e
89, bessel_Ynu
90, bessel_Inu_scaled_e
91, bessel_Inu_scaled
92, bessel_Inu_e
93, bessel_Inu
94, bessel_Knu_scaled_e
95, bessel_Knu_scaled
96, bessel_Knu_e
97, bessel_Knu
98, bessel_lnKnu_e
99, bessel_lnKnu
100, bessel_zero_J0_e
101, bessel_zero_J0
102, bessel_zero_J1_e
103, bessel_zero_J1
104, bessel_zero_Jnu_e
105, bessel_zero_Jnu
106) where
107
108import Foreign(Ptr)
109import Numeric.GSL.Special.Internal
110
111-- | wrapper for int gsl_sf_bessel_J0_e(double x,gsl_sf_result* result);
112--
113-- <http://www.google.com/search?q=gsl_sf_bessel_J0_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
114bessel_J0_e :: Double -> (Double,Double)
115bessel_J0_e x = createSFR "bessel_J0_e" $ gsl_sf_bessel_J0_e x
116foreign import ccall "bessel.h gsl_sf_bessel_J0_e" gsl_sf_bessel_J0_e :: Double -> Ptr Double -> IO(Int)
117
118-- | wrapper for double gsl_sf_bessel_J0(double x);
119--
120-- <http://www.google.com/search?q=gsl_sf_bessel_J0&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
121bessel_J0 :: Double -> Double
122bessel_J0 = gsl_sf_bessel_J0
123foreign import ccall "bessel.h gsl_sf_bessel_J0" gsl_sf_bessel_J0 :: Double -> Double
124
125-- | wrapper for int gsl_sf_bessel_J1_e(double x,gsl_sf_result* result);
126--
127-- <http://www.google.com/search?q=gsl_sf_bessel_J1_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
128bessel_J1_e :: Double -> (Double,Double)
129bessel_J1_e x = createSFR "bessel_J1_e" $ gsl_sf_bessel_J1_e x
130foreign import ccall "bessel.h gsl_sf_bessel_J1_e" gsl_sf_bessel_J1_e :: Double -> Ptr Double -> IO(Int)
131
132-- | wrapper for double gsl_sf_bessel_J1(double x);
133--
134-- <http://www.google.com/search?q=gsl_sf_bessel_J1&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
135bessel_J1 :: Double -> Double
136bessel_J1 = gsl_sf_bessel_J1
137foreign import ccall "bessel.h gsl_sf_bessel_J1" gsl_sf_bessel_J1 :: Double -> Double
138
139-- | wrapper for int gsl_sf_bessel_Jn_e(int n,double x,gsl_sf_result* result);
140--
141-- <http://www.google.com/search?q=gsl_sf_bessel_Jn_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
142bessel_Jn_e :: Int -> Double -> (Double,Double)
143bessel_Jn_e n x = createSFR "bessel_Jn_e" $ gsl_sf_bessel_Jn_e n x
144foreign import ccall "bessel.h gsl_sf_bessel_Jn_e" gsl_sf_bessel_Jn_e :: Int -> Double -> Ptr Double -> IO(Int)
145
146-- | wrapper for double gsl_sf_bessel_Jn(int n,double x);
147--
148-- <http://www.google.com/search?q=gsl_sf_bessel_Jn&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
149bessel_Jn :: Int -> Double -> Double
150bessel_Jn = gsl_sf_bessel_Jn
151foreign import ccall "bessel.h gsl_sf_bessel_Jn" gsl_sf_bessel_Jn :: Int -> Double -> Double
152
153-- | wrapper for int gsl_sf_bessel_Jn_array(int nmin,int nmax,double x,double* result_array);
154--
155-- <http://www.google.com/search?q=gsl_sf_bessel_Jn_array&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
156bessel_Jn_array :: Int -> Int -> Double -> Ptr Double -> Int
157bessel_Jn_array = gsl_sf_bessel_Jn_array
158foreign import ccall "bessel.h gsl_sf_bessel_Jn_array" gsl_sf_bessel_Jn_array :: Int -> Int -> Double -> Ptr Double -> Int
159
160-- | wrapper for int gsl_sf_bessel_Y0_e(double x,gsl_sf_result* result);
161--
162-- <http://www.google.com/search?q=gsl_sf_bessel_Y0_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
163bessel_Y0_e :: Double -> (Double,Double)
164bessel_Y0_e x = createSFR "bessel_Y0_e" $ gsl_sf_bessel_Y0_e x
165foreign import ccall "bessel.h gsl_sf_bessel_Y0_e" gsl_sf_bessel_Y0_e :: Double -> Ptr Double -> IO(Int)
166
167-- | wrapper for double gsl_sf_bessel_Y0(double x);
168--
169-- <http://www.google.com/search?q=gsl_sf_bessel_Y0&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
170bessel_Y0 :: Double -> Double
171bessel_Y0 = gsl_sf_bessel_Y0
172foreign import ccall "bessel.h gsl_sf_bessel_Y0" gsl_sf_bessel_Y0 :: Double -> Double
173
174-- | wrapper for int gsl_sf_bessel_Y1_e(double x,gsl_sf_result* result);
175--
176-- <http://www.google.com/search?q=gsl_sf_bessel_Y1_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
177bessel_Y1_e :: Double -> (Double,Double)
178bessel_Y1_e x = createSFR "bessel_Y1_e" $ gsl_sf_bessel_Y1_e x
179foreign import ccall "bessel.h gsl_sf_bessel_Y1_e" gsl_sf_bessel_Y1_e :: Double -> Ptr Double -> IO(Int)
180
181-- | wrapper for double gsl_sf_bessel_Y1(double x);
182--
183-- <http://www.google.com/search?q=gsl_sf_bessel_Y1&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
184bessel_Y1 :: Double -> Double
185bessel_Y1 = gsl_sf_bessel_Y1
186foreign import ccall "bessel.h gsl_sf_bessel_Y1" gsl_sf_bessel_Y1 :: Double -> Double
187
188-- | wrapper for int gsl_sf_bessel_Yn_e(int n,double x,gsl_sf_result* result);
189--
190-- <http://www.google.com/search?q=gsl_sf_bessel_Yn_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
191bessel_Yn_e :: Int -> Double -> (Double,Double)
192bessel_Yn_e n x = createSFR "bessel_Yn_e" $ gsl_sf_bessel_Yn_e n x
193foreign import ccall "bessel.h gsl_sf_bessel_Yn_e" gsl_sf_bessel_Yn_e :: Int -> Double -> Ptr Double -> IO(Int)
194
195-- | wrapper for double gsl_sf_bessel_Yn(int n,double x);
196--
197-- <http://www.google.com/search?q=gsl_sf_bessel_Yn&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
198bessel_Yn :: Int -> Double -> Double
199bessel_Yn = gsl_sf_bessel_Yn
200foreign import ccall "bessel.h gsl_sf_bessel_Yn" gsl_sf_bessel_Yn :: Int -> Double -> Double
201
202-- | wrapper for int gsl_sf_bessel_Yn_array(int nmin,int nmax,double x,double* result_array);
203--
204-- <http://www.google.com/search?q=gsl_sf_bessel_Yn_array&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
205bessel_Yn_array :: Int -> Int -> Double -> Ptr Double -> Int
206bessel_Yn_array = gsl_sf_bessel_Yn_array
207foreign import ccall "bessel.h gsl_sf_bessel_Yn_array" gsl_sf_bessel_Yn_array :: Int -> Int -> Double -> Ptr Double -> Int
208
209-- | wrapper for int gsl_sf_bessel_I0_e(double x,gsl_sf_result* result);
210--
211-- <http://www.google.com/search?q=gsl_sf_bessel_I0_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
212bessel_I0_e :: Double -> (Double,Double)
213bessel_I0_e x = createSFR "bessel_I0_e" $ gsl_sf_bessel_I0_e x
214foreign import ccall "bessel.h gsl_sf_bessel_I0_e" gsl_sf_bessel_I0_e :: Double -> Ptr Double -> IO(Int)
215
216-- | wrapper for double gsl_sf_bessel_I0(double x);
217--
218-- <http://www.google.com/search?q=gsl_sf_bessel_I0&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
219bessel_I0 :: Double -> Double
220bessel_I0 = gsl_sf_bessel_I0
221foreign import ccall "bessel.h gsl_sf_bessel_I0" gsl_sf_bessel_I0 :: Double -> Double
222
223-- | wrapper for int gsl_sf_bessel_I1_e(double x,gsl_sf_result* result);
224--
225-- <http://www.google.com/search?q=gsl_sf_bessel_I1_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
226bessel_I1_e :: Double -> (Double,Double)
227bessel_I1_e x = createSFR "bessel_I1_e" $ gsl_sf_bessel_I1_e x
228foreign import ccall "bessel.h gsl_sf_bessel_I1_e" gsl_sf_bessel_I1_e :: Double -> Ptr Double -> IO(Int)
229
230-- | wrapper for double gsl_sf_bessel_I1(double x);
231--
232-- <http://www.google.com/search?q=gsl_sf_bessel_I1&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
233bessel_I1 :: Double -> Double
234bessel_I1 = gsl_sf_bessel_I1
235foreign import ccall "bessel.h gsl_sf_bessel_I1" gsl_sf_bessel_I1 :: Double -> Double
236
237-- | wrapper for int gsl_sf_bessel_In_e(int n,double x,gsl_sf_result* result);
238--
239-- <http://www.google.com/search?q=gsl_sf_bessel_In_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
240bessel_In_e :: Int -> Double -> (Double,Double)
241bessel_In_e n x = createSFR "bessel_In_e" $ gsl_sf_bessel_In_e n x
242foreign import ccall "bessel.h gsl_sf_bessel_In_e" gsl_sf_bessel_In_e :: Int -> Double -> Ptr Double -> IO(Int)
243
244-- | wrapper for double gsl_sf_bessel_In(int n,double x);
245--
246-- <http://www.google.com/search?q=gsl_sf_bessel_In&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
247bessel_In :: Int -> Double -> Double
248bessel_In = gsl_sf_bessel_In
249foreign import ccall "bessel.h gsl_sf_bessel_In" gsl_sf_bessel_In :: Int -> Double -> Double
250
251-- | wrapper for int gsl_sf_bessel_In_array(int nmin,int nmax,double x,double* result_array);
252--
253-- <http://www.google.com/search?q=gsl_sf_bessel_In_array&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
254bessel_In_array :: Int -> Int -> Double -> Ptr Double -> Int
255bessel_In_array = gsl_sf_bessel_In_array
256foreign import ccall "bessel.h gsl_sf_bessel_In_array" gsl_sf_bessel_In_array :: Int -> Int -> Double -> Ptr Double -> Int
257
258-- | wrapper for int gsl_sf_bessel_I0_scaled_e(double x,gsl_sf_result* result);
259--
260-- <http://www.google.com/search?q=gsl_sf_bessel_I0_scaled_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
261bessel_I0_scaled_e :: Double -> (Double,Double)
262bessel_I0_scaled_e x = createSFR "bessel_I0_scaled_e" $ gsl_sf_bessel_I0_scaled_e x
263foreign import ccall "bessel.h gsl_sf_bessel_I0_scaled_e" gsl_sf_bessel_I0_scaled_e :: Double -> Ptr Double -> IO(Int)
264
265-- | wrapper for double gsl_sf_bessel_I0_scaled(double x);
266--
267-- <http://www.google.com/search?q=gsl_sf_bessel_I0_scaled&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
268bessel_I0_scaled :: Double -> Double
269bessel_I0_scaled = gsl_sf_bessel_I0_scaled
270foreign import ccall "bessel.h gsl_sf_bessel_I0_scaled" gsl_sf_bessel_I0_scaled :: Double -> Double
271
272-- | wrapper for int gsl_sf_bessel_I1_scaled_e(double x,gsl_sf_result* result);
273--
274-- <http://www.google.com/search?q=gsl_sf_bessel_I1_scaled_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
275bessel_I1_scaled_e :: Double -> (Double,Double)
276bessel_I1_scaled_e x = createSFR "bessel_I1_scaled_e" $ gsl_sf_bessel_I1_scaled_e x
277foreign import ccall "bessel.h gsl_sf_bessel_I1_scaled_e" gsl_sf_bessel_I1_scaled_e :: Double -> Ptr Double -> IO(Int)
278
279-- | wrapper for double gsl_sf_bessel_I1_scaled(double x);
280--
281-- <http://www.google.com/search?q=gsl_sf_bessel_I1_scaled&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
282bessel_I1_scaled :: Double -> Double
283bessel_I1_scaled = gsl_sf_bessel_I1_scaled
284foreign import ccall "bessel.h gsl_sf_bessel_I1_scaled" gsl_sf_bessel_I1_scaled :: Double -> Double
285
286-- | wrapper for int gsl_sf_bessel_In_scaled_e(int n,double x,gsl_sf_result* result);
287--
288-- <http://www.google.com/search?q=gsl_sf_bessel_In_scaled_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
289bessel_In_scaled_e :: Int -> Double -> (Double,Double)
290bessel_In_scaled_e n x = createSFR "bessel_In_scaled_e" $ gsl_sf_bessel_In_scaled_e n x
291foreign import ccall "bessel.h gsl_sf_bessel_In_scaled_e" gsl_sf_bessel_In_scaled_e :: Int -> Double -> Ptr Double -> IO(Int)
292
293-- | wrapper for double gsl_sf_bessel_In_scaled(int n,double x);
294--
295-- <http://www.google.com/search?q=gsl_sf_bessel_In_scaled&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
296bessel_In_scaled :: Int -> Double -> Double
297bessel_In_scaled = gsl_sf_bessel_In_scaled
298foreign import ccall "bessel.h gsl_sf_bessel_In_scaled" gsl_sf_bessel_In_scaled :: Int -> Double -> Double
299
300-- | wrapper for int gsl_sf_bessel_In_scaled_array(int nmin,int nmax,double x,double* result_array);
301--
302-- <http://www.google.com/search?q=gsl_sf_bessel_In_scaled_array&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
303bessel_In_scaled_array :: Int -> Int -> Double -> Ptr Double -> Int
304bessel_In_scaled_array = gsl_sf_bessel_In_scaled_array
305foreign import ccall "bessel.h gsl_sf_bessel_In_scaled_array" gsl_sf_bessel_In_scaled_array :: Int -> Int -> Double -> Ptr Double -> Int
306
307-- | wrapper for int gsl_sf_bessel_K0_e(double x,gsl_sf_result* result);
308--
309-- <http://www.google.com/search?q=gsl_sf_bessel_K0_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
310bessel_K0_e :: Double -> (Double,Double)
311bessel_K0_e x = createSFR "bessel_K0_e" $ gsl_sf_bessel_K0_e x
312foreign import ccall "bessel.h gsl_sf_bessel_K0_e" gsl_sf_bessel_K0_e :: Double -> Ptr Double -> IO(Int)
313
314-- | wrapper for double gsl_sf_bessel_K0(double x);
315--
316-- <http://www.google.com/search?q=gsl_sf_bessel_K0&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
317bessel_K0 :: Double -> Double
318bessel_K0 = gsl_sf_bessel_K0
319foreign import ccall "bessel.h gsl_sf_bessel_K0" gsl_sf_bessel_K0 :: Double -> Double
320
321-- | wrapper for int gsl_sf_bessel_K1_e(double x,gsl_sf_result* result);
322--
323-- <http://www.google.com/search?q=gsl_sf_bessel_K1_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
324bessel_K1_e :: Double -> (Double,Double)
325bessel_K1_e x = createSFR "bessel_K1_e" $ gsl_sf_bessel_K1_e x
326foreign import ccall "bessel.h gsl_sf_bessel_K1_e" gsl_sf_bessel_K1_e :: Double -> Ptr Double -> IO(Int)
327
328-- | wrapper for double gsl_sf_bessel_K1(double x);
329--
330-- <http://www.google.com/search?q=gsl_sf_bessel_K1&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
331bessel_K1 :: Double -> Double
332bessel_K1 = gsl_sf_bessel_K1
333foreign import ccall "bessel.h gsl_sf_bessel_K1" gsl_sf_bessel_K1 :: Double -> Double
334
335-- | wrapper for int gsl_sf_bessel_Kn_e(int n,double x,gsl_sf_result* result);
336--
337-- <http://www.google.com/search?q=gsl_sf_bessel_Kn_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
338bessel_Kn_e :: Int -> Double -> (Double,Double)
339bessel_Kn_e n x = createSFR "bessel_Kn_e" $ gsl_sf_bessel_Kn_e n x
340foreign import ccall "bessel.h gsl_sf_bessel_Kn_e" gsl_sf_bessel_Kn_e :: Int -> Double -> Ptr Double -> IO(Int)
341
342-- | wrapper for double gsl_sf_bessel_Kn(int n,double x);
343--
344-- <http://www.google.com/search?q=gsl_sf_bessel_Kn&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
345bessel_Kn :: Int -> Double -> Double
346bessel_Kn = gsl_sf_bessel_Kn
347foreign import ccall "bessel.h gsl_sf_bessel_Kn" gsl_sf_bessel_Kn :: Int -> Double -> Double
348
349-- | wrapper for int gsl_sf_bessel_Kn_array(int nmin,int nmax,double x,double* result_array);
350--
351-- <http://www.google.com/search?q=gsl_sf_bessel_Kn_array&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
352bessel_Kn_array :: Int -> Int -> Double -> Ptr Double -> Int
353bessel_Kn_array = gsl_sf_bessel_Kn_array
354foreign import ccall "bessel.h gsl_sf_bessel_Kn_array" gsl_sf_bessel_Kn_array :: Int -> Int -> Double -> Ptr Double -> Int
355
356-- | wrapper for int gsl_sf_bessel_K0_scaled_e(double x,gsl_sf_result* result);
357--
358-- <http://www.google.com/search?q=gsl_sf_bessel_K0_scaled_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
359bessel_K0_scaled_e :: Double -> (Double,Double)
360bessel_K0_scaled_e x = createSFR "bessel_K0_scaled_e" $ gsl_sf_bessel_K0_scaled_e x
361foreign import ccall "bessel.h gsl_sf_bessel_K0_scaled_e" gsl_sf_bessel_K0_scaled_e :: Double -> Ptr Double -> IO(Int)
362
363-- | wrapper for double gsl_sf_bessel_K0_scaled(double x);
364--
365-- <http://www.google.com/search?q=gsl_sf_bessel_K0_scaled&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
366bessel_K0_scaled :: Double -> Double
367bessel_K0_scaled = gsl_sf_bessel_K0_scaled
368foreign import ccall "bessel.h gsl_sf_bessel_K0_scaled" gsl_sf_bessel_K0_scaled :: Double -> Double
369
370-- | wrapper for int gsl_sf_bessel_K1_scaled_e(double x,gsl_sf_result* result);
371--
372-- <http://www.google.com/search?q=gsl_sf_bessel_K1_scaled_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
373bessel_K1_scaled_e :: Double -> (Double,Double)
374bessel_K1_scaled_e x = createSFR "bessel_K1_scaled_e" $ gsl_sf_bessel_K1_scaled_e x
375foreign import ccall "bessel.h gsl_sf_bessel_K1_scaled_e" gsl_sf_bessel_K1_scaled_e :: Double -> Ptr Double -> IO(Int)
376
377-- | wrapper for double gsl_sf_bessel_K1_scaled(double x);
378--
379-- <http://www.google.com/search?q=gsl_sf_bessel_K1_scaled&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
380bessel_K1_scaled :: Double -> Double
381bessel_K1_scaled = gsl_sf_bessel_K1_scaled
382foreign import ccall "bessel.h gsl_sf_bessel_K1_scaled" gsl_sf_bessel_K1_scaled :: Double -> Double
383
384-- | wrapper for int gsl_sf_bessel_Kn_scaled_e(int n,double x,gsl_sf_result* result);
385--
386-- <http://www.google.com/search?q=gsl_sf_bessel_Kn_scaled_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
387bessel_Kn_scaled_e :: Int -> Double -> (Double,Double)
388bessel_Kn_scaled_e n x = createSFR "bessel_Kn_scaled_e" $ gsl_sf_bessel_Kn_scaled_e n x
389foreign import ccall "bessel.h gsl_sf_bessel_Kn_scaled_e" gsl_sf_bessel_Kn_scaled_e :: Int -> Double -> Ptr Double -> IO(Int)
390
391-- | wrapper for double gsl_sf_bessel_Kn_scaled(int n,double x);
392--
393-- <http://www.google.com/search?q=gsl_sf_bessel_Kn_scaled&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
394bessel_Kn_scaled :: Int -> Double -> Double
395bessel_Kn_scaled = gsl_sf_bessel_Kn_scaled
396foreign import ccall "bessel.h gsl_sf_bessel_Kn_scaled" gsl_sf_bessel_Kn_scaled :: Int -> Double -> Double
397
398-- | wrapper for int gsl_sf_bessel_Kn_scaled_array(int nmin,int nmax,double x,double* result_array);
399--
400-- <http://www.google.com/search?q=gsl_sf_bessel_Kn_scaled_array&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
401bessel_Kn_scaled_array :: Int -> Int -> Double -> Ptr Double -> Int
402bessel_Kn_scaled_array = gsl_sf_bessel_Kn_scaled_array
403foreign import ccall "bessel.h gsl_sf_bessel_Kn_scaled_array" gsl_sf_bessel_Kn_scaled_array :: Int -> Int -> Double -> Ptr Double -> Int
404
405-- | wrapper for int gsl_sf_bessel_j0_e(double x,gsl_sf_result* result);
406--
407-- <http://www.google.com/search?q=gsl_sf_bessel_j0_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
408bessel_j0_e :: Double -> (Double,Double)
409bessel_j0_e x = createSFR "bessel_j0_e" $ gsl_sf_bessel_j0_e x
410foreign import ccall "bessel.h gsl_sf_bessel_j0_e" gsl_sf_bessel_j0_e :: Double -> Ptr Double -> IO(Int)
411
412-- | wrapper for double gsl_sf_bessel_j0(double x);
413--
414-- <http://www.google.com/search?q=gsl_sf_bessel_j0&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
415bessel_j0 :: Double -> Double
416bessel_j0 = gsl_sf_bessel_j0
417foreign import ccall "bessel.h gsl_sf_bessel_j0" gsl_sf_bessel_j0 :: Double -> Double
418
419-- | wrapper for int gsl_sf_bessel_j1_e(double x,gsl_sf_result* result);
420--
421-- <http://www.google.com/search?q=gsl_sf_bessel_j1_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
422bessel_j1_e :: Double -> (Double,Double)
423bessel_j1_e x = createSFR "bessel_j1_e" $ gsl_sf_bessel_j1_e x
424foreign import ccall "bessel.h gsl_sf_bessel_j1_e" gsl_sf_bessel_j1_e :: Double -> Ptr Double -> IO(Int)
425
426-- | wrapper for double gsl_sf_bessel_j1(double x);
427--
428-- <http://www.google.com/search?q=gsl_sf_bessel_j1&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
429bessel_j1 :: Double -> Double
430bessel_j1 = gsl_sf_bessel_j1
431foreign import ccall "bessel.h gsl_sf_bessel_j1" gsl_sf_bessel_j1 :: Double -> Double
432
433-- | wrapper for int gsl_sf_bessel_j2_e(double x,gsl_sf_result* result);
434--
435-- <http://www.google.com/search?q=gsl_sf_bessel_j2_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
436bessel_j2_e :: Double -> (Double,Double)
437bessel_j2_e x = createSFR "bessel_j2_e" $ gsl_sf_bessel_j2_e x
438foreign import ccall "bessel.h gsl_sf_bessel_j2_e" gsl_sf_bessel_j2_e :: Double -> Ptr Double -> IO(Int)
439
440-- | wrapper for double gsl_sf_bessel_j2(double x);
441--
442-- <http://www.google.com/search?q=gsl_sf_bessel_j2&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
443bessel_j2 :: Double -> Double
444bessel_j2 = gsl_sf_bessel_j2
445foreign import ccall "bessel.h gsl_sf_bessel_j2" gsl_sf_bessel_j2 :: Double -> Double
446
447-- | wrapper for int gsl_sf_bessel_jl_e(int l,double x,gsl_sf_result* result);
448--
449-- <http://www.google.com/search?q=gsl_sf_bessel_jl_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
450bessel_jl_e :: Int -> Double -> (Double,Double)
451bessel_jl_e l x = createSFR "bessel_jl_e" $ gsl_sf_bessel_jl_e l x
452foreign import ccall "bessel.h gsl_sf_bessel_jl_e" gsl_sf_bessel_jl_e :: Int -> Double -> Ptr Double -> IO(Int)
453
454-- | wrapper for double gsl_sf_bessel_jl(int l,double x);
455--
456-- <http://www.google.com/search?q=gsl_sf_bessel_jl&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
457bessel_jl :: Int -> Double -> Double
458bessel_jl = gsl_sf_bessel_jl
459foreign import ccall "bessel.h gsl_sf_bessel_jl" gsl_sf_bessel_jl :: Int -> Double -> Double
460
461-- | wrapper for int gsl_sf_bessel_jl_array(int lmax,double x,double* result_array);
462--
463-- <http://www.google.com/search?q=gsl_sf_bessel_jl_array&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
464bessel_jl_array :: Int -> Double -> Ptr Double -> Int
465bessel_jl_array = gsl_sf_bessel_jl_array
466foreign import ccall "bessel.h gsl_sf_bessel_jl_array" gsl_sf_bessel_jl_array :: Int -> Double -> Ptr Double -> Int
467
468-- | wrapper for int gsl_sf_bessel_jl_steed_array(int lmax,double x,double* jl_x_array);
469--
470-- <http://www.google.com/search?q=gsl_sf_bessel_jl_steed_array&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
471bessel_jl_steed_array :: Int -> Double -> Ptr Double -> Int
472bessel_jl_steed_array = gsl_sf_bessel_jl_steed_array
473foreign import ccall "bessel.h gsl_sf_bessel_jl_steed_array" gsl_sf_bessel_jl_steed_array :: Int -> Double -> Ptr Double -> Int
474
475-- | wrapper for int gsl_sf_bessel_y0_e(double x,gsl_sf_result* result);
476--
477-- <http://www.google.com/search?q=gsl_sf_bessel_y0_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
478bessel_y0_e :: Double -> (Double,Double)
479bessel_y0_e x = createSFR "bessel_y0_e" $ gsl_sf_bessel_y0_e x
480foreign import ccall "bessel.h gsl_sf_bessel_y0_e" gsl_sf_bessel_y0_e :: Double -> Ptr Double -> IO(Int)
481
482-- | wrapper for double gsl_sf_bessel_y0(double x);
483--
484-- <http://www.google.com/search?q=gsl_sf_bessel_y0&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
485bessel_y0 :: Double -> Double
486bessel_y0 = gsl_sf_bessel_y0
487foreign import ccall "bessel.h gsl_sf_bessel_y0" gsl_sf_bessel_y0 :: Double -> Double
488
489-- | wrapper for int gsl_sf_bessel_y1_e(double x,gsl_sf_result* result);
490--
491-- <http://www.google.com/search?q=gsl_sf_bessel_y1_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
492bessel_y1_e :: Double -> (Double,Double)
493bessel_y1_e x = createSFR "bessel_y1_e" $ gsl_sf_bessel_y1_e x
494foreign import ccall "bessel.h gsl_sf_bessel_y1_e" gsl_sf_bessel_y1_e :: Double -> Ptr Double -> IO(Int)
495
496-- | wrapper for double gsl_sf_bessel_y1(double x);
497--
498-- <http://www.google.com/search?q=gsl_sf_bessel_y1&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
499bessel_y1 :: Double -> Double
500bessel_y1 = gsl_sf_bessel_y1
501foreign import ccall "bessel.h gsl_sf_bessel_y1" gsl_sf_bessel_y1 :: Double -> Double
502
503-- | wrapper for int gsl_sf_bessel_y2_e(double x,gsl_sf_result* result);
504--
505-- <http://www.google.com/search?q=gsl_sf_bessel_y2_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
506bessel_y2_e :: Double -> (Double,Double)
507bessel_y2_e x = createSFR "bessel_y2_e" $ gsl_sf_bessel_y2_e x
508foreign import ccall "bessel.h gsl_sf_bessel_y2_e" gsl_sf_bessel_y2_e :: Double -> Ptr Double -> IO(Int)
509
510-- | wrapper for double gsl_sf_bessel_y2(double x);
511--
512-- <http://www.google.com/search?q=gsl_sf_bessel_y2&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
513bessel_y2 :: Double -> Double
514bessel_y2 = gsl_sf_bessel_y2
515foreign import ccall "bessel.h gsl_sf_bessel_y2" gsl_sf_bessel_y2 :: Double -> Double
516
517-- | wrapper for int gsl_sf_bessel_yl_e(int l,double x,gsl_sf_result* result);
518--
519-- <http://www.google.com/search?q=gsl_sf_bessel_yl_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
520bessel_yl_e :: Int -> Double -> (Double,Double)
521bessel_yl_e l x = createSFR "bessel_yl_e" $ gsl_sf_bessel_yl_e l x
522foreign import ccall "bessel.h gsl_sf_bessel_yl_e" gsl_sf_bessel_yl_e :: Int -> Double -> Ptr Double -> IO(Int)
523
524-- | wrapper for double gsl_sf_bessel_yl(int l,double x);
525--
526-- <http://www.google.com/search?q=gsl_sf_bessel_yl&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
527bessel_yl :: Int -> Double -> Double
528bessel_yl = gsl_sf_bessel_yl
529foreign import ccall "bessel.h gsl_sf_bessel_yl" gsl_sf_bessel_yl :: Int -> Double -> Double
530
531-- | wrapper for int gsl_sf_bessel_yl_array(int lmax,double x,double* result_array);
532--
533-- <http://www.google.com/search?q=gsl_sf_bessel_yl_array&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
534bessel_yl_array :: Int -> Double -> Ptr Double -> Int
535bessel_yl_array = gsl_sf_bessel_yl_array
536foreign import ccall "bessel.h gsl_sf_bessel_yl_array" gsl_sf_bessel_yl_array :: Int -> Double -> Ptr Double -> Int
537
538-- | wrapper for int gsl_sf_bessel_i0_scaled_e(double x,gsl_sf_result* result);
539--
540-- <http://www.google.com/search?q=gsl_sf_bessel_i0_scaled_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
541bessel_i0_scaled_e :: Double -> (Double,Double)
542bessel_i0_scaled_e x = createSFR "bessel_i0_scaled_e" $ gsl_sf_bessel_i0_scaled_e x
543foreign import ccall "bessel.h gsl_sf_bessel_i0_scaled_e" gsl_sf_bessel_i0_scaled_e :: Double -> Ptr Double -> IO(Int)
544
545-- | wrapper for double gsl_sf_bessel_i0_scaled(double x);
546--
547-- <http://www.google.com/search?q=gsl_sf_bessel_i0_scaled&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
548bessel_i0_scaled :: Double -> Double
549bessel_i0_scaled = gsl_sf_bessel_i0_scaled
550foreign import ccall "bessel.h gsl_sf_bessel_i0_scaled" gsl_sf_bessel_i0_scaled :: Double -> Double
551
552-- | wrapper for int gsl_sf_bessel_i1_scaled_e(double x,gsl_sf_result* result);
553--
554-- <http://www.google.com/search?q=gsl_sf_bessel_i1_scaled_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
555bessel_i1_scaled_e :: Double -> (Double,Double)
556bessel_i1_scaled_e x = createSFR "bessel_i1_scaled_e" $ gsl_sf_bessel_i1_scaled_e x
557foreign import ccall "bessel.h gsl_sf_bessel_i1_scaled_e" gsl_sf_bessel_i1_scaled_e :: Double -> Ptr Double -> IO(Int)
558
559-- | wrapper for double gsl_sf_bessel_i1_scaled(double x);
560--
561-- <http://www.google.com/search?q=gsl_sf_bessel_i1_scaled&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
562bessel_i1_scaled :: Double -> Double
563bessel_i1_scaled = gsl_sf_bessel_i1_scaled
564foreign import ccall "bessel.h gsl_sf_bessel_i1_scaled" gsl_sf_bessel_i1_scaled :: Double -> Double
565
566-- | wrapper for int gsl_sf_bessel_i2_scaled_e(double x,gsl_sf_result* result);
567--
568-- <http://www.google.com/search?q=gsl_sf_bessel_i2_scaled_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
569bessel_i2_scaled_e :: Double -> (Double,Double)
570bessel_i2_scaled_e x = createSFR "bessel_i2_scaled_e" $ gsl_sf_bessel_i2_scaled_e x
571foreign import ccall "bessel.h gsl_sf_bessel_i2_scaled_e" gsl_sf_bessel_i2_scaled_e :: Double -> Ptr Double -> IO(Int)
572
573-- | wrapper for double gsl_sf_bessel_i2_scaled(double x);
574--
575-- <http://www.google.com/search?q=gsl_sf_bessel_i2_scaled&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
576bessel_i2_scaled :: Double -> Double
577bessel_i2_scaled = gsl_sf_bessel_i2_scaled
578foreign import ccall "bessel.h gsl_sf_bessel_i2_scaled" gsl_sf_bessel_i2_scaled :: Double -> Double
579
580-- | wrapper for int gsl_sf_bessel_il_scaled_e(int l,double x,gsl_sf_result* result);
581--
582-- <http://www.google.com/search?q=gsl_sf_bessel_il_scaled_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
583bessel_il_scaled_e :: Int -> Double -> (Double,Double)
584bessel_il_scaled_e l x = createSFR "bessel_il_scaled_e" $ gsl_sf_bessel_il_scaled_e l x
585foreign import ccall "bessel.h gsl_sf_bessel_il_scaled_e" gsl_sf_bessel_il_scaled_e :: Int -> Double -> Ptr Double -> IO(Int)
586
587-- | wrapper for double gsl_sf_bessel_il_scaled(int l,double x);
588--
589-- <http://www.google.com/search?q=gsl_sf_bessel_il_scaled&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
590bessel_il_scaled :: Int -> Double -> Double
591bessel_il_scaled = gsl_sf_bessel_il_scaled
592foreign import ccall "bessel.h gsl_sf_bessel_il_scaled" gsl_sf_bessel_il_scaled :: Int -> Double -> Double
593
594-- | wrapper for int gsl_sf_bessel_il_scaled_array(int lmax,double x,double* result_array);
595--
596-- <http://www.google.com/search?q=gsl_sf_bessel_il_scaled_array&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
597bessel_il_scaled_array :: Int -> Double -> Ptr Double -> Int
598bessel_il_scaled_array = gsl_sf_bessel_il_scaled_array
599foreign import ccall "bessel.h gsl_sf_bessel_il_scaled_array" gsl_sf_bessel_il_scaled_array :: Int -> Double -> Ptr Double -> Int
600
601-- | wrapper for int gsl_sf_bessel_k0_scaled_e(double x,gsl_sf_result* result);
602--
603-- <http://www.google.com/search?q=gsl_sf_bessel_k0_scaled_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
604bessel_k0_scaled_e :: Double -> (Double,Double)
605bessel_k0_scaled_e x = createSFR "bessel_k0_scaled_e" $ gsl_sf_bessel_k0_scaled_e x
606foreign import ccall "bessel.h gsl_sf_bessel_k0_scaled_e" gsl_sf_bessel_k0_scaled_e :: Double -> Ptr Double -> IO(Int)
607
608-- | wrapper for double gsl_sf_bessel_k0_scaled(double x);
609--
610-- <http://www.google.com/search?q=gsl_sf_bessel_k0_scaled&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
611bessel_k0_scaled :: Double -> Double
612bessel_k0_scaled = gsl_sf_bessel_k0_scaled
613foreign import ccall "bessel.h gsl_sf_bessel_k0_scaled" gsl_sf_bessel_k0_scaled :: Double -> Double
614
615-- | wrapper for int gsl_sf_bessel_k1_scaled_e(double x,gsl_sf_result* result);
616--
617-- <http://www.google.com/search?q=gsl_sf_bessel_k1_scaled_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
618bessel_k1_scaled_e :: Double -> (Double,Double)
619bessel_k1_scaled_e x = createSFR "bessel_k1_scaled_e" $ gsl_sf_bessel_k1_scaled_e x
620foreign import ccall "bessel.h gsl_sf_bessel_k1_scaled_e" gsl_sf_bessel_k1_scaled_e :: Double -> Ptr Double -> IO(Int)
621
622-- | wrapper for double gsl_sf_bessel_k1_scaled(double x);
623--
624-- <http://www.google.com/search?q=gsl_sf_bessel_k1_scaled&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
625bessel_k1_scaled :: Double -> Double
626bessel_k1_scaled = gsl_sf_bessel_k1_scaled
627foreign import ccall "bessel.h gsl_sf_bessel_k1_scaled" gsl_sf_bessel_k1_scaled :: Double -> Double
628
629-- | wrapper for int gsl_sf_bessel_k2_scaled_e(double x,gsl_sf_result* result);
630--
631-- <http://www.google.com/search?q=gsl_sf_bessel_k2_scaled_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
632bessel_k2_scaled_e :: Double -> (Double,Double)
633bessel_k2_scaled_e x = createSFR "bessel_k2_scaled_e" $ gsl_sf_bessel_k2_scaled_e x
634foreign import ccall "bessel.h gsl_sf_bessel_k2_scaled_e" gsl_sf_bessel_k2_scaled_e :: Double -> Ptr Double -> IO(Int)
635
636-- | wrapper for double gsl_sf_bessel_k2_scaled(double x);
637--
638-- <http://www.google.com/search?q=gsl_sf_bessel_k2_scaled&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
639bessel_k2_scaled :: Double -> Double
640bessel_k2_scaled = gsl_sf_bessel_k2_scaled
641foreign import ccall "bessel.h gsl_sf_bessel_k2_scaled" gsl_sf_bessel_k2_scaled :: Double -> Double
642
643-- | wrapper for int gsl_sf_bessel_kl_scaled_e(int l,double x,gsl_sf_result* result);
644--
645-- <http://www.google.com/search?q=gsl_sf_bessel_kl_scaled_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
646bessel_kl_scaled_e :: Int -> Double -> (Double,Double)
647bessel_kl_scaled_e l x = createSFR "bessel_kl_scaled_e" $ gsl_sf_bessel_kl_scaled_e l x
648foreign import ccall "bessel.h gsl_sf_bessel_kl_scaled_e" gsl_sf_bessel_kl_scaled_e :: Int -> Double -> Ptr Double -> IO(Int)
649
650-- | wrapper for double gsl_sf_bessel_kl_scaled(int l,double x);
651--
652-- <http://www.google.com/search?q=gsl_sf_bessel_kl_scaled&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
653bessel_kl_scaled :: Int -> Double -> Double
654bessel_kl_scaled = gsl_sf_bessel_kl_scaled
655foreign import ccall "bessel.h gsl_sf_bessel_kl_scaled" gsl_sf_bessel_kl_scaled :: Int -> Double -> Double
656
657-- | wrapper for int gsl_sf_bessel_kl_scaled_array(int lmax,double x,double* result_array);
658--
659-- <http://www.google.com/search?q=gsl_sf_bessel_kl_scaled_array&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
660bessel_kl_scaled_array :: Int -> Double -> Ptr Double -> Int
661bessel_kl_scaled_array = gsl_sf_bessel_kl_scaled_array
662foreign import ccall "bessel.h gsl_sf_bessel_kl_scaled_array" gsl_sf_bessel_kl_scaled_array :: Int -> Double -> Ptr Double -> Int
663
664-- | wrapper for int gsl_sf_bessel_Jnu_e(double nu,double x,gsl_sf_result* result);
665--
666-- <http://www.google.com/search?q=gsl_sf_bessel_Jnu_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
667bessel_Jnu_e :: Double -> Double -> (Double,Double)
668bessel_Jnu_e nu x = createSFR "bessel_Jnu_e" $ gsl_sf_bessel_Jnu_e nu x
669foreign import ccall "bessel.h gsl_sf_bessel_Jnu_e" gsl_sf_bessel_Jnu_e :: Double -> Double -> Ptr Double -> IO(Int)
670
671-- | wrapper for double gsl_sf_bessel_Jnu(double nu,double x);
672--
673-- <http://www.google.com/search?q=gsl_sf_bessel_Jnu&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
674bessel_Jnu :: Double -> Double -> Double
675bessel_Jnu = gsl_sf_bessel_Jnu
676foreign import ccall "bessel.h gsl_sf_bessel_Jnu" gsl_sf_bessel_Jnu :: Double -> Double -> Double
677
678-- | wrapper for int gsl_sf_bessel_Ynu_e(double nu,double x,gsl_sf_result* result);
679--
680-- <http://www.google.com/search?q=gsl_sf_bessel_Ynu_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
681bessel_Ynu_e :: Double -> Double -> (Double,Double)
682bessel_Ynu_e nu x = createSFR "bessel_Ynu_e" $ gsl_sf_bessel_Ynu_e nu x
683foreign import ccall "bessel.h gsl_sf_bessel_Ynu_e" gsl_sf_bessel_Ynu_e :: Double -> Double -> Ptr Double -> IO(Int)
684
685-- | wrapper for double gsl_sf_bessel_Ynu(double nu,double x);
686--
687-- <http://www.google.com/search?q=gsl_sf_bessel_Ynu&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
688bessel_Ynu :: Double -> Double -> Double
689bessel_Ynu = gsl_sf_bessel_Ynu
690foreign import ccall "bessel.h gsl_sf_bessel_Ynu" gsl_sf_bessel_Ynu :: Double -> Double -> Double
691
692-- | wrapper for int gsl_sf_bessel_sequence_Jnu_e(double nu,gsl_mode_t mode,size_t size,double* v);
693--
694-- <http://www.google.com/search?q=gsl_sf_bessel_sequence_Jnu_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
695bessel_sequence_Jnu_e :: Double -> Precision -> Size_t -> Ptr Double -> Int
696bessel_sequence_Jnu_e nu mode size v = gsl_sf_bessel_sequence_Jnu_e nu (precCode mode) size v
697foreign import ccall "bessel.h gsl_sf_bessel_sequence_Jnu_e" gsl_sf_bessel_sequence_Jnu_e :: Double -> Gsl_mode_t -> Size_t -> Ptr Double -> Int
698
699-- | wrapper for int gsl_sf_bessel_Inu_scaled_e(double nu,double x,gsl_sf_result* result);
700--
701-- <http://www.google.com/search?q=gsl_sf_bessel_Inu_scaled_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
702bessel_Inu_scaled_e :: Double -> Double -> (Double,Double)
703bessel_Inu_scaled_e nu x = createSFR "bessel_Inu_scaled_e" $ gsl_sf_bessel_Inu_scaled_e nu x
704foreign import ccall "bessel.h gsl_sf_bessel_Inu_scaled_e" gsl_sf_bessel_Inu_scaled_e :: Double -> Double -> Ptr Double -> IO(Int)
705
706-- | wrapper for double gsl_sf_bessel_Inu_scaled(double nu,double x);
707--
708-- <http://www.google.com/search?q=gsl_sf_bessel_Inu_scaled&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
709bessel_Inu_scaled :: Double -> Double -> Double
710bessel_Inu_scaled = gsl_sf_bessel_Inu_scaled
711foreign import ccall "bessel.h gsl_sf_bessel_Inu_scaled" gsl_sf_bessel_Inu_scaled :: Double -> Double -> Double
712
713-- | wrapper for int gsl_sf_bessel_Inu_e(double nu,double x,gsl_sf_result* result);
714--
715-- <http://www.google.com/search?q=gsl_sf_bessel_Inu_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
716bessel_Inu_e :: Double -> Double -> (Double,Double)
717bessel_Inu_e nu x = createSFR "bessel_Inu_e" $ gsl_sf_bessel_Inu_e nu x
718foreign import ccall "bessel.h gsl_sf_bessel_Inu_e" gsl_sf_bessel_Inu_e :: Double -> Double -> Ptr Double -> IO(Int)
719
720-- | wrapper for double gsl_sf_bessel_Inu(double nu,double x);
721--
722-- <http://www.google.com/search?q=gsl_sf_bessel_Inu&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
723bessel_Inu :: Double -> Double -> Double
724bessel_Inu = gsl_sf_bessel_Inu
725foreign import ccall "bessel.h gsl_sf_bessel_Inu" gsl_sf_bessel_Inu :: Double -> Double -> Double
726
727-- | wrapper for int gsl_sf_bessel_Knu_scaled_e(double nu,double x,gsl_sf_result* result);
728--
729-- <http://www.google.com/search?q=gsl_sf_bessel_Knu_scaled_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
730bessel_Knu_scaled_e :: Double -> Double -> (Double,Double)
731bessel_Knu_scaled_e nu x = createSFR "bessel_Knu_scaled_e" $ gsl_sf_bessel_Knu_scaled_e nu x
732foreign import ccall "bessel.h gsl_sf_bessel_Knu_scaled_e" gsl_sf_bessel_Knu_scaled_e :: Double -> Double -> Ptr Double -> IO(Int)
733
734-- | wrapper for double gsl_sf_bessel_Knu_scaled(double nu,double x);
735--
736-- <http://www.google.com/search?q=gsl_sf_bessel_Knu_scaled&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
737bessel_Knu_scaled :: Double -> Double -> Double
738bessel_Knu_scaled = gsl_sf_bessel_Knu_scaled
739foreign import ccall "bessel.h gsl_sf_bessel_Knu_scaled" gsl_sf_bessel_Knu_scaled :: Double -> Double -> Double
740
741-- | wrapper for int gsl_sf_bessel_Knu_e(double nu,double x,gsl_sf_result* result);
742--
743-- <http://www.google.com/search?q=gsl_sf_bessel_Knu_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
744bessel_Knu_e :: Double -> Double -> (Double,Double)
745bessel_Knu_e nu x = createSFR "bessel_Knu_e" $ gsl_sf_bessel_Knu_e nu x
746foreign import ccall "bessel.h gsl_sf_bessel_Knu_e" gsl_sf_bessel_Knu_e :: Double -> Double -> Ptr Double -> IO(Int)
747
748-- | wrapper for double gsl_sf_bessel_Knu(double nu,double x);
749--
750-- <http://www.google.com/search?q=gsl_sf_bessel_Knu&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
751bessel_Knu :: Double -> Double -> Double
752bessel_Knu = gsl_sf_bessel_Knu
753foreign import ccall "bessel.h gsl_sf_bessel_Knu" gsl_sf_bessel_Knu :: Double -> Double -> Double
754
755-- | wrapper for int gsl_sf_bessel_lnKnu_e(double nu,double x,gsl_sf_result* result);
756--
757-- <http://www.google.com/search?q=gsl_sf_bessel_lnKnu_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
758bessel_lnKnu_e :: Double -> Double -> (Double,Double)
759bessel_lnKnu_e nu x = createSFR "bessel_lnKnu_e" $ gsl_sf_bessel_lnKnu_e nu x
760foreign import ccall "bessel.h gsl_sf_bessel_lnKnu_e" gsl_sf_bessel_lnKnu_e :: Double -> Double -> Ptr Double -> IO(Int)
761
762-- | wrapper for double gsl_sf_bessel_lnKnu(double nu,double x);
763--
764-- <http://www.google.com/search?q=gsl_sf_bessel_lnKnu&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
765bessel_lnKnu :: Double -> Double -> Double
766bessel_lnKnu = gsl_sf_bessel_lnKnu
767foreign import ccall "bessel.h gsl_sf_bessel_lnKnu" gsl_sf_bessel_lnKnu :: Double -> Double -> Double
768
769-- | wrapper for int gsl_sf_bessel_zero_J0_e(int s,gsl_sf_result* result);
770--
771-- <http://www.google.com/search?q=gsl_sf_bessel_zero_J0_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
772bessel_zero_J0_e :: Int -> (Double,Double)
773bessel_zero_J0_e s = createSFR "bessel_zero_J0_e" $ gsl_sf_bessel_zero_J0_e s
774foreign import ccall "bessel.h gsl_sf_bessel_zero_J0_e" gsl_sf_bessel_zero_J0_e :: Int -> Ptr Double -> IO(Int)
775
776-- | wrapper for double gsl_sf_bessel_zero_J0(int s);
777--
778-- <http://www.google.com/search?q=gsl_sf_bessel_zero_J0&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
779bessel_zero_J0 :: Int -> Double
780bessel_zero_J0 = gsl_sf_bessel_zero_J0
781foreign import ccall "bessel.h gsl_sf_bessel_zero_J0" gsl_sf_bessel_zero_J0 :: Int -> Double
782
783-- | wrapper for int gsl_sf_bessel_zero_J1_e(int s,gsl_sf_result* result);
784--
785-- <http://www.google.com/search?q=gsl_sf_bessel_zero_J1_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
786bessel_zero_J1_e :: Int -> (Double,Double)
787bessel_zero_J1_e s = createSFR "bessel_zero_J1_e" $ gsl_sf_bessel_zero_J1_e s
788foreign import ccall "bessel.h gsl_sf_bessel_zero_J1_e" gsl_sf_bessel_zero_J1_e :: Int -> Ptr Double -> IO(Int)
789
790-- | wrapper for double gsl_sf_bessel_zero_J1(int s);
791--
792-- <http://www.google.com/search?q=gsl_sf_bessel_zero_J1&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
793bessel_zero_J1 :: Int -> Double
794bessel_zero_J1 = gsl_sf_bessel_zero_J1
795foreign import ccall "bessel.h gsl_sf_bessel_zero_J1" gsl_sf_bessel_zero_J1 :: Int -> Double
796
797-- | wrapper for int gsl_sf_bessel_zero_Jnu_e(double nu,int s,gsl_sf_result* result);
798--
799-- <http://www.google.com/search?q=gsl_sf_bessel_zero_Jnu_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
800bessel_zero_Jnu_e :: Double -> Int -> (Double,Double)
801bessel_zero_Jnu_e nu s = createSFR "bessel_zero_Jnu_e" $ gsl_sf_bessel_zero_Jnu_e nu s
802foreign import ccall "bessel.h gsl_sf_bessel_zero_Jnu_e" gsl_sf_bessel_zero_Jnu_e :: Double -> Int -> Ptr Double -> IO(Int)
803
804-- | wrapper for double gsl_sf_bessel_zero_Jnu(double nu,int s);
805--
806-- <http://www.google.com/search?q=gsl_sf_bessel_zero_Jnu&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
807bessel_zero_Jnu :: Double -> Int -> Double
808bessel_zero_Jnu = gsl_sf_bessel_zero_Jnu
809foreign import ccall "bessel.h gsl_sf_bessel_zero_Jnu" gsl_sf_bessel_zero_Jnu :: Double -> Int -> Double
diff --git a/lib/Numeric/GSL/Special/Clausen.hs b/lib/Numeric/GSL/Special/Clausen.hs
new file mode 100644
index 0000000..3052187
--- /dev/null
+++ b/lib/Numeric/GSL/Special/Clausen.hs
@@ -0,0 +1,37 @@
1------------------------------------------------------------
2{- |
3Module : Numeric.GSL.Special.Clausen
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.google.com/search?q=gsl_sf_clausen.h&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
13
14-}
15------------------------------------------------------------
16
17module Numeric.GSL.Special.Clausen(
18 clausen_e
19, clausen
20) where
21
22import Foreign(Ptr)
23import Numeric.GSL.Special.Internal
24
25-- | wrapper for int gsl_sf_clausen_e(double x,gsl_sf_result* result);
26--
27-- <http://www.google.com/search?q=gsl_sf_clausen_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
28clausen_e :: Double -> (Double,Double)
29clausen_e x = createSFR "clausen_e" $ gsl_sf_clausen_e x
30foreign import ccall "clausen.h gsl_sf_clausen_e" gsl_sf_clausen_e :: Double -> Ptr Double -> IO(Int)
31
32-- | wrapper for double gsl_sf_clausen(double x);
33--
34-- <http://www.google.com/search?q=gsl_sf_clausen&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
35clausen :: Double -> Double
36clausen = gsl_sf_clausen
37foreign import ccall "clausen.h gsl_sf_clausen" gsl_sf_clausen :: Double -> Double
diff --git a/lib/Numeric/GSL/Special/Coulomb.hs b/lib/Numeric/GSL/Special/Coulomb.hs
new file mode 100644
index 0000000..06848cb
--- /dev/null
+++ b/lib/Numeric/GSL/Special/Coulomb.hs
@@ -0,0 +1,103 @@
1------------------------------------------------------------
2{- |
3Module : Numeric.GSL.Special.Coulomb
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.google.com/search?q=gsl_sf_coulomb.h&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
13
14-}
15------------------------------------------------------------
16
17module Numeric.GSL.Special.Coulomb(
18 hydrogenicR_1_e
19, hydrogenicR_1
20, hydrogenicR_e
21, hydrogenicR
22, coulomb_CL_e
23) where
24
25import Foreign(Ptr)
26import Numeric.GSL.Special.Internal
27
28-- | wrapper for int gsl_sf_hydrogenicR_1_e(double Z,double r,gsl_sf_result* result);
29--
30-- <http://www.google.com/search?q=gsl_sf_hydrogenicR_1_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
31hydrogenicR_1_e :: Double -> Double -> (Double,Double)
32hydrogenicR_1_e zZ r = createSFR "hydrogenicR_1_e" $ gsl_sf_hydrogenicR_1_e zZ r
33foreign import ccall "coulomb.h gsl_sf_hydrogenicR_1_e" gsl_sf_hydrogenicR_1_e :: Double -> Double -> Ptr Double -> IO(Int)
34
35-- | wrapper for double gsl_sf_hydrogenicR_1(double Z,double r);
36--
37-- <http://www.google.com/search?q=gsl_sf_hydrogenicR_1&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
38hydrogenicR_1 :: Double -> Double -> Double
39hydrogenicR_1 = gsl_sf_hydrogenicR_1
40foreign import ccall "coulomb.h gsl_sf_hydrogenicR_1" gsl_sf_hydrogenicR_1 :: Double -> Double -> Double
41
42-- | wrapper for int gsl_sf_hydrogenicR_e(int n,int l,double Z,double r,gsl_sf_result* result);
43--
44-- <http://www.google.com/search?q=gsl_sf_hydrogenicR_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
45hydrogenicR_e :: Int -> Int -> Double -> Double -> (Double,Double)
46hydrogenicR_e n l zZ r = createSFR "hydrogenicR_e" $ gsl_sf_hydrogenicR_e n l zZ r
47foreign import ccall "coulomb.h gsl_sf_hydrogenicR_e" gsl_sf_hydrogenicR_e :: Int -> Int -> Double -> Double -> Ptr Double -> IO(Int)
48
49-- | wrapper for double gsl_sf_hydrogenicR(int n,int l,double Z,double r);
50--
51-- <http://www.google.com/search?q=gsl_sf_hydrogenicR&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
52hydrogenicR :: Int -> Int -> Double -> Double -> Double
53hydrogenicR = gsl_sf_hydrogenicR
54foreign import ccall "coulomb.h gsl_sf_hydrogenicR" gsl_sf_hydrogenicR :: Int -> Int -> Double -> Double -> Double
55
56-- | wrapper for int gsl_sf_coulomb_wave_FG_e(double eta,double x,double lam_F,int k_lam_G,gsl_sf_result* F,gsl_sf_result* Fp,gsl_sf_result* G,gsl_sf_result* Gp,double* exp_F,double* exp_G);
57--
58-- <http://www.google.com/search?q=gsl_sf_coulomb_wave_FG_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
59coulomb_wave_FG_e :: Double -> Double -> Double -> Int -> Ptr Double -> Ptr Double -> Ptr Double -> Ptr Double -> Ptr Double -> Ptr Double -> Int
60coulomb_wave_FG_e = gsl_sf_coulomb_wave_FG_e
61foreign import ccall "coulomb.h gsl_sf_coulomb_wave_FG_e" gsl_sf_coulomb_wave_FG_e :: Double -> Double -> Double -> Int -> Ptr Double -> Ptr Double -> Ptr Double -> Ptr Double -> Ptr Double -> Ptr Double -> Int
62
63-- | wrapper for int gsl_sf_coulomb_wave_F_array(double lam_min,int kmax,double eta,double x,double* fc_array,double* F_exponent);
64--
65-- <http://www.google.com/search?q=gsl_sf_coulomb_wave_F_array&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
66coulomb_wave_F_array :: Double -> Int -> Double -> Double -> Ptr Double -> Ptr Double -> Int
67coulomb_wave_F_array = gsl_sf_coulomb_wave_F_array
68foreign import ccall "coulomb.h gsl_sf_coulomb_wave_F_array" gsl_sf_coulomb_wave_F_array :: Double -> Int -> Double -> Double -> Ptr Double -> Ptr Double -> Int
69
70-- | wrapper for int gsl_sf_coulomb_wave_FG_array(double lam_min,int kmax,double eta,double x,double* fc_array,double* gc_array,double* F_exponent,double* G_exponent);
71--
72-- <http://www.google.com/search?q=gsl_sf_coulomb_wave_FG_array&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
73coulomb_wave_FG_array :: Double -> Int -> Double -> Double -> Ptr Double -> Ptr Double -> Ptr Double -> Ptr Double -> Int
74coulomb_wave_FG_array = gsl_sf_coulomb_wave_FG_array
75foreign import ccall "coulomb.h gsl_sf_coulomb_wave_FG_array" gsl_sf_coulomb_wave_FG_array :: Double -> Int -> Double -> Double -> Ptr Double -> Ptr Double -> Ptr Double -> Ptr Double -> Int
76
77-- | wrapper for int gsl_sf_coulomb_wave_FGp_array(double lam_min,int kmax,double eta,double x,double* fc_array,double* fcp_array,double* gc_array,double* gcp_array,double* F_exponent,double* G_exponent);
78--
79-- <http://www.google.com/search?q=gsl_sf_coulomb_wave_FGp_array&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
80coulomb_wave_FGp_array :: Double -> Int -> Double -> Double -> Ptr Double -> Ptr Double -> Ptr Double -> Ptr Double -> Ptr Double -> Ptr Double -> Int
81coulomb_wave_FGp_array = gsl_sf_coulomb_wave_FGp_array
82foreign import ccall "coulomb.h gsl_sf_coulomb_wave_FGp_array" gsl_sf_coulomb_wave_FGp_array :: Double -> Int -> Double -> Double -> Ptr Double -> Ptr Double -> Ptr Double -> Ptr Double -> Ptr Double -> Ptr Double -> Int
83
84-- | wrapper for int gsl_sf_coulomb_wave_sphF_array(double lam_min,int kmax,double eta,double x,double* fc_array,double* F_exponent);
85--
86-- <http://www.google.com/search?q=gsl_sf_coulomb_wave_sphF_array&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
87coulomb_wave_sphF_array :: Double -> Int -> Double -> Double -> Ptr Double -> Ptr Double -> Int
88coulomb_wave_sphF_array = gsl_sf_coulomb_wave_sphF_array
89foreign import ccall "coulomb.h gsl_sf_coulomb_wave_sphF_array" gsl_sf_coulomb_wave_sphF_array :: Double -> Int -> Double -> Double -> Ptr Double -> Ptr Double -> Int
90
91-- | wrapper for int gsl_sf_coulomb_CL_e(double L,double eta,gsl_sf_result* result);
92--
93-- <http://www.google.com/search?q=gsl_sf_coulomb_CL_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
94coulomb_CL_e :: Double -> Double -> (Double,Double)
95coulomb_CL_e lL eta = createSFR "coulomb_CL_e" $ gsl_sf_coulomb_CL_e lL eta
96foreign import ccall "coulomb.h gsl_sf_coulomb_CL_e" gsl_sf_coulomb_CL_e :: Double -> Double -> Ptr Double -> IO(Int)
97
98-- | wrapper for int gsl_sf_coulomb_CL_array(double Lmin,int kmax,double eta,double* cl);
99--
100-- <http://www.google.com/search?q=gsl_sf_coulomb_CL_array&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
101coulomb_CL_array :: Double -> Int -> Double -> Ptr Double -> Int
102coulomb_CL_array = gsl_sf_coulomb_CL_array
103foreign import ccall "coulomb.h gsl_sf_coulomb_CL_array" gsl_sf_coulomb_CL_array :: Double -> Int -> Double -> Ptr Double -> Int
diff --git a/lib/Numeric/GSL/Special/Coupling.hs b/lib/Numeric/GSL/Special/Coupling.hs
new file mode 100644
index 0000000..9578b1b
--- /dev/null
+++ b/lib/Numeric/GSL/Special/Coupling.hs
@@ -0,0 +1,81 @@
1------------------------------------------------------------
2{- |
3Module : Numeric.GSL.Special.Coupling
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/Coupling-Coefficients.html>
13
14-}
15------------------------------------------------------------
16
17module Numeric.GSL.Special.Coupling(
18 coupling_3j_e
19, coupling_3j
20, coupling_6j_e
21, coupling_6j
22, coupling_RacahW_e
23, coupling_RacahW
24, coupling_9j_e
25, coupling_9j
26-- , coupling_6j_INCORRECT_e
27-- , coupling_6j_INCORRECT
28) where
29
30import Foreign(Ptr)
31import Numeric.GSL.Special.Internal
32
33-- | wrapper for int gsl_sf_coupling_3j_e(int two_ja,int two_jb,int two_jc,int two_ma,int two_mb,int two_mc,gsl_sf_result* result);
34coupling_3j_e :: Int -> Int -> Int -> Int -> Int -> Int -> (Double,Double)
35coupling_3j_e two_ja two_jb two_jc two_ma two_mb two_mc = createSFR "coupling_3j_e" $ gsl_sf_coupling_3j_e two_ja two_jb two_jc two_ma two_mb two_mc
36foreign import ccall "coupling.h gsl_sf_coupling_3j_e" gsl_sf_coupling_3j_e :: Int -> Int -> Int -> Int -> Int -> Int -> Ptr Double -> IO(Int)
37
38-- | wrapper for double gsl_sf_coupling_3j(int two_ja,int two_jb,int two_jc,int two_ma,int two_mb,int two_mc);
39coupling_3j :: Int -> Int -> Int -> Int -> Int -> Int -> Double
40coupling_3j = gsl_sf_coupling_3j
41foreign import ccall "coupling.h gsl_sf_coupling_3j" gsl_sf_coupling_3j :: Int -> Int -> Int -> Int -> Int -> Int -> Double
42
43-- | wrapper for int gsl_sf_coupling_6j_e(int two_ja,int two_jb,int two_jc,int two_jd,int two_je,int two_jf,gsl_sf_result* result);
44coupling_6j_e :: Int -> Int -> Int -> Int -> Int -> Int -> (Double,Double)
45coupling_6j_e two_ja two_jb two_jc two_jd two_je two_jf = createSFR "coupling_6j_e" $ gsl_sf_coupling_6j_e two_ja two_jb two_jc two_jd two_je two_jf
46foreign import ccall "coupling.h gsl_sf_coupling_6j_e" gsl_sf_coupling_6j_e :: Int -> Int -> Int -> Int -> Int -> Int -> Ptr Double -> IO(Int)
47
48-- | wrapper for double gsl_sf_coupling_6j(int two_ja,int two_jb,int two_jc,int two_jd,int two_je,int two_jf);
49coupling_6j :: Int -> Int -> Int -> Int -> Int -> Int -> Double
50coupling_6j = gsl_sf_coupling_6j
51foreign import ccall "coupling.h gsl_sf_coupling_6j" gsl_sf_coupling_6j :: Int -> Int -> Int -> Int -> Int -> Int -> Double
52
53-- | wrapper for int gsl_sf_coupling_RacahW_e(int two_ja,int two_jb,int two_jc,int two_jd,int two_je,int two_jf,gsl_sf_result* result);
54coupling_RacahW_e :: Int -> Int -> Int -> Int -> Int -> Int -> (Double,Double)
55coupling_RacahW_e two_ja two_jb two_jc two_jd two_je two_jf = createSFR "coupling_RacahW_e" $ gsl_sf_coupling_RacahW_e two_ja two_jb two_jc two_jd two_je two_jf
56foreign import ccall "coupling.h gsl_sf_coupling_RacahW_e" gsl_sf_coupling_RacahW_e :: Int -> Int -> Int -> Int -> Int -> Int -> Ptr Double -> IO(Int)
57
58-- | wrapper for double gsl_sf_coupling_RacahW(int two_ja,int two_jb,int two_jc,int two_jd,int two_je,int two_jf);
59coupling_RacahW :: Int -> Int -> Int -> Int -> Int -> Int -> Double
60coupling_RacahW = gsl_sf_coupling_RacahW
61foreign import ccall "coupling.h gsl_sf_coupling_RacahW" gsl_sf_coupling_RacahW :: Int -> Int -> Int -> Int -> Int -> Int -> Double
62
63-- | wrapper for int gsl_sf_coupling_9j_e(int two_ja,int two_jb,int two_jc,int two_jd,int two_je,int two_jf,int two_jg,int two_jh,int two_ji,gsl_sf_result* result);
64coupling_9j_e :: Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> (Double,Double)
65coupling_9j_e two_ja two_jb two_jc two_jd two_je two_jf two_jg two_jh two_ji = createSFR "coupling_9j_e" $ gsl_sf_coupling_9j_e two_ja two_jb two_jc two_jd two_je two_jf two_jg two_jh two_ji
66foreign import ccall "coupling.h gsl_sf_coupling_9j_e" gsl_sf_coupling_9j_e :: Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Ptr Double -> IO(Int)
67
68-- | wrapper for double gsl_sf_coupling_9j(int two_ja,int two_jb,int two_jc,int two_jd,int two_je,int two_jf,int two_jg,int two_jh,int two_ji);
69coupling_9j :: Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Double
70coupling_9j = gsl_sf_coupling_9j
71foreign import ccall "coupling.h gsl_sf_coupling_9j" gsl_sf_coupling_9j :: Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Double
72
73-- | wrapper for int gsl_sf_coupling_6j_INCORRECT_e(int two_ja,int two_jb,int two_jc,int two_jd,int two_je,int two_jf,gsl_sf_result* result);
74coupling_6j_INCORRECT_e :: Int -> Int -> Int -> Int -> Int -> Int -> (Double,Double)
75coupling_6j_INCORRECT_e two_ja two_jb two_jc two_jd two_je two_jf = createSFR "coupling_6j_INCORRECT_e" $ gsl_sf_coupling_6j_INCORRECT_e two_ja two_jb two_jc two_jd two_je two_jf
76foreign import ccall "coupling.h gsl_sf_coupling_6j_INCORRECT_e" gsl_sf_coupling_6j_INCORRECT_e :: Int -> Int -> Int -> Int -> Int -> Int -> Ptr Double -> IO(Int)
77
78-- | wrapper for double gsl_sf_coupling_6j_INCORRECT(int two_ja,int two_jb,int two_jc,int two_jd,int two_je,int two_jf);
79coupling_6j_INCORRECT :: Int -> Int -> Int -> Int -> Int -> Int -> Double
80coupling_6j_INCORRECT = gsl_sf_coupling_6j_INCORRECT
81foreign import ccall "coupling.h gsl_sf_coupling_6j_INCORRECT" gsl_sf_coupling_6j_INCORRECT :: Int -> Int -> Int -> Int -> Int -> Int -> Double
diff --git a/lib/Numeric/GSL/Special/Dawson.hs b/lib/Numeric/GSL/Special/Dawson.hs
new file mode 100644
index 0000000..1d77a2b
--- /dev/null
+++ b/lib/Numeric/GSL/Special/Dawson.hs
@@ -0,0 +1,37 @@
1------------------------------------------------------------
2{- |
3Module : Numeric.GSL.Special.Dawson
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.google.com/search?q=gsl_sf_dawson.h&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
13
14-}
15------------------------------------------------------------
16
17module Numeric.GSL.Special.Dawson(
18 dawson_e
19, dawson
20) where
21
22import Foreign(Ptr)
23import Numeric.GSL.Special.Internal
24
25-- | wrapper for int gsl_sf_dawson_e(double x,gsl_sf_result* result);
26--
27-- <http://www.google.com/search?q=gsl_sf_dawson_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
28dawson_e :: Double -> (Double,Double)
29dawson_e x = createSFR "dawson_e" $ gsl_sf_dawson_e x
30foreign import ccall "dawson.h gsl_sf_dawson_e" gsl_sf_dawson_e :: Double -> Ptr Double -> IO(Int)
31
32-- | wrapper for double gsl_sf_dawson(double x);
33--
34-- <http://www.google.com/search?q=gsl_sf_dawson&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
35dawson :: Double -> Double
36dawson = gsl_sf_dawson
37foreign import ccall "dawson.h gsl_sf_dawson" gsl_sf_dawson :: Double -> Double
diff --git a/lib/Numeric/GSL/Special/Debye.hs b/lib/Numeric/GSL/Special/Debye.hs
new file mode 100644
index 0000000..b8e9aca
--- /dev/null
+++ b/lib/Numeric/GSL/Special/Debye.hs
@@ -0,0 +1,85 @@
1------------------------------------------------------------
2{- |
3Module : Numeric.GSL.Special.Debye
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.google.com/search?q=gsl_sf_debye.h&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
13
14-}
15------------------------------------------------------------
16
17module Numeric.GSL.Special.Debye(
18 debye_1_e
19, debye_1
20, debye_2_e
21, debye_2
22, debye_3_e
23, debye_3
24, debye_4_e
25, debye_4
26) where
27
28import Foreign(Ptr)
29import Numeric.GSL.Special.Internal
30
31-- | wrapper for int gsl_sf_debye_1_e(double x,gsl_sf_result* result);
32--
33-- <http://www.google.com/search?q=gsl_sf_debye_1_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
34debye_1_e :: Double -> (Double,Double)
35debye_1_e x = createSFR "debye_1_e" $ gsl_sf_debye_1_e x
36foreign import ccall "debye.h gsl_sf_debye_1_e" gsl_sf_debye_1_e :: Double -> Ptr Double -> IO(Int)
37
38-- | wrapper for double gsl_sf_debye_1(double x);
39--
40-- <http://www.google.com/search?q=gsl_sf_debye_1&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
41debye_1 :: Double -> Double
42debye_1 = gsl_sf_debye_1
43foreign import ccall "debye.h gsl_sf_debye_1" gsl_sf_debye_1 :: Double -> Double
44
45-- | wrapper for int gsl_sf_debye_2_e(double x,gsl_sf_result* result);
46--
47-- <http://www.google.com/search?q=gsl_sf_debye_2_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
48debye_2_e :: Double -> (Double,Double)
49debye_2_e x = createSFR "debye_2_e" $ gsl_sf_debye_2_e x
50foreign import ccall "debye.h gsl_sf_debye_2_e" gsl_sf_debye_2_e :: Double -> Ptr Double -> IO(Int)
51
52-- | wrapper for double gsl_sf_debye_2(double x);
53--
54-- <http://www.google.com/search?q=gsl_sf_debye_2&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
55debye_2 :: Double -> Double
56debye_2 = gsl_sf_debye_2
57foreign import ccall "debye.h gsl_sf_debye_2" gsl_sf_debye_2 :: Double -> Double
58
59-- | wrapper for int gsl_sf_debye_3_e(double x,gsl_sf_result* result);
60--
61-- <http://www.google.com/search?q=gsl_sf_debye_3_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
62debye_3_e :: Double -> (Double,Double)
63debye_3_e x = createSFR "debye_3_e" $ gsl_sf_debye_3_e x
64foreign import ccall "debye.h gsl_sf_debye_3_e" gsl_sf_debye_3_e :: Double -> Ptr Double -> IO(Int)
65
66-- | wrapper for double gsl_sf_debye_3(double x);
67--
68-- <http://www.google.com/search?q=gsl_sf_debye_3&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
69debye_3 :: Double -> Double
70debye_3 = gsl_sf_debye_3
71foreign import ccall "debye.h gsl_sf_debye_3" gsl_sf_debye_3 :: Double -> Double
72
73-- | wrapper for int gsl_sf_debye_4_e(double x,gsl_sf_result* result);
74--
75-- <http://www.google.com/search?q=gsl_sf_debye_4_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
76debye_4_e :: Double -> (Double,Double)
77debye_4_e x = createSFR "debye_4_e" $ gsl_sf_debye_4_e x
78foreign import ccall "debye.h gsl_sf_debye_4_e" gsl_sf_debye_4_e :: Double -> Ptr Double -> IO(Int)
79
80-- | wrapper for double gsl_sf_debye_4(double x);
81--
82-- <http://www.google.com/search?q=gsl_sf_debye_4&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
83debye_4 :: Double -> Double
84debye_4 = gsl_sf_debye_4
85foreign import ccall "debye.h gsl_sf_debye_4" gsl_sf_debye_4 :: Double -> Double
diff --git a/lib/Numeric/GSL/Special/Dilog.hs b/lib/Numeric/GSL/Special/Dilog.hs
new file mode 100644
index 0000000..e7693da
--- /dev/null
+++ b/lib/Numeric/GSL/Special/Dilog.hs
@@ -0,0 +1,58 @@
1------------------------------------------------------------
2{- |
3Module : Numeric.GSL.Special.Dilog
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.google.com/search?q=gsl_sf_dilog.h&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
13
14-}
15------------------------------------------------------------
16
17module Numeric.GSL.Special.Dilog(
18 dilog_e
19, dilog
20) where
21
22import Foreign(Ptr)
23import Numeric.GSL.Special.Internal
24
25-- | wrapper for int gsl_sf_dilog_e(double x,gsl_sf_result* result);
26--
27-- <http://www.google.com/search?q=gsl_sf_dilog_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
28dilog_e :: Double -> (Double,Double)
29dilog_e x = createSFR "dilog_e" $ gsl_sf_dilog_e x
30foreign import ccall "dilog.h gsl_sf_dilog_e" gsl_sf_dilog_e :: Double -> Ptr Double -> IO(Int)
31
32-- | wrapper for double gsl_sf_dilog(double x);
33--
34-- <http://www.google.com/search?q=gsl_sf_dilog&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
35dilog :: Double -> Double
36dilog = gsl_sf_dilog
37foreign import ccall "dilog.h gsl_sf_dilog" gsl_sf_dilog :: Double -> Double
38
39-- | wrapper for int gsl_sf_complex_dilog_xy_e(double x,double y,gsl_sf_result* result_re,gsl_sf_result* result_im);
40--
41-- <http://www.google.com/search?q=gsl_sf_complex_dilog_xy_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
42complex_dilog_xy_e :: Double -> Double -> Ptr Double -> (Double,Double)
43complex_dilog_xy_e x y result_re = createSFR "complex_dilog_xy_e" $ gsl_sf_complex_dilog_xy_e x y result_re
44foreign import ccall "dilog.h gsl_sf_complex_dilog_xy_e" gsl_sf_complex_dilog_xy_e :: Double -> Double -> Ptr Double -> Ptr Double -> IO(Int)
45
46-- | wrapper for int gsl_sf_complex_dilog_e(double r,double theta,gsl_sf_result* result_re,gsl_sf_result* result_im);
47--
48-- <http://www.google.com/search?q=gsl_sf_complex_dilog_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
49complex_dilog_e :: Double -> Double -> Ptr Double -> (Double,Double)
50complex_dilog_e r theta result_re = createSFR "complex_dilog_e" $ gsl_sf_complex_dilog_e r theta result_re
51foreign import ccall "dilog.h gsl_sf_complex_dilog_e" gsl_sf_complex_dilog_e :: Double -> Double -> Ptr Double -> Ptr Double -> IO(Int)
52
53-- | wrapper for int gsl_sf_complex_spence_xy_e(double x,double y,gsl_sf_result* real_sp,gsl_sf_result* imag_sp);
54--
55-- <http://www.google.com/search?q=gsl_sf_complex_spence_xy_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
56complex_spence_xy_e :: Double -> Double -> Ptr Double -> (Double,Double)
57complex_spence_xy_e x y real_sp = createSFR "complex_spence_xy_e" $ gsl_sf_complex_spence_xy_e x y real_sp
58foreign import ccall "dilog.h gsl_sf_complex_spence_xy_e" gsl_sf_complex_spence_xy_e :: Double -> Double -> Ptr Double -> Ptr Double -> IO(Int)
diff --git a/lib/Numeric/GSL/Special/Elementary.hs b/lib/Numeric/GSL/Special/Elementary.hs
new file mode 100644
index 0000000..0312ada
--- /dev/null
+++ b/lib/Numeric/GSL/Special/Elementary.hs
@@ -0,0 +1,45 @@
1------------------------------------------------------------
2{- |
3Module : Numeric.GSL.Special.Elementary
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.google.com/search?q=gsl_sf_elementary.h&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
13
14-}
15------------------------------------------------------------
16
17module Numeric.GSL.Special.Elementary(
18 multiply_e
19, multiply
20, multiply_err_e
21) where
22
23import Foreign(Ptr)
24import Numeric.GSL.Special.Internal
25
26-- | wrapper for int gsl_sf_multiply_e(double x,double y,gsl_sf_result* result);
27--
28-- <http://www.google.com/search?q=gsl_sf_multiply_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
29multiply_e :: Double -> Double -> (Double,Double)
30multiply_e x y = createSFR "multiply_e" $ gsl_sf_multiply_e x y
31foreign import ccall "elementary.h gsl_sf_multiply_e" gsl_sf_multiply_e :: Double -> Double -> Ptr Double -> IO(Int)
32
33-- | wrapper for double gsl_sf_multiply(double x,double y);
34--
35-- <http://www.google.com/search?q=gsl_sf_multiply&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
36multiply :: Double -> Double -> Double
37multiply = gsl_sf_multiply
38foreign import ccall "elementary.h gsl_sf_multiply" gsl_sf_multiply :: Double -> Double -> Double
39
40-- | wrapper for int gsl_sf_multiply_err_e(double x,double dx,double y,double dy,gsl_sf_result* result);
41--
42-- <http://www.google.com/search?q=gsl_sf_multiply_err_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
43multiply_err_e :: Double -> Double -> Double -> Double -> (Double,Double)
44multiply_err_e x dx y dy = createSFR "multiply_err_e" $ gsl_sf_multiply_err_e x dx y dy
45foreign import ccall "elementary.h gsl_sf_multiply_err_e" gsl_sf_multiply_err_e :: Double -> Double -> Double -> Double -> Ptr Double -> IO(Int)
diff --git a/lib/Numeric/GSL/Special/Ellint.hs b/lib/Numeric/GSL/Special/Ellint.hs
new file mode 100644
index 0000000..798531a
--- /dev/null
+++ b/lib/Numeric/GSL/Special/Ellint.hs
@@ -0,0 +1,181 @@
1------------------------------------------------------------
2{- |
3Module : Numeric.GSL.Special.Ellint
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.google.com/search?q=gsl_sf_ellint.h&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
13
14-}
15------------------------------------------------------------
16
17module Numeric.GSL.Special.Ellint(
18 ellint_Kcomp_e
19, ellint_Kcomp
20, ellint_Ecomp_e
21, ellint_Ecomp
22, ellint_F_e
23, ellint_F
24, ellint_E_e
25, ellint_E
26, ellint_P_e
27, ellint_P
28, ellint_D_e
29, ellint_D
30, ellint_RC_e
31, ellint_RC
32, ellint_RD_e
33, ellint_RD
34, ellint_RF_e
35, ellint_RF
36, ellint_RJ_e
37, ellint_RJ
38) where
39
40import Foreign(Ptr)
41import Numeric.GSL.Special.Internal
42
43-- | wrapper for int gsl_sf_ellint_Kcomp_e(double k,gsl_mode_t mode,gsl_sf_result* result);
44--
45-- <http://www.google.com/search?q=gsl_sf_ellint_Kcomp_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
46ellint_Kcomp_e :: Double -> Precision -> (Double,Double)
47ellint_Kcomp_e k mode = createSFR "ellint_Kcomp_e" $ gsl_sf_ellint_Kcomp_e k (precCode mode)
48foreign import ccall "ellint.h gsl_sf_ellint_Kcomp_e" gsl_sf_ellint_Kcomp_e :: Double -> Gsl_mode_t -> Ptr Double -> IO(Int)
49
50-- | wrapper for double gsl_sf_ellint_Kcomp(double k,gsl_mode_t mode);
51--
52-- <http://www.google.com/search?q=gsl_sf_ellint_Kcomp&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
53ellint_Kcomp :: Double -> Precision -> Double
54ellint_Kcomp k mode = gsl_sf_ellint_Kcomp k (precCode mode)
55foreign import ccall "ellint.h gsl_sf_ellint_Kcomp" gsl_sf_ellint_Kcomp :: Double -> Gsl_mode_t -> Double
56
57-- | wrapper for int gsl_sf_ellint_Ecomp_e(double k,gsl_mode_t mode,gsl_sf_result* result);
58--
59-- <http://www.google.com/search?q=gsl_sf_ellint_Ecomp_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
60ellint_Ecomp_e :: Double -> Precision -> (Double,Double)
61ellint_Ecomp_e k mode = createSFR "ellint_Ecomp_e" $ gsl_sf_ellint_Ecomp_e k (precCode mode)
62foreign import ccall "ellint.h gsl_sf_ellint_Ecomp_e" gsl_sf_ellint_Ecomp_e :: Double -> Gsl_mode_t -> Ptr Double -> IO(Int)
63
64-- | wrapper for double gsl_sf_ellint_Ecomp(double k,gsl_mode_t mode);
65--
66-- <http://www.google.com/search?q=gsl_sf_ellint_Ecomp&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
67ellint_Ecomp :: Double -> Precision -> Double
68ellint_Ecomp k mode = gsl_sf_ellint_Ecomp k (precCode mode)
69foreign import ccall "ellint.h gsl_sf_ellint_Ecomp" gsl_sf_ellint_Ecomp :: Double -> Gsl_mode_t -> Double
70
71-- | wrapper for int gsl_sf_ellint_F_e(double phi,double k,gsl_mode_t mode,gsl_sf_result* result);
72--
73-- <http://www.google.com/search?q=gsl_sf_ellint_F_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
74ellint_F_e :: Double -> Double -> Precision -> (Double,Double)
75ellint_F_e phi k mode = createSFR "ellint_F_e" $ gsl_sf_ellint_F_e phi k (precCode mode)
76foreign import ccall "ellint.h gsl_sf_ellint_F_e" gsl_sf_ellint_F_e :: Double -> Double -> Gsl_mode_t -> Ptr Double -> IO(Int)
77
78-- | wrapper for double gsl_sf_ellint_F(double phi,double k,gsl_mode_t mode);
79--
80-- <http://www.google.com/search?q=gsl_sf_ellint_F&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
81ellint_F :: Double -> Double -> Precision -> Double
82ellint_F phi k mode = gsl_sf_ellint_F phi k (precCode mode)
83foreign import ccall "ellint.h gsl_sf_ellint_F" gsl_sf_ellint_F :: Double -> Double -> Gsl_mode_t -> Double
84
85-- | wrapper for int gsl_sf_ellint_E_e(double phi,double k,gsl_mode_t mode,gsl_sf_result* result);
86--
87-- <http://www.google.com/search?q=gsl_sf_ellint_E_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
88ellint_E_e :: Double -> Double -> Precision -> (Double,Double)
89ellint_E_e phi k mode = createSFR "ellint_E_e" $ gsl_sf_ellint_E_e phi k (precCode mode)
90foreign import ccall "ellint.h gsl_sf_ellint_E_e" gsl_sf_ellint_E_e :: Double -> Double -> Gsl_mode_t -> Ptr Double -> IO(Int)
91
92-- | wrapper for double gsl_sf_ellint_E(double phi,double k,gsl_mode_t mode);
93--
94-- <http://www.google.com/search?q=gsl_sf_ellint_E&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
95ellint_E :: Double -> Double -> Precision -> Double
96ellint_E phi k mode = gsl_sf_ellint_E phi k (precCode mode)
97foreign import ccall "ellint.h gsl_sf_ellint_E" gsl_sf_ellint_E :: Double -> Double -> Gsl_mode_t -> Double
98
99-- | wrapper for int gsl_sf_ellint_P_e(double phi,double k,double n,gsl_mode_t mode,gsl_sf_result* result);
100--
101-- <http://www.google.com/search?q=gsl_sf_ellint_P_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
102ellint_P_e :: Double -> Double -> Double -> Precision -> (Double,Double)
103ellint_P_e phi k n mode = createSFR "ellint_P_e" $ gsl_sf_ellint_P_e phi k n (precCode mode)
104foreign import ccall "ellint.h gsl_sf_ellint_P_e" gsl_sf_ellint_P_e :: Double -> Double -> Double -> Gsl_mode_t -> Ptr Double -> IO(Int)
105
106-- | wrapper for double gsl_sf_ellint_P(double phi,double k,double n,gsl_mode_t mode);
107--
108-- <http://www.google.com/search?q=gsl_sf_ellint_P&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
109ellint_P :: Double -> Double -> Double -> Precision -> Double
110ellint_P phi k n mode = gsl_sf_ellint_P phi k n (precCode mode)
111foreign import ccall "ellint.h gsl_sf_ellint_P" gsl_sf_ellint_P :: Double -> Double -> Double -> Gsl_mode_t -> Double
112
113-- | wrapper for int gsl_sf_ellint_D_e(double phi,double k,double n,gsl_mode_t mode,gsl_sf_result* result);
114--
115-- <http://www.google.com/search?q=gsl_sf_ellint_D_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
116ellint_D_e :: Double -> Double -> Double -> Precision -> (Double,Double)
117ellint_D_e phi k n mode = createSFR "ellint_D_e" $ gsl_sf_ellint_D_e phi k n (precCode mode)
118foreign import ccall "ellint.h gsl_sf_ellint_D_e" gsl_sf_ellint_D_e :: Double -> Double -> Double -> Gsl_mode_t -> Ptr Double -> IO(Int)
119
120-- | wrapper for double gsl_sf_ellint_D(double phi,double k,double n,gsl_mode_t mode);
121--
122-- <http://www.google.com/search?q=gsl_sf_ellint_D&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
123ellint_D :: Double -> Double -> Double -> Precision -> Double
124ellint_D phi k n mode = gsl_sf_ellint_D phi k n (precCode mode)
125foreign import ccall "ellint.h gsl_sf_ellint_D" gsl_sf_ellint_D :: Double -> Double -> Double -> Gsl_mode_t -> Double
126
127-- | wrapper for int gsl_sf_ellint_RC_e(double x,double y,gsl_mode_t mode,gsl_sf_result* result);
128--
129-- <http://www.google.com/search?q=gsl_sf_ellint_RC_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
130ellint_RC_e :: Double -> Double -> Precision -> (Double,Double)
131ellint_RC_e x y mode = createSFR "ellint_RC_e" $ gsl_sf_ellint_RC_e x y (precCode mode)
132foreign import ccall "ellint.h gsl_sf_ellint_RC_e" gsl_sf_ellint_RC_e :: Double -> Double -> Gsl_mode_t -> Ptr Double -> IO(Int)
133
134-- | wrapper for double gsl_sf_ellint_RC(double x,double y,gsl_mode_t mode);
135--
136-- <http://www.google.com/search?q=gsl_sf_ellint_RC&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
137ellint_RC :: Double -> Double -> Precision -> Double
138ellint_RC x y mode = gsl_sf_ellint_RC x y (precCode mode)
139foreign import ccall "ellint.h gsl_sf_ellint_RC" gsl_sf_ellint_RC :: Double -> Double -> Gsl_mode_t -> Double
140
141-- | wrapper for int gsl_sf_ellint_RD_e(double x,double y,double z,gsl_mode_t mode,gsl_sf_result* result);
142--
143-- <http://www.google.com/search?q=gsl_sf_ellint_RD_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
144ellint_RD_e :: Double -> Double -> Double -> Precision -> (Double,Double)
145ellint_RD_e x y z mode = createSFR "ellint_RD_e" $ gsl_sf_ellint_RD_e x y z (precCode mode)
146foreign import ccall "ellint.h gsl_sf_ellint_RD_e" gsl_sf_ellint_RD_e :: Double -> Double -> Double -> Gsl_mode_t -> Ptr Double -> IO(Int)
147
148-- | wrapper for double gsl_sf_ellint_RD(double x,double y,double z,gsl_mode_t mode);
149--
150-- <http://www.google.com/search?q=gsl_sf_ellint_RD&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
151ellint_RD :: Double -> Double -> Double -> Precision -> Double
152ellint_RD x y z mode = gsl_sf_ellint_RD x y z (precCode mode)
153foreign import ccall "ellint.h gsl_sf_ellint_RD" gsl_sf_ellint_RD :: Double -> Double -> Double -> Gsl_mode_t -> Double
154
155-- | wrapper for int gsl_sf_ellint_RF_e(double x,double y,double z,gsl_mode_t mode,gsl_sf_result* result);
156--
157-- <http://www.google.com/search?q=gsl_sf_ellint_RF_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
158ellint_RF_e :: Double -> Double -> Double -> Precision -> (Double,Double)
159ellint_RF_e x y z mode = createSFR "ellint_RF_e" $ gsl_sf_ellint_RF_e x y z (precCode mode)
160foreign import ccall "ellint.h gsl_sf_ellint_RF_e" gsl_sf_ellint_RF_e :: Double -> Double -> Double -> Gsl_mode_t -> Ptr Double -> IO(Int)
161
162-- | wrapper for double gsl_sf_ellint_RF(double x,double y,double z,gsl_mode_t mode);
163--
164-- <http://www.google.com/search?q=gsl_sf_ellint_RF&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
165ellint_RF :: Double -> Double -> Double -> Precision -> Double
166ellint_RF x y z mode = gsl_sf_ellint_RF x y z (precCode mode)
167foreign import ccall "ellint.h gsl_sf_ellint_RF" gsl_sf_ellint_RF :: Double -> Double -> Double -> Gsl_mode_t -> Double
168
169-- | wrapper for int gsl_sf_ellint_RJ_e(double x,double y,double z,double p,gsl_mode_t mode,gsl_sf_result* result);
170--
171-- <http://www.google.com/search?q=gsl_sf_ellint_RJ_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
172ellint_RJ_e :: Double -> Double -> Double -> Double -> Precision -> (Double,Double)
173ellint_RJ_e x y z p mode = createSFR "ellint_RJ_e" $ gsl_sf_ellint_RJ_e x y z p (precCode mode)
174foreign import ccall "ellint.h gsl_sf_ellint_RJ_e" gsl_sf_ellint_RJ_e :: Double -> Double -> Double -> Double -> Gsl_mode_t -> Ptr Double -> IO(Int)
175
176-- | wrapper for double gsl_sf_ellint_RJ(double x,double y,double z,double p,gsl_mode_t mode);
177--
178-- <http://www.google.com/search?q=gsl_sf_ellint_RJ&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
179ellint_RJ :: Double -> Double -> Double -> Double -> Precision -> Double
180ellint_RJ x y z p mode = gsl_sf_ellint_RJ x y z p (precCode mode)
181foreign import ccall "ellint.h gsl_sf_ellint_RJ" gsl_sf_ellint_RJ :: Double -> Double -> Double -> Double -> Gsl_mode_t -> Double
diff --git a/lib/Numeric/GSL/Special/Erf.hs b/lib/Numeric/GSL/Special/Erf.hs
new file mode 100644
index 0000000..ec73980
--- /dev/null
+++ b/lib/Numeric/GSL/Special/Erf.hs
@@ -0,0 +1,117 @@
1------------------------------------------------------------
2{- |
3Module : Numeric.GSL.Special.Erf
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.google.com/search?q=gsl_sf_erf.h&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
13
14-}
15------------------------------------------------------------
16
17module Numeric.GSL.Special.Erf(
18 erfc_e
19, erfc
20, log_erfc_e
21, log_erfc
22, erf_e
23, erf
24, erf_Z_e
25, erf_Q_e
26, erf_Z
27, erf_Q
28, hazard_e
29, hazard
30) where
31
32import Foreign(Ptr)
33import Numeric.GSL.Special.Internal
34
35-- | wrapper for int gsl_sf_erfc_e(double x,gsl_sf_result* result);
36--
37-- <http://www.google.com/search?q=gsl_sf_erfc_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
38erfc_e :: Double -> (Double,Double)
39erfc_e x = createSFR "erfc_e" $ gsl_sf_erfc_e x
40foreign import ccall "erf.h gsl_sf_erfc_e" gsl_sf_erfc_e :: Double -> Ptr Double -> IO(Int)
41
42-- | wrapper for double gsl_sf_erfc(double x);
43--
44-- <http://www.google.com/search?q=gsl_sf_erfc&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
45erfc :: Double -> Double
46erfc = gsl_sf_erfc
47foreign import ccall "erf.h gsl_sf_erfc" gsl_sf_erfc :: Double -> Double
48
49-- | wrapper for int gsl_sf_log_erfc_e(double x,gsl_sf_result* result);
50--
51-- <http://www.google.com/search?q=gsl_sf_log_erfc_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
52log_erfc_e :: Double -> (Double,Double)
53log_erfc_e x = createSFR "log_erfc_e" $ gsl_sf_log_erfc_e x
54foreign import ccall "erf.h gsl_sf_log_erfc_e" gsl_sf_log_erfc_e :: Double -> Ptr Double -> IO(Int)
55
56-- | wrapper for double gsl_sf_log_erfc(double x);
57--
58-- <http://www.google.com/search?q=gsl_sf_log_erfc&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
59log_erfc :: Double -> Double
60log_erfc = gsl_sf_log_erfc
61foreign import ccall "erf.h gsl_sf_log_erfc" gsl_sf_log_erfc :: Double -> Double
62
63-- | wrapper for int gsl_sf_erf_e(double x,gsl_sf_result* result);
64--
65-- <http://www.google.com/search?q=gsl_sf_erf_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
66erf_e :: Double -> (Double,Double)
67erf_e x = createSFR "erf_e" $ gsl_sf_erf_e x
68foreign import ccall "erf.h gsl_sf_erf_e" gsl_sf_erf_e :: Double -> Ptr Double -> IO(Int)
69
70-- | wrapper for double gsl_sf_erf(double x);
71--
72-- <http://www.google.com/search?q=gsl_sf_erf&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
73erf :: Double -> Double
74erf = gsl_sf_erf
75foreign import ccall "erf.h gsl_sf_erf" gsl_sf_erf :: Double -> Double
76
77-- | wrapper for int gsl_sf_erf_Z_e(double x,gsl_sf_result* result);
78--
79-- <http://www.google.com/search?q=gsl_sf_erf_Z_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
80erf_Z_e :: Double -> (Double,Double)
81erf_Z_e x = createSFR "erf_Z_e" $ gsl_sf_erf_Z_e x
82foreign import ccall "erf.h gsl_sf_erf_Z_e" gsl_sf_erf_Z_e :: Double -> Ptr Double -> IO(Int)
83
84-- | wrapper for int gsl_sf_erf_Q_e(double x,gsl_sf_result* result);
85--
86-- <http://www.google.com/search?q=gsl_sf_erf_Q_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
87erf_Q_e :: Double -> (Double,Double)
88erf_Q_e x = createSFR "erf_Q_e" $ gsl_sf_erf_Q_e x
89foreign import ccall "erf.h gsl_sf_erf_Q_e" gsl_sf_erf_Q_e :: Double -> Ptr Double -> IO(Int)
90
91-- | wrapper for double gsl_sf_erf_Z(double x);
92--
93-- <http://www.google.com/search?q=gsl_sf_erf_Z&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
94erf_Z :: Double -> Double
95erf_Z = gsl_sf_erf_Z
96foreign import ccall "erf.h gsl_sf_erf_Z" gsl_sf_erf_Z :: Double -> Double
97
98-- | wrapper for double gsl_sf_erf_Q(double x);
99--
100-- <http://www.google.com/search?q=gsl_sf_erf_Q&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
101erf_Q :: Double -> Double
102erf_Q = gsl_sf_erf_Q
103foreign import ccall "erf.h gsl_sf_erf_Q" gsl_sf_erf_Q :: Double -> Double
104
105-- | wrapper for int gsl_sf_hazard_e(double x,gsl_sf_result* result);
106--
107-- <http://www.google.com/search?q=gsl_sf_hazard_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
108hazard_e :: Double -> (Double,Double)
109hazard_e x = createSFR "hazard_e" $ gsl_sf_hazard_e x
110foreign import ccall "erf.h gsl_sf_hazard_e" gsl_sf_hazard_e :: Double -> Ptr Double -> IO(Int)
111
112-- | wrapper for double gsl_sf_hazard(double x);
113--
114-- <http://www.google.com/search?q=gsl_sf_hazard&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
115hazard :: Double -> Double
116hazard = gsl_sf_hazard
117foreign import ccall "erf.h gsl_sf_hazard" gsl_sf_hazard :: Double -> Double
diff --git a/lib/Numeric/GSL/Special/Exp.hs b/lib/Numeric/GSL/Special/Exp.hs
new file mode 100644
index 0000000..2787df4
--- /dev/null
+++ b/lib/Numeric/GSL/Special/Exp.hs
@@ -0,0 +1,129 @@
1------------------------------------------------------------
2{- |
3Module : Numeric.GSL.Special.Exp
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/Exponential-Functions.html>
13
14-}
15------------------------------------------------------------
16
17module Numeric.GSL.Special.Exp(
18 exp_e
19, Numeric.GSL.Special.Exp.exp
20, exp_e10_e
21, exp_mult_e
22, exp_mult
23, exp_mult_e10_e
24, expm1_e
25, expm1
26, exprel_e
27, exprel
28, exprel_2_e
29, exprel_2
30, exprel_n_e
31, exprel_n
32, exp_err_e
33, exp_err_e10_e
34, exp_mult_err_e
35, exp_mult_err_e10_e
36) where
37
38import Foreign(Ptr)
39import Numeric.GSL.Special.Internal
40
41-- | wrapper for int gsl_sf_exp_e(double x,gsl_sf_result* result);
42exp_e :: Double -> (Double,Double)
43exp_e x = createSFR "exp_e" $ gsl_sf_exp_e x
44foreign import ccall "exp.h gsl_sf_exp_e" gsl_sf_exp_e :: Double -> Ptr Double -> IO(Int)
45
46-- | wrapper for double gsl_sf_exp(double x);
47exp :: Double -> Double
48exp = gsl_sf_exp
49foreign import ccall "exp.h gsl_sf_exp" gsl_sf_exp :: Double -> Double
50
51-- | wrapper for int gsl_sf_exp_e10_e(double x,gsl_sf_result_e10* result);
52exp_e10_e :: Double -> (Double,Int,Double)
53exp_e10_e x = createSFR_E10 "exp_e10_e" $ gsl_sf_exp_e10_e x
54foreign import ccall "exp.h gsl_sf_exp_e10_e" gsl_sf_exp_e10_e :: Double -> Ptr () -> IO(Int)
55
56-- | wrapper for int gsl_sf_exp_mult_e(double x,double y,gsl_sf_result* result);
57exp_mult_e :: Double -> Double -> (Double,Double)
58exp_mult_e x y = createSFR "exp_mult_e" $ gsl_sf_exp_mult_e x y
59foreign import ccall "exp.h gsl_sf_exp_mult_e" gsl_sf_exp_mult_e :: Double -> Double -> Ptr Double -> IO(Int)
60
61-- | wrapper for double gsl_sf_exp_mult(double x,double y);
62exp_mult :: Double -> Double -> Double
63exp_mult = gsl_sf_exp_mult
64foreign import ccall "exp.h gsl_sf_exp_mult" gsl_sf_exp_mult :: Double -> Double -> Double
65
66-- | wrapper for int gsl_sf_exp_mult_e10_e(double x,double y,gsl_sf_result_e10* result);
67exp_mult_e10_e :: Double -> Double -> (Double,Int,Double)
68exp_mult_e10_e x y = createSFR_E10 "exp_mult_e10_e" $ gsl_sf_exp_mult_e10_e x y
69foreign import ccall "exp.h gsl_sf_exp_mult_e10_e" gsl_sf_exp_mult_e10_e :: Double -> Double -> Ptr () -> IO(Int)
70
71-- | wrapper for int gsl_sf_expm1_e(double x,gsl_sf_result* result);
72expm1_e :: Double -> (Double,Double)
73expm1_e x = createSFR "expm1_e" $ gsl_sf_expm1_e x
74foreign import ccall "exp.h gsl_sf_expm1_e" gsl_sf_expm1_e :: Double -> Ptr Double -> IO(Int)
75
76-- | wrapper for double gsl_sf_expm1(double x);
77expm1 :: Double -> Double
78expm1 = gsl_sf_expm1
79foreign import ccall "exp.h gsl_sf_expm1" gsl_sf_expm1 :: Double -> Double
80
81-- | wrapper for int gsl_sf_exprel_e(double x,gsl_sf_result* result);
82exprel_e :: Double -> (Double,Double)
83exprel_e x = createSFR "exprel_e" $ gsl_sf_exprel_e x
84foreign import ccall "exp.h gsl_sf_exprel_e" gsl_sf_exprel_e :: Double -> Ptr Double -> IO(Int)
85
86-- | wrapper for double gsl_sf_exprel(double x);
87exprel :: Double -> Double
88exprel = gsl_sf_exprel
89foreign import ccall "exp.h gsl_sf_exprel" gsl_sf_exprel :: Double -> Double
90
91-- | wrapper for int gsl_sf_exprel_2_e(double x,gsl_sf_result* result);
92exprel_2_e :: Double -> (Double,Double)
93exprel_2_e x = createSFR "exprel_2_e" $ gsl_sf_exprel_2_e x
94foreign import ccall "exp.h gsl_sf_exprel_2_e" gsl_sf_exprel_2_e :: Double -> Ptr Double -> IO(Int)
95
96-- | wrapper for double gsl_sf_exprel_2(double x);
97exprel_2 :: Double -> Double
98exprel_2 = gsl_sf_exprel_2
99foreign import ccall "exp.h gsl_sf_exprel_2" gsl_sf_exprel_2 :: Double -> Double
100
101-- | wrapper for int gsl_sf_exprel_n_e(int n,double x,gsl_sf_result* result);
102exprel_n_e :: Int -> Double -> (Double,Double)
103exprel_n_e n x = createSFR "exprel_n_e" $ gsl_sf_exprel_n_e n x
104foreign import ccall "exp.h gsl_sf_exprel_n_e" gsl_sf_exprel_n_e :: Int -> Double -> Ptr Double -> IO(Int)
105
106-- | wrapper for double gsl_sf_exprel_n(int n,double x);
107exprel_n :: Int -> Double -> Double
108exprel_n = gsl_sf_exprel_n
109foreign import ccall "exp.h gsl_sf_exprel_n" gsl_sf_exprel_n :: Int -> Double -> Double
110
111-- | wrapper for int gsl_sf_exp_err_e(double x,double dx,gsl_sf_result* result);
112exp_err_e :: Double -> Double -> (Double,Double)
113exp_err_e x dx = createSFR "exp_err_e" $ gsl_sf_exp_err_e x dx
114foreign import ccall "exp.h gsl_sf_exp_err_e" gsl_sf_exp_err_e :: Double -> Double -> Ptr Double -> IO(Int)
115
116-- | wrapper for int gsl_sf_exp_err_e10_e(double x,double dx,gsl_sf_result_e10* result);
117exp_err_e10_e :: Double -> Double -> (Double,Int,Double)
118exp_err_e10_e x dx = createSFR_E10 "exp_err_e10_e" $ gsl_sf_exp_err_e10_e x dx
119foreign import ccall "exp.h gsl_sf_exp_err_e10_e" gsl_sf_exp_err_e10_e :: Double -> Double -> Ptr () -> IO(Int)
120
121-- | wrapper for int gsl_sf_exp_mult_err_e(double x,double dx,double y,double dy,gsl_sf_result* result);
122exp_mult_err_e :: Double -> Double -> Double -> Double -> (Double,Double)
123exp_mult_err_e x dx y dy = createSFR "exp_mult_err_e" $ gsl_sf_exp_mult_err_e x dx y dy
124foreign import ccall "exp.h gsl_sf_exp_mult_err_e" gsl_sf_exp_mult_err_e :: Double -> Double -> Double -> Double -> Ptr Double -> IO(Int)
125
126-- | wrapper for int gsl_sf_exp_mult_err_e10_e(double x,double dx,double y,double dy,gsl_sf_result_e10* result);
127exp_mult_err_e10_e :: Double -> Double -> Double -> Double -> (Double,Int,Double)
128exp_mult_err_e10_e x dx y dy = createSFR_E10 "exp_mult_err_e10_e" $ gsl_sf_exp_mult_err_e10_e x dx y dy
129foreign import ccall "exp.h gsl_sf_exp_mult_err_e10_e" gsl_sf_exp_mult_err_e10_e :: Double -> Double -> Double -> Double -> Ptr () -> IO(Int)
diff --git a/lib/Numeric/GSL/Special/Expint.hs b/lib/Numeric/GSL/Special/Expint.hs
new file mode 100644
index 0000000..9882d09
--- /dev/null
+++ b/lib/Numeric/GSL/Special/Expint.hs
@@ -0,0 +1,213 @@
1------------------------------------------------------------
2{- |
3Module : Numeric.GSL.Special.Expint
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.google.com/search?q=gsl_sf_expint.h&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
13
14-}
15------------------------------------------------------------
16
17module Numeric.GSL.Special.Expint(
18 expint_E1_e
19, expint_E1
20, expint_E2_e
21, expint_E2
22, expint_E1_scaled_e
23, expint_E1_scaled
24, expint_E2_scaled_e
25, expint_E2_scaled
26, expint_Ei_e
27, expint_Ei
28, expint_Ei_scaled_e
29, expint_Ei_scaled
30, shi_e
31, shi
32, chi_e
33, chi
34, expint_3_e
35, expint_3
36, si_e
37, si
38, ci_e
39, ci
40, atanint_e
41, atanint
42) where
43
44import Foreign(Ptr)
45import Numeric.GSL.Special.Internal
46
47-- | wrapper for int gsl_sf_expint_E1_e(double x,gsl_sf_result* result);
48--
49-- <http://www.google.com/search?q=gsl_sf_expint_E1_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
50expint_E1_e :: Double -> (Double,Double)
51expint_E1_e x = createSFR "expint_E1_e" $ gsl_sf_expint_E1_e x
52foreign import ccall "expint.h gsl_sf_expint_E1_e" gsl_sf_expint_E1_e :: Double -> Ptr Double -> IO(Int)
53
54-- | wrapper for double gsl_sf_expint_E1(double x);
55--
56-- <http://www.google.com/search?q=gsl_sf_expint_E1&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
57expint_E1 :: Double -> Double
58expint_E1 = gsl_sf_expint_E1
59foreign import ccall "expint.h gsl_sf_expint_E1" gsl_sf_expint_E1 :: Double -> Double
60
61-- | wrapper for int gsl_sf_expint_E2_e(double x,gsl_sf_result* result);
62--
63-- <http://www.google.com/search?q=gsl_sf_expint_E2_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
64expint_E2_e :: Double -> (Double,Double)
65expint_E2_e x = createSFR "expint_E2_e" $ gsl_sf_expint_E2_e x
66foreign import ccall "expint.h gsl_sf_expint_E2_e" gsl_sf_expint_E2_e :: Double -> Ptr Double -> IO(Int)
67
68-- | wrapper for double gsl_sf_expint_E2(double x);
69--
70-- <http://www.google.com/search?q=gsl_sf_expint_E2&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
71expint_E2 :: Double -> Double
72expint_E2 = gsl_sf_expint_E2
73foreign import ccall "expint.h gsl_sf_expint_E2" gsl_sf_expint_E2 :: Double -> Double
74
75-- | wrapper for int gsl_sf_expint_E1_scaled_e(double x,gsl_sf_result* result);
76--
77-- <http://www.google.com/search?q=gsl_sf_expint_E1_scaled_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
78expint_E1_scaled_e :: Double -> (Double,Double)
79expint_E1_scaled_e x = createSFR "expint_E1_scaled_e" $ gsl_sf_expint_E1_scaled_e x
80foreign import ccall "expint.h gsl_sf_expint_E1_scaled_e" gsl_sf_expint_E1_scaled_e :: Double -> Ptr Double -> IO(Int)
81
82-- | wrapper for double gsl_sf_expint_E1_scaled(double x);
83--
84-- <http://www.google.com/search?q=gsl_sf_expint_E1_scaled&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
85expint_E1_scaled :: Double -> Double
86expint_E1_scaled = gsl_sf_expint_E1_scaled
87foreign import ccall "expint.h gsl_sf_expint_E1_scaled" gsl_sf_expint_E1_scaled :: Double -> Double
88
89-- | wrapper for int gsl_sf_expint_E2_scaled_e(double x,gsl_sf_result* result);
90--
91-- <http://www.google.com/search?q=gsl_sf_expint_E2_scaled_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
92expint_E2_scaled_e :: Double -> (Double,Double)
93expint_E2_scaled_e x = createSFR "expint_E2_scaled_e" $ gsl_sf_expint_E2_scaled_e x
94foreign import ccall "expint.h gsl_sf_expint_E2_scaled_e" gsl_sf_expint_E2_scaled_e :: Double -> Ptr Double -> IO(Int)
95
96-- | wrapper for double gsl_sf_expint_E2_scaled(double x);
97--
98-- <http://www.google.com/search?q=gsl_sf_expint_E2_scaled&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
99expint_E2_scaled :: Double -> Double
100expint_E2_scaled = gsl_sf_expint_E2_scaled
101foreign import ccall "expint.h gsl_sf_expint_E2_scaled" gsl_sf_expint_E2_scaled :: Double -> Double
102
103-- | wrapper for int gsl_sf_expint_Ei_e(double x,gsl_sf_result* result);
104--
105-- <http://www.google.com/search?q=gsl_sf_expint_Ei_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
106expint_Ei_e :: Double -> (Double,Double)
107expint_Ei_e x = createSFR "expint_Ei_e" $ gsl_sf_expint_Ei_e x
108foreign import ccall "expint.h gsl_sf_expint_Ei_e" gsl_sf_expint_Ei_e :: Double -> Ptr Double -> IO(Int)
109
110-- | wrapper for double gsl_sf_expint_Ei(double x);
111--
112-- <http://www.google.com/search?q=gsl_sf_expint_Ei&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
113expint_Ei :: Double -> Double
114expint_Ei = gsl_sf_expint_Ei
115foreign import ccall "expint.h gsl_sf_expint_Ei" gsl_sf_expint_Ei :: Double -> Double
116
117-- | wrapper for int gsl_sf_expint_Ei_scaled_e(double x,gsl_sf_result* result);
118--
119-- <http://www.google.com/search?q=gsl_sf_expint_Ei_scaled_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
120expint_Ei_scaled_e :: Double -> (Double,Double)
121expint_Ei_scaled_e x = createSFR "expint_Ei_scaled_e" $ gsl_sf_expint_Ei_scaled_e x
122foreign import ccall "expint.h gsl_sf_expint_Ei_scaled_e" gsl_sf_expint_Ei_scaled_e :: Double -> Ptr Double -> IO(Int)
123
124-- | wrapper for double gsl_sf_expint_Ei_scaled(double x);
125--
126-- <http://www.google.com/search?q=gsl_sf_expint_Ei_scaled&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
127expint_Ei_scaled :: Double -> Double
128expint_Ei_scaled = gsl_sf_expint_Ei_scaled
129foreign import ccall "expint.h gsl_sf_expint_Ei_scaled" gsl_sf_expint_Ei_scaled :: Double -> Double
130
131-- | wrapper for int gsl_sf_Shi_e(double x,gsl_sf_result* result);
132--
133-- <http://www.google.com/search?q=gsl_sf_Shi_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
134shi_e :: Double -> (Double,Double)
135shi_e x = createSFR "shi_e" $ gsl_sf_Shi_e x
136foreign import ccall "expint.h gsl_sf_Shi_e" gsl_sf_Shi_e :: Double -> Ptr Double -> IO(Int)
137
138-- | wrapper for double gsl_sf_Shi(double x);
139--
140-- <http://www.google.com/search?q=gsl_sf_Shi&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
141shi :: Double -> Double
142shi = gsl_sf_Shi
143foreign import ccall "expint.h gsl_sf_Shi" gsl_sf_Shi :: Double -> Double
144
145-- | wrapper for int gsl_sf_Chi_e(double x,gsl_sf_result* result);
146--
147-- <http://www.google.com/search?q=gsl_sf_Chi_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
148chi_e :: Double -> (Double,Double)
149chi_e x = createSFR "chi_e" $ gsl_sf_Chi_e x
150foreign import ccall "expint.h gsl_sf_Chi_e" gsl_sf_Chi_e :: Double -> Ptr Double -> IO(Int)
151
152-- | wrapper for double gsl_sf_Chi(double x);
153--
154-- <http://www.google.com/search?q=gsl_sf_Chi&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
155chi :: Double -> Double
156chi = gsl_sf_Chi
157foreign import ccall "expint.h gsl_sf_Chi" gsl_sf_Chi :: Double -> Double
158
159-- | wrapper for int gsl_sf_expint_3_e(double x,gsl_sf_result* result);
160--
161-- <http://www.google.com/search?q=gsl_sf_expint_3_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
162expint_3_e :: Double -> (Double,Double)
163expint_3_e x = createSFR "expint_3_e" $ gsl_sf_expint_3_e x
164foreign import ccall "expint.h gsl_sf_expint_3_e" gsl_sf_expint_3_e :: Double -> Ptr Double -> IO(Int)
165
166-- | wrapper for double gsl_sf_expint_3(double x);
167--
168-- <http://www.google.com/search?q=gsl_sf_expint_3&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
169expint_3 :: Double -> Double
170expint_3 = gsl_sf_expint_3
171foreign import ccall "expint.h gsl_sf_expint_3" gsl_sf_expint_3 :: Double -> Double
172
173-- | wrapper for int gsl_sf_Si_e(double x,gsl_sf_result* result);
174--
175-- <http://www.google.com/search?q=gsl_sf_Si_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
176si_e :: Double -> (Double,Double)
177si_e x = createSFR "si_e" $ gsl_sf_Si_e x
178foreign import ccall "expint.h gsl_sf_Si_e" gsl_sf_Si_e :: Double -> Ptr Double -> IO(Int)
179
180-- | wrapper for double gsl_sf_Si(double x);
181--
182-- <http://www.google.com/search?q=gsl_sf_Si&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
183si :: Double -> Double
184si = gsl_sf_Si
185foreign import ccall "expint.h gsl_sf_Si" gsl_sf_Si :: Double -> Double
186
187-- | wrapper for int gsl_sf_Ci_e(double x,gsl_sf_result* result);
188--
189-- <http://www.google.com/search?q=gsl_sf_Ci_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
190ci_e :: Double -> (Double,Double)
191ci_e x = createSFR "ci_e" $ gsl_sf_Ci_e x
192foreign import ccall "expint.h gsl_sf_Ci_e" gsl_sf_Ci_e :: Double -> Ptr Double -> IO(Int)
193
194-- | wrapper for double gsl_sf_Ci(double x);
195--
196-- <http://www.google.com/search?q=gsl_sf_Ci&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
197ci :: Double -> Double
198ci = gsl_sf_Ci
199foreign import ccall "expint.h gsl_sf_Ci" gsl_sf_Ci :: Double -> Double
200
201-- | wrapper for int gsl_sf_atanint_e(double x,gsl_sf_result* result);
202--
203-- <http://www.google.com/search?q=gsl_sf_atanint_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
204atanint_e :: Double -> (Double,Double)
205atanint_e x = createSFR "atanint_e" $ gsl_sf_atanint_e x
206foreign import ccall "expint.h gsl_sf_atanint_e" gsl_sf_atanint_e :: Double -> Ptr Double -> IO(Int)
207
208-- | wrapper for double gsl_sf_atanint(double x);
209--
210-- <http://www.google.com/search?q=gsl_sf_atanint&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
211atanint :: Double -> Double
212atanint = gsl_sf_atanint
213foreign import ccall "expint.h gsl_sf_atanint" gsl_sf_atanint :: Double -> Double
diff --git a/lib/Numeric/GSL/Special/Fermi_dirac.hs b/lib/Numeric/GSL/Special/Fermi_dirac.hs
new file mode 100644
index 0000000..a189dd4
--- /dev/null
+++ b/lib/Numeric/GSL/Special/Fermi_dirac.hs
@@ -0,0 +1,165 @@
1------------------------------------------------------------
2{- |
3Module : Numeric.GSL.Special.Fermi_dirac
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.google.com/search?q=gsl_sf_fermi_dirac.h&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
13
14-}
15------------------------------------------------------------
16
17module Numeric.GSL.Special.Fermi_dirac(
18 fermi_dirac_m1_e
19, fermi_dirac_m1
20, fermi_dirac_0_e
21, fermi_dirac_0
22, fermi_dirac_1_e
23, fermi_dirac_1
24, fermi_dirac_2_e
25, fermi_dirac_2
26, fermi_dirac_int_e
27, fermi_dirac_int
28, fermi_dirac_mhalf_e
29, fermi_dirac_mhalf
30, fermi_dirac_half_e
31, fermi_dirac_half
32, fermi_dirac_3half_e
33, fermi_dirac_3half
34, fermi_dirac_inc_0_e
35, fermi_dirac_inc_0
36) where
37
38import Foreign(Ptr)
39import Numeric.GSL.Special.Internal
40
41-- | wrapper for int gsl_sf_fermi_dirac_m1_e(double x,gsl_sf_result* result);
42--
43-- <http://www.google.com/search?q=gsl_sf_fermi_dirac_m1_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
44fermi_dirac_m1_e :: Double -> (Double,Double)
45fermi_dirac_m1_e x = createSFR "fermi_dirac_m1_e" $ gsl_sf_fermi_dirac_m1_e x
46foreign import ccall "fermi_dirac.h gsl_sf_fermi_dirac_m1_e" gsl_sf_fermi_dirac_m1_e :: Double -> Ptr Double -> IO(Int)
47
48-- | wrapper for double gsl_sf_fermi_dirac_m1(double x);
49--
50-- <http://www.google.com/search?q=gsl_sf_fermi_dirac_m1&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
51fermi_dirac_m1 :: Double -> Double
52fermi_dirac_m1 = gsl_sf_fermi_dirac_m1
53foreign import ccall "fermi_dirac.h gsl_sf_fermi_dirac_m1" gsl_sf_fermi_dirac_m1 :: Double -> Double
54
55-- | wrapper for int gsl_sf_fermi_dirac_0_e(double x,gsl_sf_result* result);
56--
57-- <http://www.google.com/search?q=gsl_sf_fermi_dirac_0_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
58fermi_dirac_0_e :: Double -> (Double,Double)
59fermi_dirac_0_e x = createSFR "fermi_dirac_0_e" $ gsl_sf_fermi_dirac_0_e x
60foreign import ccall "fermi_dirac.h gsl_sf_fermi_dirac_0_e" gsl_sf_fermi_dirac_0_e :: Double -> Ptr Double -> IO(Int)
61
62-- | wrapper for double gsl_sf_fermi_dirac_0(double x);
63--
64-- <http://www.google.com/search?q=gsl_sf_fermi_dirac_0&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
65fermi_dirac_0 :: Double -> Double
66fermi_dirac_0 = gsl_sf_fermi_dirac_0
67foreign import ccall "fermi_dirac.h gsl_sf_fermi_dirac_0" gsl_sf_fermi_dirac_0 :: Double -> Double
68
69-- | wrapper for int gsl_sf_fermi_dirac_1_e(double x,gsl_sf_result* result);
70--
71-- <http://www.google.com/search?q=gsl_sf_fermi_dirac_1_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
72fermi_dirac_1_e :: Double -> (Double,Double)
73fermi_dirac_1_e x = createSFR "fermi_dirac_1_e" $ gsl_sf_fermi_dirac_1_e x
74foreign import ccall "fermi_dirac.h gsl_sf_fermi_dirac_1_e" gsl_sf_fermi_dirac_1_e :: Double -> Ptr Double -> IO(Int)
75
76-- | wrapper for double gsl_sf_fermi_dirac_1(double x);
77--
78-- <http://www.google.com/search?q=gsl_sf_fermi_dirac_1&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
79fermi_dirac_1 :: Double -> Double
80fermi_dirac_1 = gsl_sf_fermi_dirac_1
81foreign import ccall "fermi_dirac.h gsl_sf_fermi_dirac_1" gsl_sf_fermi_dirac_1 :: Double -> Double
82
83-- | wrapper for int gsl_sf_fermi_dirac_2_e(double x,gsl_sf_result* result);
84--
85-- <http://www.google.com/search?q=gsl_sf_fermi_dirac_2_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
86fermi_dirac_2_e :: Double -> (Double,Double)
87fermi_dirac_2_e x = createSFR "fermi_dirac_2_e" $ gsl_sf_fermi_dirac_2_e x
88foreign import ccall "fermi_dirac.h gsl_sf_fermi_dirac_2_e" gsl_sf_fermi_dirac_2_e :: Double -> Ptr Double -> IO(Int)
89
90-- | wrapper for double gsl_sf_fermi_dirac_2(double x);
91--
92-- <http://www.google.com/search?q=gsl_sf_fermi_dirac_2&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
93fermi_dirac_2 :: Double -> Double
94fermi_dirac_2 = gsl_sf_fermi_dirac_2
95foreign import ccall "fermi_dirac.h gsl_sf_fermi_dirac_2" gsl_sf_fermi_dirac_2 :: Double -> Double
96
97-- | wrapper for int gsl_sf_fermi_dirac_int_e(int j,double x,gsl_sf_result* result);
98--
99-- <http://www.google.com/search?q=gsl_sf_fermi_dirac_int_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
100fermi_dirac_int_e :: Int -> Double -> (Double,Double)
101fermi_dirac_int_e j x = createSFR "fermi_dirac_int_e" $ gsl_sf_fermi_dirac_int_e j x
102foreign import ccall "fermi_dirac.h gsl_sf_fermi_dirac_int_e" gsl_sf_fermi_dirac_int_e :: Int -> Double -> Ptr Double -> IO(Int)
103
104-- | wrapper for double gsl_sf_fermi_dirac_int(int j,double x);
105--
106-- <http://www.google.com/search?q=gsl_sf_fermi_dirac_int&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
107fermi_dirac_int :: Int -> Double -> Double
108fermi_dirac_int = gsl_sf_fermi_dirac_int
109foreign import ccall "fermi_dirac.h gsl_sf_fermi_dirac_int" gsl_sf_fermi_dirac_int :: Int -> Double -> Double
110
111-- | wrapper for int gsl_sf_fermi_dirac_mhalf_e(double x,gsl_sf_result* result);
112--
113-- <http://www.google.com/search?q=gsl_sf_fermi_dirac_mhalf_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
114fermi_dirac_mhalf_e :: Double -> (Double,Double)
115fermi_dirac_mhalf_e x = createSFR "fermi_dirac_mhalf_e" $ gsl_sf_fermi_dirac_mhalf_e x
116foreign import ccall "fermi_dirac.h gsl_sf_fermi_dirac_mhalf_e" gsl_sf_fermi_dirac_mhalf_e :: Double -> Ptr Double -> IO(Int)
117
118-- | wrapper for double gsl_sf_fermi_dirac_mhalf(double x);
119--
120-- <http://www.google.com/search?q=gsl_sf_fermi_dirac_mhalf&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
121fermi_dirac_mhalf :: Double -> Double
122fermi_dirac_mhalf = gsl_sf_fermi_dirac_mhalf
123foreign import ccall "fermi_dirac.h gsl_sf_fermi_dirac_mhalf" gsl_sf_fermi_dirac_mhalf :: Double -> Double
124
125-- | wrapper for int gsl_sf_fermi_dirac_half_e(double x,gsl_sf_result* result);
126--
127-- <http://www.google.com/search?q=gsl_sf_fermi_dirac_half_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
128fermi_dirac_half_e :: Double -> (Double,Double)
129fermi_dirac_half_e x = createSFR "fermi_dirac_half_e" $ gsl_sf_fermi_dirac_half_e x
130foreign import ccall "fermi_dirac.h gsl_sf_fermi_dirac_half_e" gsl_sf_fermi_dirac_half_e :: Double -> Ptr Double -> IO(Int)
131
132-- | wrapper for double gsl_sf_fermi_dirac_half(double x);
133--
134-- <http://www.google.com/search?q=gsl_sf_fermi_dirac_half&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
135fermi_dirac_half :: Double -> Double
136fermi_dirac_half = gsl_sf_fermi_dirac_half
137foreign import ccall "fermi_dirac.h gsl_sf_fermi_dirac_half" gsl_sf_fermi_dirac_half :: Double -> Double
138
139-- | wrapper for int gsl_sf_fermi_dirac_3half_e(double x,gsl_sf_result* result);
140--
141-- <http://www.google.com/search?q=gsl_sf_fermi_dirac_3half_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
142fermi_dirac_3half_e :: Double -> (Double,Double)
143fermi_dirac_3half_e x = createSFR "fermi_dirac_3half_e" $ gsl_sf_fermi_dirac_3half_e x
144foreign import ccall "fermi_dirac.h gsl_sf_fermi_dirac_3half_e" gsl_sf_fermi_dirac_3half_e :: Double -> Ptr Double -> IO(Int)
145
146-- | wrapper for double gsl_sf_fermi_dirac_3half(double x);
147--
148-- <http://www.google.com/search?q=gsl_sf_fermi_dirac_3half&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
149fermi_dirac_3half :: Double -> Double
150fermi_dirac_3half = gsl_sf_fermi_dirac_3half
151foreign import ccall "fermi_dirac.h gsl_sf_fermi_dirac_3half" gsl_sf_fermi_dirac_3half :: Double -> Double
152
153-- | wrapper for int gsl_sf_fermi_dirac_inc_0_e(double x,double b,gsl_sf_result* result);
154--
155-- <http://www.google.com/search?q=gsl_sf_fermi_dirac_inc_0_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
156fermi_dirac_inc_0_e :: Double -> Double -> (Double,Double)
157fermi_dirac_inc_0_e x b = createSFR "fermi_dirac_inc_0_e" $ gsl_sf_fermi_dirac_inc_0_e x b
158foreign import ccall "fermi_dirac.h gsl_sf_fermi_dirac_inc_0_e" gsl_sf_fermi_dirac_inc_0_e :: Double -> Double -> Ptr Double -> IO(Int)
159
160-- | wrapper for double gsl_sf_fermi_dirac_inc_0(double x,double b);
161--
162-- <http://www.google.com/search?q=gsl_sf_fermi_dirac_inc_0&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
163fermi_dirac_inc_0 :: Double -> Double -> Double
164fermi_dirac_inc_0 = gsl_sf_fermi_dirac_inc_0
165foreign import ccall "fermi_dirac.h gsl_sf_fermi_dirac_inc_0" gsl_sf_fermi_dirac_inc_0 :: Double -> Double -> Double
diff --git a/lib/Numeric/GSL/Special/Gamma.hs b/lib/Numeric/GSL/Special/Gamma.hs
new file mode 100644
index 0000000..aa03892
--- /dev/null
+++ b/lib/Numeric/GSL/Special/Gamma.hs
@@ -0,0 +1,362 @@
1------------------------------------------------------------
2{- |
3Module : Numeric.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.google.com/search?q=gsl_sf_gamma.h&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
13
14-}
15------------------------------------------------------------
16
17module Numeric.GSL.Special.Gamma(
18 lngamma_e
19, lngamma
20, gamma_e
21, gamma
22, gammastar_e
23, gammastar
24, gammainv_e
25, gammainv
26, taylorcoeff_e
27, taylorcoeff
28, fact_e
29, fact
30, doublefact_e
31, doublefact
32, lnfact_e
33, lnfact
34, lndoublefact_e
35, lndoublefact
36, lnchoose_e
37, lnchoose
38, choose_e
39, choose
40, lnpoch_e
41, lnpoch
42, poch_e
43, poch
44, pochrel_e
45, pochrel
46, gamma_inc_Q_e
47, gamma_inc_Q
48, gamma_inc_P_e
49, gamma_inc_P
50, gamma_inc_e
51, gamma_inc
52, lnbeta_e
53, lnbeta
54, beta_e
55, beta
56, beta_inc_e
57, beta_inc
58) where
59
60import Foreign(Ptr)
61import Numeric.GSL.Special.Internal
62
63-- | wrapper for int gsl_sf_lngamma_e(double x,gsl_sf_result* result);
64--
65-- <http://www.google.com/search?q=gsl_sf_lngamma_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
66lngamma_e :: Double -> (Double,Double)
67lngamma_e x = createSFR "lngamma_e" $ gsl_sf_lngamma_e x
68foreign import ccall "gamma.h gsl_sf_lngamma_e" gsl_sf_lngamma_e :: Double -> Ptr Double -> IO(Int)
69
70-- | wrapper for double gsl_sf_lngamma(double x);
71--
72-- <http://www.google.com/search?q=gsl_sf_lngamma&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
73lngamma :: Double -> Double
74lngamma = gsl_sf_lngamma
75foreign import ccall "gamma.h gsl_sf_lngamma" gsl_sf_lngamma :: Double -> Double
76
77-- | wrapper for int gsl_sf_lngamma_sgn_e(double x,gsl_sf_result* result_lg,double* sgn);
78--
79-- <http://www.google.com/search?q=gsl_sf_lngamma_sgn_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
80lngamma_sgn_e :: Double -> Ptr Double -> Ptr Double -> Int
81lngamma_sgn_e = gsl_sf_lngamma_sgn_e
82foreign import ccall "gamma.h gsl_sf_lngamma_sgn_e" gsl_sf_lngamma_sgn_e :: Double -> Ptr Double -> Ptr Double -> Int
83
84-- | wrapper for int gsl_sf_gamma_e(double x,gsl_sf_result* result);
85--
86-- <http://www.google.com/search?q=gsl_sf_gamma_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
87gamma_e :: Double -> (Double,Double)
88gamma_e x = createSFR "gamma_e" $ gsl_sf_gamma_e x
89foreign import ccall "gamma.h gsl_sf_gamma_e" gsl_sf_gamma_e :: Double -> Ptr Double -> IO(Int)
90
91-- | wrapper for double gsl_sf_gamma(double x);
92--
93-- <http://www.google.com/search?q=gsl_sf_gamma&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
94gamma :: Double -> Double
95gamma = gsl_sf_gamma
96foreign import ccall "gamma.h gsl_sf_gamma" gsl_sf_gamma :: Double -> Double
97
98-- | wrapper for int gsl_sf_gammastar_e(double x,gsl_sf_result* result);
99--
100-- <http://www.google.com/search?q=gsl_sf_gammastar_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
101gammastar_e :: Double -> (Double,Double)
102gammastar_e x = createSFR "gammastar_e" $ gsl_sf_gammastar_e x
103foreign import ccall "gamma.h gsl_sf_gammastar_e" gsl_sf_gammastar_e :: Double -> Ptr Double -> IO(Int)
104
105-- | wrapper for double gsl_sf_gammastar(double x);
106--
107-- <http://www.google.com/search?q=gsl_sf_gammastar&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
108gammastar :: Double -> Double
109gammastar = gsl_sf_gammastar
110foreign import ccall "gamma.h gsl_sf_gammastar" gsl_sf_gammastar :: Double -> Double
111
112-- | wrapper for int gsl_sf_gammainv_e(double x,gsl_sf_result* result);
113--
114-- <http://www.google.com/search?q=gsl_sf_gammainv_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
115gammainv_e :: Double -> (Double,Double)
116gammainv_e x = createSFR "gammainv_e" $ gsl_sf_gammainv_e x
117foreign import ccall "gamma.h gsl_sf_gammainv_e" gsl_sf_gammainv_e :: Double -> Ptr Double -> IO(Int)
118
119-- | wrapper for double gsl_sf_gammainv(double x);
120--
121-- <http://www.google.com/search?q=gsl_sf_gammainv&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
122gammainv :: Double -> Double
123gammainv = gsl_sf_gammainv
124foreign import ccall "gamma.h gsl_sf_gammainv" gsl_sf_gammainv :: Double -> Double
125
126-- | wrapper for int gsl_sf_lngamma_complex_e(double zr,double zi,gsl_sf_result* lnr,gsl_sf_result* arg);
127--
128-- <http://www.google.com/search?q=gsl_sf_lngamma_complex_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
129lngamma_complex_e :: Double -> Double -> Ptr Double -> (Double,Double)
130lngamma_complex_e zr zi lnr = createSFR "lngamma_complex_e" $ gsl_sf_lngamma_complex_e zr zi lnr
131foreign import ccall "gamma.h gsl_sf_lngamma_complex_e" gsl_sf_lngamma_complex_e :: Double -> Double -> Ptr Double -> Ptr Double -> IO(Int)
132
133-- | wrapper for int gsl_sf_taylorcoeff_e(int n,double x,gsl_sf_result* result);
134--
135-- <http://www.google.com/search?q=gsl_sf_taylorcoeff_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
136taylorcoeff_e :: Int -> Double -> (Double,Double)
137taylorcoeff_e n x = createSFR "taylorcoeff_e" $ gsl_sf_taylorcoeff_e n x
138foreign import ccall "gamma.h gsl_sf_taylorcoeff_e" gsl_sf_taylorcoeff_e :: Int -> Double -> Ptr Double -> IO(Int)
139
140-- | wrapper for double gsl_sf_taylorcoeff(int n,double x);
141--
142-- <http://www.google.com/search?q=gsl_sf_taylorcoeff&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
143taylorcoeff :: Int -> Double -> Double
144taylorcoeff = gsl_sf_taylorcoeff
145foreign import ccall "gamma.h gsl_sf_taylorcoeff" gsl_sf_taylorcoeff :: Int -> Double -> Double
146
147-- | wrapper for int gsl_sf_fact_e(int n,gsl_sf_result* result);
148--
149-- <http://www.google.com/search?q=gsl_sf_fact_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
150fact_e :: Int -> (Double,Double)
151fact_e n = createSFR "fact_e" $ gsl_sf_fact_e n
152foreign import ccall "gamma.h gsl_sf_fact_e" gsl_sf_fact_e :: Int -> Ptr Double -> IO(Int)
153
154-- | wrapper for double gsl_sf_fact(int n);
155--
156-- <http://www.google.com/search?q=gsl_sf_fact&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
157fact :: Int -> Double
158fact = gsl_sf_fact
159foreign import ccall "gamma.h gsl_sf_fact" gsl_sf_fact :: Int -> Double
160
161-- | wrapper for int gsl_sf_doublefact_e(int n,gsl_sf_result* result);
162--
163-- <http://www.google.com/search?q=gsl_sf_doublefact_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
164doublefact_e :: Int -> (Double,Double)
165doublefact_e n = createSFR "doublefact_e" $ gsl_sf_doublefact_e n
166foreign import ccall "gamma.h gsl_sf_doublefact_e" gsl_sf_doublefact_e :: Int -> Ptr Double -> IO(Int)
167
168-- | wrapper for double gsl_sf_doublefact(int n);
169--
170-- <http://www.google.com/search?q=gsl_sf_doublefact&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
171doublefact :: Int -> Double
172doublefact = gsl_sf_doublefact
173foreign import ccall "gamma.h gsl_sf_doublefact" gsl_sf_doublefact :: Int -> Double
174
175-- | wrapper for int gsl_sf_lnfact_e(int n,gsl_sf_result* result);
176--
177-- <http://www.google.com/search?q=gsl_sf_lnfact_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
178lnfact_e :: Int -> (Double,Double)
179lnfact_e n = createSFR "lnfact_e" $ gsl_sf_lnfact_e n
180foreign import ccall "gamma.h gsl_sf_lnfact_e" gsl_sf_lnfact_e :: Int -> Ptr Double -> IO(Int)
181
182-- | wrapper for double gsl_sf_lnfact(int n);
183--
184-- <http://www.google.com/search?q=gsl_sf_lnfact&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
185lnfact :: Int -> Double
186lnfact = gsl_sf_lnfact
187foreign import ccall "gamma.h gsl_sf_lnfact" gsl_sf_lnfact :: Int -> Double
188
189-- | wrapper for int gsl_sf_lndoublefact_e(int n,gsl_sf_result* result);
190--
191-- <http://www.google.com/search?q=gsl_sf_lndoublefact_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
192lndoublefact_e :: Int -> (Double,Double)
193lndoublefact_e n = createSFR "lndoublefact_e" $ gsl_sf_lndoublefact_e n
194foreign import ccall "gamma.h gsl_sf_lndoublefact_e" gsl_sf_lndoublefact_e :: Int -> Ptr Double -> IO(Int)
195
196-- | wrapper for double gsl_sf_lndoublefact(int n);
197--
198-- <http://www.google.com/search?q=gsl_sf_lndoublefact&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
199lndoublefact :: Int -> Double
200lndoublefact = gsl_sf_lndoublefact
201foreign import ccall "gamma.h gsl_sf_lndoublefact" gsl_sf_lndoublefact :: Int -> Double
202
203-- | wrapper for int gsl_sf_lnchoose_e(int n,int m,gsl_sf_result* result);
204--
205-- <http://www.google.com/search?q=gsl_sf_lnchoose_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
206lnchoose_e :: Int -> Int -> (Double,Double)
207lnchoose_e n m = createSFR "lnchoose_e" $ gsl_sf_lnchoose_e n m
208foreign import ccall "gamma.h gsl_sf_lnchoose_e" gsl_sf_lnchoose_e :: Int -> Int -> Ptr Double -> IO(Int)
209
210-- | wrapper for double gsl_sf_lnchoose(int n,int m);
211--
212-- <http://www.google.com/search?q=gsl_sf_lnchoose&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
213lnchoose :: Int -> Int -> Double
214lnchoose = gsl_sf_lnchoose
215foreign import ccall "gamma.h gsl_sf_lnchoose" gsl_sf_lnchoose :: Int -> Int -> Double
216
217-- | wrapper for int gsl_sf_choose_e(int n,int m,gsl_sf_result* result);
218--
219-- <http://www.google.com/search?q=gsl_sf_choose_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
220choose_e :: Int -> Int -> (Double,Double)
221choose_e n m = createSFR "choose_e" $ gsl_sf_choose_e n m
222foreign import ccall "gamma.h gsl_sf_choose_e" gsl_sf_choose_e :: Int -> Int -> Ptr Double -> IO(Int)
223
224-- | wrapper for double gsl_sf_choose(int n,int m);
225--
226-- <http://www.google.com/search?q=gsl_sf_choose&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
227choose :: Int -> Int -> Double
228choose = gsl_sf_choose
229foreign import ccall "gamma.h gsl_sf_choose" gsl_sf_choose :: Int -> Int -> Double
230
231-- | wrapper for int gsl_sf_lnpoch_e(double a,double x,gsl_sf_result* result);
232--
233-- <http://www.google.com/search?q=gsl_sf_lnpoch_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
234lnpoch_e :: Double -> Double -> (Double,Double)
235lnpoch_e a x = createSFR "lnpoch_e" $ gsl_sf_lnpoch_e a x
236foreign import ccall "gamma.h gsl_sf_lnpoch_e" gsl_sf_lnpoch_e :: Double -> Double -> Ptr Double -> IO(Int)
237
238-- | wrapper for double gsl_sf_lnpoch(double a,double x);
239--
240-- <http://www.google.com/search?q=gsl_sf_lnpoch&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
241lnpoch :: Double -> Double -> Double
242lnpoch = gsl_sf_lnpoch
243foreign import ccall "gamma.h gsl_sf_lnpoch" gsl_sf_lnpoch :: Double -> Double -> Double
244
245-- | wrapper for int gsl_sf_lnpoch_sgn_e(double a,double x,gsl_sf_result* result,double* sgn);
246--
247-- <http://www.google.com/search?q=gsl_sf_lnpoch_sgn_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
248lnpoch_sgn_e :: Double -> Double -> Ptr Double -> Ptr Double -> Int
249lnpoch_sgn_e = gsl_sf_lnpoch_sgn_e
250foreign import ccall "gamma.h gsl_sf_lnpoch_sgn_e" gsl_sf_lnpoch_sgn_e :: Double -> Double -> Ptr Double -> Ptr Double -> Int
251
252-- | wrapper for int gsl_sf_poch_e(double a,double x,gsl_sf_result* result);
253--
254-- <http://www.google.com/search?q=gsl_sf_poch_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
255poch_e :: Double -> Double -> (Double,Double)
256poch_e a x = createSFR "poch_e" $ gsl_sf_poch_e a x
257foreign import ccall "gamma.h gsl_sf_poch_e" gsl_sf_poch_e :: Double -> Double -> Ptr Double -> IO(Int)
258
259-- | wrapper for double gsl_sf_poch(double a,double x);
260--
261-- <http://www.google.com/search?q=gsl_sf_poch&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
262poch :: Double -> Double -> Double
263poch = gsl_sf_poch
264foreign import ccall "gamma.h gsl_sf_poch" gsl_sf_poch :: Double -> Double -> Double
265
266-- | wrapper for int gsl_sf_pochrel_e(double a,double x,gsl_sf_result* result);
267--
268-- <http://www.google.com/search?q=gsl_sf_pochrel_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
269pochrel_e :: Double -> Double -> (Double,Double)
270pochrel_e a x = createSFR "pochrel_e" $ gsl_sf_pochrel_e a x
271foreign import ccall "gamma.h gsl_sf_pochrel_e" gsl_sf_pochrel_e :: Double -> Double -> Ptr Double -> IO(Int)
272
273-- | wrapper for double gsl_sf_pochrel(double a,double x);
274--
275-- <http://www.google.com/search?q=gsl_sf_pochrel&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
276pochrel :: Double -> Double -> Double
277pochrel = gsl_sf_pochrel
278foreign import ccall "gamma.h gsl_sf_pochrel" gsl_sf_pochrel :: Double -> Double -> Double
279
280-- | wrapper for int gsl_sf_gamma_inc_Q_e(double a,double x,gsl_sf_result* result);
281--
282-- <http://www.google.com/search?q=gsl_sf_gamma_inc_Q_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
283gamma_inc_Q_e :: Double -> Double -> (Double,Double)
284gamma_inc_Q_e a x = createSFR "gamma_inc_Q_e" $ gsl_sf_gamma_inc_Q_e a x
285foreign import ccall "gamma.h gsl_sf_gamma_inc_Q_e" gsl_sf_gamma_inc_Q_e :: Double -> Double -> Ptr Double -> IO(Int)
286
287-- | wrapper for double gsl_sf_gamma_inc_Q(double a,double x);
288--
289-- <http://www.google.com/search?q=gsl_sf_gamma_inc_Q&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
290gamma_inc_Q :: Double -> Double -> Double
291gamma_inc_Q = gsl_sf_gamma_inc_Q
292foreign import ccall "gamma.h gsl_sf_gamma_inc_Q" gsl_sf_gamma_inc_Q :: Double -> Double -> Double
293
294-- | wrapper for int gsl_sf_gamma_inc_P_e(double a,double x,gsl_sf_result* result);
295--
296-- <http://www.google.com/search?q=gsl_sf_gamma_inc_P_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
297gamma_inc_P_e :: Double -> Double -> (Double,Double)
298gamma_inc_P_e a x = createSFR "gamma_inc_P_e" $ gsl_sf_gamma_inc_P_e a x
299foreign import ccall "gamma.h gsl_sf_gamma_inc_P_e" gsl_sf_gamma_inc_P_e :: Double -> Double -> Ptr Double -> IO(Int)
300
301-- | wrapper for double gsl_sf_gamma_inc_P(double a,double x);
302--
303-- <http://www.google.com/search?q=gsl_sf_gamma_inc_P&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
304gamma_inc_P :: Double -> Double -> Double
305gamma_inc_P = gsl_sf_gamma_inc_P
306foreign import ccall "gamma.h gsl_sf_gamma_inc_P" gsl_sf_gamma_inc_P :: Double -> Double -> Double
307
308-- | wrapper for int gsl_sf_gamma_inc_e(double a,double x,gsl_sf_result* result);
309--
310-- <http://www.google.com/search?q=gsl_sf_gamma_inc_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
311gamma_inc_e :: Double -> Double -> (Double,Double)
312gamma_inc_e a x = createSFR "gamma_inc_e" $ gsl_sf_gamma_inc_e a x
313foreign import ccall "gamma.h gsl_sf_gamma_inc_e" gsl_sf_gamma_inc_e :: Double -> Double -> Ptr Double -> IO(Int)
314
315-- | wrapper for double gsl_sf_gamma_inc(double a,double x);
316--
317-- <http://www.google.com/search?q=gsl_sf_gamma_inc&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
318gamma_inc :: Double -> Double -> Double
319gamma_inc = gsl_sf_gamma_inc
320foreign import ccall "gamma.h gsl_sf_gamma_inc" gsl_sf_gamma_inc :: Double -> Double -> Double
321
322-- | wrapper for int gsl_sf_lnbeta_e(double a,double b,gsl_sf_result* result);
323--
324-- <http://www.google.com/search?q=gsl_sf_lnbeta_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
325lnbeta_e :: Double -> Double -> (Double,Double)
326lnbeta_e a b = createSFR "lnbeta_e" $ gsl_sf_lnbeta_e a b
327foreign import ccall "gamma.h gsl_sf_lnbeta_e" gsl_sf_lnbeta_e :: Double -> Double -> Ptr Double -> IO(Int)
328
329-- | wrapper for double gsl_sf_lnbeta(double a,double b);
330--
331-- <http://www.google.com/search?q=gsl_sf_lnbeta&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
332lnbeta :: Double -> Double -> Double
333lnbeta = gsl_sf_lnbeta
334foreign import ccall "gamma.h gsl_sf_lnbeta" gsl_sf_lnbeta :: Double -> Double -> Double
335
336-- | wrapper for int gsl_sf_beta_e(double a,double b,gsl_sf_result* result);
337--
338-- <http://www.google.com/search?q=gsl_sf_beta_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
339beta_e :: Double -> Double -> (Double,Double)
340beta_e a b = createSFR "beta_e" $ gsl_sf_beta_e a b
341foreign import ccall "gamma.h gsl_sf_beta_e" gsl_sf_beta_e :: Double -> Double -> Ptr Double -> IO(Int)
342
343-- | wrapper for double gsl_sf_beta(double a,double b);
344--
345-- <http://www.google.com/search?q=gsl_sf_beta&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
346beta :: Double -> Double -> Double
347beta = gsl_sf_beta
348foreign import ccall "gamma.h gsl_sf_beta" gsl_sf_beta :: Double -> Double -> Double
349
350-- | wrapper for int gsl_sf_beta_inc_e(double a,double b,double x,gsl_sf_result* result);
351--
352-- <http://www.google.com/search?q=gsl_sf_beta_inc_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
353beta_inc_e :: Double -> Double -> Double -> (Double,Double)
354beta_inc_e a b x = createSFR "beta_inc_e" $ gsl_sf_beta_inc_e a b x
355foreign import ccall "gamma.h gsl_sf_beta_inc_e" gsl_sf_beta_inc_e :: Double -> Double -> Double -> Ptr Double -> IO(Int)
356
357-- | wrapper for double gsl_sf_beta_inc(double a,double b,double x);
358--
359-- <http://www.google.com/search?q=gsl_sf_beta_inc&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
360beta_inc :: Double -> Double -> Double -> Double
361beta_inc = gsl_sf_beta_inc
362foreign import ccall "gamma.h gsl_sf_beta_inc" gsl_sf_beta_inc :: Double -> Double -> Double -> Double
diff --git a/lib/Numeric/GSL/Special/Gegenbauer.hs b/lib/Numeric/GSL/Special/Gegenbauer.hs
new file mode 100644
index 0000000..40cc1e9
--- /dev/null
+++ b/lib/Numeric/GSL/Special/Gegenbauer.hs
@@ -0,0 +1,92 @@
1------------------------------------------------------------
2{- |
3Module : Numeric.GSL.Special.Gegenbauer
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.google.com/search?q=gsl_sf_gegenbauer.h&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
13
14-}
15------------------------------------------------------------
16
17module Numeric.GSL.Special.Gegenbauer(
18 gegenpoly_1_e
19, gegenpoly_2_e
20, gegenpoly_3_e
21, gegenpoly_1
22, gegenpoly_2
23, gegenpoly_3
24, gegenpoly_n_e
25, gegenpoly_n
26) where
27
28import Foreign(Ptr)
29import Numeric.GSL.Special.Internal
30
31-- | wrapper for int gsl_sf_gegenpoly_1_e(double lambda,double x,gsl_sf_result* result);
32--
33-- <http://www.google.com/search?q=gsl_sf_gegenpoly_1_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
34gegenpoly_1_e :: Double -> Double -> (Double,Double)
35gegenpoly_1_e lambda x = createSFR "gegenpoly_1_e" $ gsl_sf_gegenpoly_1_e lambda x
36foreign import ccall "gegenbauer.h gsl_sf_gegenpoly_1_e" gsl_sf_gegenpoly_1_e :: Double -> Double -> Ptr Double -> IO(Int)
37
38-- | wrapper for int gsl_sf_gegenpoly_2_e(double lambda,double x,gsl_sf_result* result);
39--
40-- <http://www.google.com/search?q=gsl_sf_gegenpoly_2_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
41gegenpoly_2_e :: Double -> Double -> (Double,Double)
42gegenpoly_2_e lambda x = createSFR "gegenpoly_2_e" $ gsl_sf_gegenpoly_2_e lambda x
43foreign import ccall "gegenbauer.h gsl_sf_gegenpoly_2_e" gsl_sf_gegenpoly_2_e :: Double -> Double -> Ptr Double -> IO(Int)
44
45-- | wrapper for int gsl_sf_gegenpoly_3_e(double lambda,double x,gsl_sf_result* result);
46--
47-- <http://www.google.com/search?q=gsl_sf_gegenpoly_3_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
48gegenpoly_3_e :: Double -> Double -> (Double,Double)
49gegenpoly_3_e lambda x = createSFR "gegenpoly_3_e" $ gsl_sf_gegenpoly_3_e lambda x
50foreign import ccall "gegenbauer.h gsl_sf_gegenpoly_3_e" gsl_sf_gegenpoly_3_e :: Double -> Double -> Ptr Double -> IO(Int)
51
52-- | wrapper for double gsl_sf_gegenpoly_1(double lambda,double x);
53--
54-- <http://www.google.com/search?q=gsl_sf_gegenpoly_1&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
55gegenpoly_1 :: Double -> Double -> Double
56gegenpoly_1 = gsl_sf_gegenpoly_1
57foreign import ccall "gegenbauer.h gsl_sf_gegenpoly_1" gsl_sf_gegenpoly_1 :: Double -> Double -> Double
58
59-- | wrapper for double gsl_sf_gegenpoly_2(double lambda,double x);
60--
61-- <http://www.google.com/search?q=gsl_sf_gegenpoly_2&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
62gegenpoly_2 :: Double -> Double -> Double
63gegenpoly_2 = gsl_sf_gegenpoly_2
64foreign import ccall "gegenbauer.h gsl_sf_gegenpoly_2" gsl_sf_gegenpoly_2 :: Double -> Double -> Double
65
66-- | wrapper for double gsl_sf_gegenpoly_3(double lambda,double x);
67--
68-- <http://www.google.com/search?q=gsl_sf_gegenpoly_3&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
69gegenpoly_3 :: Double -> Double -> Double
70gegenpoly_3 = gsl_sf_gegenpoly_3
71foreign import ccall "gegenbauer.h gsl_sf_gegenpoly_3" gsl_sf_gegenpoly_3 :: Double -> Double -> Double
72
73-- | wrapper for int gsl_sf_gegenpoly_n_e(int n,double lambda,double x,gsl_sf_result* result);
74--
75-- <http://www.google.com/search?q=gsl_sf_gegenpoly_n_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
76gegenpoly_n_e :: Int -> Double -> Double -> (Double,Double)
77gegenpoly_n_e n lambda x = createSFR "gegenpoly_n_e" $ gsl_sf_gegenpoly_n_e n lambda x
78foreign import ccall "gegenbauer.h gsl_sf_gegenpoly_n_e" gsl_sf_gegenpoly_n_e :: Int -> Double -> Double -> Ptr Double -> IO(Int)
79
80-- | wrapper for double gsl_sf_gegenpoly_n(int n,double lambda,double x);
81--
82-- <http://www.google.com/search?q=gsl_sf_gegenpoly_n&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
83gegenpoly_n :: Int -> Double -> Double -> Double
84gegenpoly_n = gsl_sf_gegenpoly_n
85foreign import ccall "gegenbauer.h gsl_sf_gegenpoly_n" gsl_sf_gegenpoly_n :: Int -> Double -> Double -> Double
86
87-- | wrapper for int gsl_sf_gegenpoly_array(int nmax,double lambda,double x,double* result_array);
88--
89-- <http://www.google.com/search?q=gsl_sf_gegenpoly_array&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
90gegenpoly_array :: Int -> Double -> Double -> Ptr Double -> Int
91gegenpoly_array = gsl_sf_gegenpoly_array
92foreign import ccall "gegenbauer.h gsl_sf_gegenpoly_array" gsl_sf_gegenpoly_array :: Int -> Double -> Double -> Ptr Double -> Int
diff --git a/lib/Numeric/GSL/Special/Hyperg.hs b/lib/Numeric/GSL/Special/Hyperg.hs
new file mode 100644
index 0000000..28bf984
--- /dev/null
+++ b/lib/Numeric/GSL/Special/Hyperg.hs
@@ -0,0 +1,197 @@
1------------------------------------------------------------
2{- |
3Module : Numeric.GSL.Special.Hyperg
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.google.com/search?q=gsl_sf_hyperg.h&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
13
14-}
15------------------------------------------------------------
16
17module Numeric.GSL.Special.Hyperg(
18 hyperg_0F1_e
19, hyperg_0F1
20, hyperg_1F1_int_e
21, hyperg_1F1_int
22, hyperg_1F1_e
23, hyperg_1F1
24, hyperg_U_int_e
25, hyperg_U_int
26, hyperg_U_int_e10_e
27, hyperg_U_e
28, hyperg_U
29, hyperg_U_e10_e
30, hyperg_2F1_e
31, hyperg_2F1
32, hyperg_2F1_conj_e
33, hyperg_2F1_conj
34, hyperg_2F1_renorm_e
35, hyperg_2F1_renorm
36, hyperg_2F1_conj_renorm_e
37, hyperg_2F1_conj_renorm
38, hyperg_2F0_e
39, hyperg_2F0
40) where
41
42import Foreign(Ptr)
43import Numeric.GSL.Special.Internal
44
45-- | wrapper for int gsl_sf_hyperg_0F1_e(double c,double x,gsl_sf_result* result);
46--
47-- <http://www.google.com/search?q=gsl_sf_hyperg_0F1_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
48hyperg_0F1_e :: Double -> Double -> (Double,Double)
49hyperg_0F1_e c x = createSFR "hyperg_0F1_e" $ gsl_sf_hyperg_0F1_e c x
50foreign import ccall "hyperg.h gsl_sf_hyperg_0F1_e" gsl_sf_hyperg_0F1_e :: Double -> Double -> Ptr Double -> IO(Int)
51
52-- | wrapper for double gsl_sf_hyperg_0F1(double c,double x);
53--
54-- <http://www.google.com/search?q=gsl_sf_hyperg_0F1&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
55hyperg_0F1 :: Double -> Double -> Double
56hyperg_0F1 = gsl_sf_hyperg_0F1
57foreign import ccall "hyperg.h gsl_sf_hyperg_0F1" gsl_sf_hyperg_0F1 :: Double -> Double -> Double
58
59-- | wrapper for int gsl_sf_hyperg_1F1_int_e(int m,int n,double x,gsl_sf_result* result);
60--
61-- <http://www.google.com/search?q=gsl_sf_hyperg_1F1_int_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
62hyperg_1F1_int_e :: Int -> Int -> Double -> (Double,Double)
63hyperg_1F1_int_e m n x = createSFR "hyperg_1F1_int_e" $ gsl_sf_hyperg_1F1_int_e m n x
64foreign import ccall "hyperg.h gsl_sf_hyperg_1F1_int_e" gsl_sf_hyperg_1F1_int_e :: Int -> Int -> Double -> Ptr Double -> IO(Int)
65
66-- | wrapper for double gsl_sf_hyperg_1F1_int(int m,int n,double x);
67--
68-- <http://www.google.com/search?q=gsl_sf_hyperg_1F1_int&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
69hyperg_1F1_int :: Int -> Int -> Double -> Double
70hyperg_1F1_int = gsl_sf_hyperg_1F1_int
71foreign import ccall "hyperg.h gsl_sf_hyperg_1F1_int" gsl_sf_hyperg_1F1_int :: Int -> Int -> Double -> Double
72
73-- | wrapper for int gsl_sf_hyperg_1F1_e(double a,double b,double x,gsl_sf_result* result);
74--
75-- <http://www.google.com/search?q=gsl_sf_hyperg_1F1_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
76hyperg_1F1_e :: Double -> Double -> Double -> (Double,Double)
77hyperg_1F1_e a b x = createSFR "hyperg_1F1_e" $ gsl_sf_hyperg_1F1_e a b x
78foreign import ccall "hyperg.h gsl_sf_hyperg_1F1_e" gsl_sf_hyperg_1F1_e :: Double -> Double -> Double -> Ptr Double -> IO(Int)
79
80-- | wrapper for double gsl_sf_hyperg_1F1(double a,double b,double x);
81--
82-- <http://www.google.com/search?q=gsl_sf_hyperg_1F1&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
83hyperg_1F1 :: Double -> Double -> Double -> Double
84hyperg_1F1 = gsl_sf_hyperg_1F1
85foreign import ccall "hyperg.h gsl_sf_hyperg_1F1" gsl_sf_hyperg_1F1 :: Double -> Double -> Double -> Double
86
87-- | wrapper for int gsl_sf_hyperg_U_int_e(int m,int n,double x,gsl_sf_result* result);
88--
89-- <http://www.google.com/search?q=gsl_sf_hyperg_U_int_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
90hyperg_U_int_e :: Int -> Int -> Double -> (Double,Double)
91hyperg_U_int_e m n x = createSFR "hyperg_U_int_e" $ gsl_sf_hyperg_U_int_e m n x
92foreign import ccall "hyperg.h gsl_sf_hyperg_U_int_e" gsl_sf_hyperg_U_int_e :: Int -> Int -> Double -> Ptr Double -> IO(Int)
93
94-- | wrapper for double gsl_sf_hyperg_U_int(int m,int n,double x);
95--
96-- <http://www.google.com/search?q=gsl_sf_hyperg_U_int&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
97hyperg_U_int :: Int -> Int -> Double -> Double
98hyperg_U_int = gsl_sf_hyperg_U_int
99foreign import ccall "hyperg.h gsl_sf_hyperg_U_int" gsl_sf_hyperg_U_int :: Int -> Int -> Double -> Double
100
101-- | wrapper for int gsl_sf_hyperg_U_int_e10_e(int m,int n,double x,gsl_sf_result_e10* result);
102--
103-- <http://www.google.com/search?q=gsl_sf_hyperg_U_int_e10_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
104hyperg_U_int_e10_e :: Int -> Int -> Double -> (Double,Int,Double)
105hyperg_U_int_e10_e m n x = createSFR_E10 "hyperg_U_int_e10_e" $ gsl_sf_hyperg_U_int_e10_e m n x
106foreign import ccall "hyperg.h gsl_sf_hyperg_U_int_e10_e" gsl_sf_hyperg_U_int_e10_e :: Int -> Int -> Double -> Ptr () -> IO(Int)
107
108-- | wrapper for int gsl_sf_hyperg_U_e(double a,double b,double x,gsl_sf_result* result);
109--
110-- <http://www.google.com/search?q=gsl_sf_hyperg_U_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
111hyperg_U_e :: Double -> Double -> Double -> (Double,Double)
112hyperg_U_e a b x = createSFR "hyperg_U_e" $ gsl_sf_hyperg_U_e a b x
113foreign import ccall "hyperg.h gsl_sf_hyperg_U_e" gsl_sf_hyperg_U_e :: Double -> Double -> Double -> Ptr Double -> IO(Int)
114
115-- | wrapper for double gsl_sf_hyperg_U(double a,double b,double x);
116--
117-- <http://www.google.com/search?q=gsl_sf_hyperg_U&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
118hyperg_U :: Double -> Double -> Double -> Double
119hyperg_U = gsl_sf_hyperg_U
120foreign import ccall "hyperg.h gsl_sf_hyperg_U" gsl_sf_hyperg_U :: Double -> Double -> Double -> Double
121
122-- | wrapper for int gsl_sf_hyperg_U_e10_e(double a,double b,double x,gsl_sf_result_e10* result);
123--
124-- <http://www.google.com/search?q=gsl_sf_hyperg_U_e10_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
125hyperg_U_e10_e :: Double -> Double -> Double -> (Double,Int,Double)
126hyperg_U_e10_e a b x = createSFR_E10 "hyperg_U_e10_e" $ gsl_sf_hyperg_U_e10_e a b x
127foreign import ccall "hyperg.h gsl_sf_hyperg_U_e10_e" gsl_sf_hyperg_U_e10_e :: Double -> Double -> Double -> Ptr () -> IO(Int)
128
129-- | wrapper for int gsl_sf_hyperg_2F1_e(double a,double b,double c,double x,gsl_sf_result* result);
130--
131-- <http://www.google.com/search?q=gsl_sf_hyperg_2F1_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
132hyperg_2F1_e :: Double -> Double -> Double -> Double -> (Double,Double)
133hyperg_2F1_e a b c x = createSFR "hyperg_2F1_e" $ gsl_sf_hyperg_2F1_e a b c x
134foreign import ccall "hyperg.h gsl_sf_hyperg_2F1_e" gsl_sf_hyperg_2F1_e :: Double -> Double -> Double -> Double -> Ptr Double -> IO(Int)
135
136-- | wrapper for double gsl_sf_hyperg_2F1(double a,double b,double c,double x);
137--
138-- <http://www.google.com/search?q=gsl_sf_hyperg_2F1&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
139hyperg_2F1 :: Double -> Double -> Double -> Double -> Double
140hyperg_2F1 = gsl_sf_hyperg_2F1
141foreign import ccall "hyperg.h gsl_sf_hyperg_2F1" gsl_sf_hyperg_2F1 :: Double -> Double -> Double -> Double -> Double
142
143-- | wrapper for int gsl_sf_hyperg_2F1_conj_e(double aR,double aI,double c,double x,gsl_sf_result* result);
144--
145-- <http://www.google.com/search?q=gsl_sf_hyperg_2F1_conj_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
146hyperg_2F1_conj_e :: Double -> Double -> Double -> Double -> (Double,Double)
147hyperg_2F1_conj_e aR aI c x = createSFR "hyperg_2F1_conj_e" $ gsl_sf_hyperg_2F1_conj_e aR aI c x
148foreign import ccall "hyperg.h gsl_sf_hyperg_2F1_conj_e" gsl_sf_hyperg_2F1_conj_e :: Double -> Double -> Double -> Double -> Ptr Double -> IO(Int)
149
150-- | wrapper for double gsl_sf_hyperg_2F1_conj(double aR,double aI,double c,double x);
151--
152-- <http://www.google.com/search?q=gsl_sf_hyperg_2F1_conj&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
153hyperg_2F1_conj :: Double -> Double -> Double -> Double -> Double
154hyperg_2F1_conj = gsl_sf_hyperg_2F1_conj
155foreign import ccall "hyperg.h gsl_sf_hyperg_2F1_conj" gsl_sf_hyperg_2F1_conj :: Double -> Double -> Double -> Double -> Double
156
157-- | wrapper for int gsl_sf_hyperg_2F1_renorm_e(double a,double b,double c,double x,gsl_sf_result* result);
158--
159-- <http://www.google.com/search?q=gsl_sf_hyperg_2F1_renorm_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
160hyperg_2F1_renorm_e :: Double -> Double -> Double -> Double -> (Double,Double)
161hyperg_2F1_renorm_e a b c x = createSFR "hyperg_2F1_renorm_e" $ gsl_sf_hyperg_2F1_renorm_e a b c x
162foreign import ccall "hyperg.h gsl_sf_hyperg_2F1_renorm_e" gsl_sf_hyperg_2F1_renorm_e :: Double -> Double -> Double -> Double -> Ptr Double -> IO(Int)
163
164-- | wrapper for double gsl_sf_hyperg_2F1_renorm(double a,double b,double c,double x);
165--
166-- <http://www.google.com/search?q=gsl_sf_hyperg_2F1_renorm&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
167hyperg_2F1_renorm :: Double -> Double -> Double -> Double -> Double
168hyperg_2F1_renorm = gsl_sf_hyperg_2F1_renorm
169foreign import ccall "hyperg.h gsl_sf_hyperg_2F1_renorm" gsl_sf_hyperg_2F1_renorm :: Double -> Double -> Double -> Double -> Double
170
171-- | wrapper for int gsl_sf_hyperg_2F1_conj_renorm_e(double aR,double aI,double c,double x,gsl_sf_result* result);
172--
173-- <http://www.google.com/search?q=gsl_sf_hyperg_2F1_conj_renorm_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
174hyperg_2F1_conj_renorm_e :: Double -> Double -> Double -> Double -> (Double,Double)
175hyperg_2F1_conj_renorm_e aR aI c x = createSFR "hyperg_2F1_conj_renorm_e" $ gsl_sf_hyperg_2F1_conj_renorm_e aR aI c x
176foreign import ccall "hyperg.h gsl_sf_hyperg_2F1_conj_renorm_e" gsl_sf_hyperg_2F1_conj_renorm_e :: Double -> Double -> Double -> Double -> Ptr Double -> IO(Int)
177
178-- | wrapper for double gsl_sf_hyperg_2F1_conj_renorm(double aR,double aI,double c,double x);
179--
180-- <http://www.google.com/search?q=gsl_sf_hyperg_2F1_conj_renorm&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
181hyperg_2F1_conj_renorm :: Double -> Double -> Double -> Double -> Double
182hyperg_2F1_conj_renorm = gsl_sf_hyperg_2F1_conj_renorm
183foreign import ccall "hyperg.h gsl_sf_hyperg_2F1_conj_renorm" gsl_sf_hyperg_2F1_conj_renorm :: Double -> Double -> Double -> Double -> Double
184
185-- | wrapper for int gsl_sf_hyperg_2F0_e(double a,double b,double x,gsl_sf_result* result);
186--
187-- <http://www.google.com/search?q=gsl_sf_hyperg_2F0_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
188hyperg_2F0_e :: Double -> Double -> Double -> (Double,Double)
189hyperg_2F0_e a b x = createSFR "hyperg_2F0_e" $ gsl_sf_hyperg_2F0_e a b x
190foreign import ccall "hyperg.h gsl_sf_hyperg_2F0_e" gsl_sf_hyperg_2F0_e :: Double -> Double -> Double -> Ptr Double -> IO(Int)
191
192-- | wrapper for double gsl_sf_hyperg_2F0(double a,double b,double x);
193--
194-- <http://www.google.com/search?q=gsl_sf_hyperg_2F0&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
195hyperg_2F0 :: Double -> Double -> Double -> Double
196hyperg_2F0 = gsl_sf_hyperg_2F0
197foreign import ccall "hyperg.h gsl_sf_hyperg_2F0" gsl_sf_hyperg_2F0 :: Double -> Double -> Double -> Double
diff --git a/lib/Numeric/GSL/Special/Internal.hs b/lib/Numeric/GSL/Special/Internal.hs
new file mode 100644
index 0000000..a08809b
--- /dev/null
+++ b/lib/Numeric/GSL/Special/Internal.hs
@@ -0,0 +1,68 @@
1{-# OPTIONS #-}
2-----------------------------------------------------------------------------
3{- |
4Module : Numeric.GSL.Special.Internal
5Copyright : (c) Alberto Ruiz 2007
6License : GPL-style
7
8Maintainer : Alberto Ruiz (aruiz at um dot es)
9Stability : provisional
10Portability : uses ffi
11
12Support for Special functions.
13
14<http://www.gnu.org/software/gsl/manual/html_node/Special-Functions.html#Special-Functions>
15-}
16-----------------------------------------------------------------------------
17
18module Numeric.GSL.Special.Internal (
19 createSFR,
20 createSFR_E10,
21 Precision(..),
22 Gsl_mode_t,
23 Size_t,
24 precCode
25)
26where
27
28import Foreign
29import Data.Packed.Internal(check,(//))
30
31
32data Precision = PrecDouble | PrecSingle | PrecApprox
33
34precCode :: Precision -> Int
35precCode PrecDouble = 0
36precCode PrecSingle = 1
37precCode PrecApprox = 2
38
39type Gsl_mode_t = Int
40
41type Size_t = Int
42
43----------------------------------------------------------------
44-- | access to a sf_result
45createSFR :: Storable a => String -> (Ptr a -> IO Int) -> (a, a)
46createSFR s f = unsafePerformIO $ do
47 p <- mallocArray 2
48 f p // check s []
49 [val,err] <- peekArray 2 p
50 free p
51 return (val,err)
52
53
54---------------------------------------------------------------------
55-- the sf_result_e10 contains two doubles and the exponent
56
57-- | acces to sf_result_e10
58createSFR_E10 :: (Storable t2, Storable t3, Storable t1) => String -> (Ptr a -> IO Int) -> (t1, t2, t3)
59createSFR_E10 s f = unsafePerformIO $ do
60 let sd = sizeOf (0::Double)
61 let si = sizeOf (0::Int)
62 p <- mallocBytes (2*sd + si)
63 f p // check s []
64 val <- peekByteOff p 0
65 err <- peekByteOff p sd
66 expo <- peekByteOff p (2*sd)
67 free p
68 return (val,expo,err)
diff --git a/lib/Numeric/GSL/Special/Laguerre.hs b/lib/Numeric/GSL/Special/Laguerre.hs
new file mode 100644
index 0000000..320e451
--- /dev/null
+++ b/lib/Numeric/GSL/Special/Laguerre.hs
@@ -0,0 +1,85 @@
1------------------------------------------------------------
2{- |
3Module : Numeric.GSL.Special.Laguerre
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.google.com/search?q=gsl_sf_laguerre.h&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
13
14-}
15------------------------------------------------------------
16
17module Numeric.GSL.Special.Laguerre(
18 laguerre_1_e
19, laguerre_2_e
20, laguerre_3_e
21, laguerre_1
22, laguerre_2
23, laguerre_3
24, laguerre_n_e
25, laguerre_n
26) where
27
28import Foreign(Ptr)
29import Numeric.GSL.Special.Internal
30
31-- | wrapper for int gsl_sf_laguerre_1_e(double a,double x,gsl_sf_result* result);
32--
33-- <http://www.google.com/search?q=gsl_sf_laguerre_1_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
34laguerre_1_e :: Double -> Double -> (Double,Double)
35laguerre_1_e a x = createSFR "laguerre_1_e" $ gsl_sf_laguerre_1_e a x
36foreign import ccall "laguerre.h gsl_sf_laguerre_1_e" gsl_sf_laguerre_1_e :: Double -> Double -> Ptr Double -> IO(Int)
37
38-- | wrapper for int gsl_sf_laguerre_2_e(double a,double x,gsl_sf_result* result);
39--
40-- <http://www.google.com/search?q=gsl_sf_laguerre_2_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
41laguerre_2_e :: Double -> Double -> (Double,Double)
42laguerre_2_e a x = createSFR "laguerre_2_e" $ gsl_sf_laguerre_2_e a x
43foreign import ccall "laguerre.h gsl_sf_laguerre_2_e" gsl_sf_laguerre_2_e :: Double -> Double -> Ptr Double -> IO(Int)
44
45-- | wrapper for int gsl_sf_laguerre_3_e(double a,double x,gsl_sf_result* result);
46--
47-- <http://www.google.com/search?q=gsl_sf_laguerre_3_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
48laguerre_3_e :: Double -> Double -> (Double,Double)
49laguerre_3_e a x = createSFR "laguerre_3_e" $ gsl_sf_laguerre_3_e a x
50foreign import ccall "laguerre.h gsl_sf_laguerre_3_e" gsl_sf_laguerre_3_e :: Double -> Double -> Ptr Double -> IO(Int)
51
52-- | wrapper for double gsl_sf_laguerre_1(double a,double x);
53--
54-- <http://www.google.com/search?q=gsl_sf_laguerre_1&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
55laguerre_1 :: Double -> Double -> Double
56laguerre_1 = gsl_sf_laguerre_1
57foreign import ccall "laguerre.h gsl_sf_laguerre_1" gsl_sf_laguerre_1 :: Double -> Double -> Double
58
59-- | wrapper for double gsl_sf_laguerre_2(double a,double x);
60--
61-- <http://www.google.com/search?q=gsl_sf_laguerre_2&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
62laguerre_2 :: Double -> Double -> Double
63laguerre_2 = gsl_sf_laguerre_2
64foreign import ccall "laguerre.h gsl_sf_laguerre_2" gsl_sf_laguerre_2 :: Double -> Double -> Double
65
66-- | wrapper for double gsl_sf_laguerre_3(double a,double x);
67--
68-- <http://www.google.com/search?q=gsl_sf_laguerre_3&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
69laguerre_3 :: Double -> Double -> Double
70laguerre_3 = gsl_sf_laguerre_3
71foreign import ccall "laguerre.h gsl_sf_laguerre_3" gsl_sf_laguerre_3 :: Double -> Double -> Double
72
73-- | wrapper for int gsl_sf_laguerre_n_e(int n,double a,double x,gsl_sf_result* result);
74--
75-- <http://www.google.com/search?q=gsl_sf_laguerre_n_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
76laguerre_n_e :: Int -> Double -> Double -> (Double,Double)
77laguerre_n_e n a x = createSFR "laguerre_n_e" $ gsl_sf_laguerre_n_e n a x
78foreign import ccall "laguerre.h gsl_sf_laguerre_n_e" gsl_sf_laguerre_n_e :: Int -> Double -> Double -> Ptr Double -> IO(Int)
79
80-- | wrapper for double gsl_sf_laguerre_n(int n,double a,double x);
81--
82-- <http://www.google.com/search?q=gsl_sf_laguerre_n&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
83laguerre_n :: Int -> Double -> Double -> Double
84laguerre_n = gsl_sf_laguerre_n
85foreign import ccall "laguerre.h gsl_sf_laguerre_n" gsl_sf_laguerre_n :: Int -> Double -> Double -> Double
diff --git a/lib/Numeric/GSL/Special/Lambert.hs b/lib/Numeric/GSL/Special/Lambert.hs
new file mode 100644
index 0000000..ad5579f
--- /dev/null
+++ b/lib/Numeric/GSL/Special/Lambert.hs
@@ -0,0 +1,53 @@
1------------------------------------------------------------
2{- |
3Module : Numeric.GSL.Special.Lambert
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.google.com/search?q=gsl_sf_lambert.h&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
13
14-}
15------------------------------------------------------------
16
17module Numeric.GSL.Special.Lambert(
18 lambert_W0_e
19, lambert_W0
20, lambert_Wm1_e
21, lambert_Wm1
22) where
23
24import Foreign(Ptr)
25import Numeric.GSL.Special.Internal
26
27-- | wrapper for int gsl_sf_lambert_W0_e(double x,gsl_sf_result* result);
28--
29-- <http://www.google.com/search?q=gsl_sf_lambert_W0_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
30lambert_W0_e :: Double -> (Double,Double)
31lambert_W0_e x = createSFR "lambert_W0_e" $ gsl_sf_lambert_W0_e x
32foreign import ccall "lambert.h gsl_sf_lambert_W0_e" gsl_sf_lambert_W0_e :: Double -> Ptr Double -> IO(Int)
33
34-- | wrapper for double gsl_sf_lambert_W0(double x);
35--
36-- <http://www.google.com/search?q=gsl_sf_lambert_W0&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
37lambert_W0 :: Double -> Double
38lambert_W0 = gsl_sf_lambert_W0
39foreign import ccall "lambert.h gsl_sf_lambert_W0" gsl_sf_lambert_W0 :: Double -> Double
40
41-- | wrapper for int gsl_sf_lambert_Wm1_e(double x,gsl_sf_result* result);
42--
43-- <http://www.google.com/search?q=gsl_sf_lambert_Wm1_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
44lambert_Wm1_e :: Double -> (Double,Double)
45lambert_Wm1_e x = createSFR "lambert_Wm1_e" $ gsl_sf_lambert_Wm1_e x
46foreign import ccall "lambert.h gsl_sf_lambert_Wm1_e" gsl_sf_lambert_Wm1_e :: Double -> Ptr Double -> IO(Int)
47
48-- | wrapper for double gsl_sf_lambert_Wm1(double x);
49--
50-- <http://www.google.com/search?q=gsl_sf_lambert_Wm1&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
51lambert_Wm1 :: Double -> Double
52lambert_Wm1 = gsl_sf_lambert_Wm1
53foreign import ccall "lambert.h gsl_sf_lambert_Wm1" gsl_sf_lambert_Wm1 :: Double -> Double
diff --git a/lib/Numeric/GSL/Special/Legendre.hs b/lib/Numeric/GSL/Special/Legendre.hs
new file mode 100644
index 0000000..0ea7557
--- /dev/null
+++ b/lib/Numeric/GSL/Special/Legendre.hs
@@ -0,0 +1,278 @@
1------------------------------------------------------------
2{- |
3Module : Numeric.GSL.Special.Legendre
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/Legendre-Functions-and-Spherical-Harmonics.html>
13
14-}
15------------------------------------------------------------
16
17module Numeric.GSL.Special.Legendre(
18 legendre_Pl_e
19, legendre_Pl
20, legendre_P1_e
21, legendre_P2_e
22, legendre_P3_e
23, legendre_P1
24, legendre_P2
25, legendre_P3
26, legendre_Q0_e
27, legendre_Q0
28, legendre_Q1_e
29, legendre_Q1
30, legendre_Ql_e
31, legendre_Ql
32, legendre_Plm_e
33, legendre_Plm
34, legendre_sphPlm_e
35, legendre_sphPlm
36, legendre_array_size
37, conicalP_half_e
38, conicalP_half
39, conicalP_mhalf_e
40, conicalP_mhalf
41, conicalP_0_e
42, conicalP_0
43, conicalP_1_e
44, conicalP_1
45, conicalP_sph_reg_e
46, conicalP_sph_reg
47, conicalP_cyl_reg_e
48, conicalP_cyl_reg
49, legendre_H3d_0_e
50, legendre_H3d_0
51, legendre_H3d_1_e
52, legendre_H3d_1
53, legendre_H3d_e
54, legendre_H3d
55) where
56
57import Foreign(Ptr)
58import Numeric.GSL.Special.Internal
59
60-- | wrapper for int gsl_sf_legendre_Pl_e(int l,double x,gsl_sf_result* result);
61legendre_Pl_e :: Int -> Double -> (Double,Double)
62legendre_Pl_e l x = createSFR "legendre_Pl_e" $ gsl_sf_legendre_Pl_e l x
63foreign import ccall "legendre.h gsl_sf_legendre_Pl_e" gsl_sf_legendre_Pl_e :: Int -> Double -> Ptr Double -> IO(Int)
64
65-- | wrapper for double gsl_sf_legendre_Pl(int l,double x);
66legendre_Pl :: Int -> Double -> Double
67legendre_Pl = gsl_sf_legendre_Pl
68foreign import ccall "legendre.h gsl_sf_legendre_Pl" gsl_sf_legendre_Pl :: Int -> Double -> Double
69
70-- | wrapper for int gsl_sf_legendre_Pl_array(int lmax,double x,double* result_array);
71legendre_Pl_array :: Int -> Double -> Ptr Double -> Int
72legendre_Pl_array = gsl_sf_legendre_Pl_array
73foreign import ccall "legendre.h gsl_sf_legendre_Pl_array" gsl_sf_legendre_Pl_array :: Int -> Double -> Ptr Double -> Int
74
75-- | wrapper for int gsl_sf_legendre_Pl_deriv_array(int lmax,double x,double* result_array,double* result_deriv_array);
76legendre_Pl_deriv_array :: Int -> Double -> Ptr Double -> Ptr Double -> Int
77legendre_Pl_deriv_array = gsl_sf_legendre_Pl_deriv_array
78foreign import ccall "legendre.h gsl_sf_legendre_Pl_deriv_array" gsl_sf_legendre_Pl_deriv_array :: Int -> Double -> Ptr Double -> Ptr Double -> Int
79
80-- | wrapper for int gsl_sf_legendre_P1_e(double x,gsl_sf_result* result);
81legendre_P1_e :: Double -> (Double,Double)
82legendre_P1_e x = createSFR "legendre_P1_e" $ gsl_sf_legendre_P1_e x
83foreign import ccall "legendre.h gsl_sf_legendre_P1_e" gsl_sf_legendre_P1_e :: Double -> Ptr Double -> IO(Int)
84
85-- | wrapper for int gsl_sf_legendre_P2_e(double x,gsl_sf_result* result);
86legendre_P2_e :: Double -> (Double,Double)
87legendre_P2_e x = createSFR "legendre_P2_e" $ gsl_sf_legendre_P2_e x
88foreign import ccall "legendre.h gsl_sf_legendre_P2_e" gsl_sf_legendre_P2_e :: Double -> Ptr Double -> IO(Int)
89
90-- | wrapper for int gsl_sf_legendre_P3_e(double x,gsl_sf_result* result);
91legendre_P3_e :: Double -> (Double,Double)
92legendre_P3_e x = createSFR "legendre_P3_e" $ gsl_sf_legendre_P3_e x
93foreign import ccall "legendre.h gsl_sf_legendre_P3_e" gsl_sf_legendre_P3_e :: Double -> Ptr Double -> IO(Int)
94
95-- | wrapper for double gsl_sf_legendre_P1(double x);
96legendre_P1 :: Double -> Double
97legendre_P1 = gsl_sf_legendre_P1
98foreign import ccall "legendre.h gsl_sf_legendre_P1" gsl_sf_legendre_P1 :: Double -> Double
99
100-- | wrapper for double gsl_sf_legendre_P2(double x);
101legendre_P2 :: Double -> Double
102legendre_P2 = gsl_sf_legendre_P2
103foreign import ccall "legendre.h gsl_sf_legendre_P2" gsl_sf_legendre_P2 :: Double -> Double
104
105-- | wrapper for double gsl_sf_legendre_P3(double x);
106legendre_P3 :: Double -> Double
107legendre_P3 = gsl_sf_legendre_P3
108foreign import ccall "legendre.h gsl_sf_legendre_P3" gsl_sf_legendre_P3 :: Double -> Double
109
110-- | wrapper for int gsl_sf_legendre_Q0_e(double x,gsl_sf_result* result);
111legendre_Q0_e :: Double -> (Double,Double)
112legendre_Q0_e x = createSFR "legendre_Q0_e" $ gsl_sf_legendre_Q0_e x
113foreign import ccall "legendre.h gsl_sf_legendre_Q0_e" gsl_sf_legendre_Q0_e :: Double -> Ptr Double -> IO(Int)
114
115-- | wrapper for double gsl_sf_legendre_Q0(double x);
116legendre_Q0 :: Double -> Double
117legendre_Q0 = gsl_sf_legendre_Q0
118foreign import ccall "legendre.h gsl_sf_legendre_Q0" gsl_sf_legendre_Q0 :: Double -> Double
119
120-- | wrapper for int gsl_sf_legendre_Q1_e(double x,gsl_sf_result* result);
121legendre_Q1_e :: Double -> (Double,Double)
122legendre_Q1_e x = createSFR "legendre_Q1_e" $ gsl_sf_legendre_Q1_e x
123foreign import ccall "legendre.h gsl_sf_legendre_Q1_e" gsl_sf_legendre_Q1_e :: Double -> Ptr Double -> IO(Int)
124
125-- | wrapper for double gsl_sf_legendre_Q1(double x);
126legendre_Q1 :: Double -> Double
127legendre_Q1 = gsl_sf_legendre_Q1
128foreign import ccall "legendre.h gsl_sf_legendre_Q1" gsl_sf_legendre_Q1 :: Double -> Double
129
130-- | wrapper for int gsl_sf_legendre_Ql_e(int l,double x,gsl_sf_result* result);
131legendre_Ql_e :: Int -> Double -> (Double,Double)
132legendre_Ql_e l x = createSFR "legendre_Ql_e" $ gsl_sf_legendre_Ql_e l x
133foreign import ccall "legendre.h gsl_sf_legendre_Ql_e" gsl_sf_legendre_Ql_e :: Int -> Double -> Ptr Double -> IO(Int)
134
135-- | wrapper for double gsl_sf_legendre_Ql(int l,double x);
136legendre_Ql :: Int -> Double -> Double
137legendre_Ql = gsl_sf_legendre_Ql
138foreign import ccall "legendre.h gsl_sf_legendre_Ql" gsl_sf_legendre_Ql :: Int -> Double -> Double
139
140-- | wrapper for int gsl_sf_legendre_Plm_e(int l,int m,double x,gsl_sf_result* result);
141legendre_Plm_e :: Int -> Int -> Double -> (Double,Double)
142legendre_Plm_e l m x = createSFR "legendre_Plm_e" $ gsl_sf_legendre_Plm_e l m x
143foreign import ccall "legendre.h gsl_sf_legendre_Plm_e" gsl_sf_legendre_Plm_e :: Int -> Int -> Double -> Ptr Double -> IO(Int)
144
145-- | wrapper for double gsl_sf_legendre_Plm(int l,int m,double x);
146legendre_Plm :: Int -> Int -> Double -> Double
147legendre_Plm = gsl_sf_legendre_Plm
148foreign import ccall "legendre.h gsl_sf_legendre_Plm" gsl_sf_legendre_Plm :: Int -> Int -> Double -> Double
149
150-- | wrapper for int gsl_sf_legendre_Plm_array(int lmax,int m,double x,double* result_array);
151legendre_Plm_array :: Int -> Int -> Double -> Ptr Double -> Int
152legendre_Plm_array = gsl_sf_legendre_Plm_array
153foreign import ccall "legendre.h gsl_sf_legendre_Plm_array" gsl_sf_legendre_Plm_array :: Int -> Int -> Double -> Ptr Double -> Int
154
155-- | wrapper for int gsl_sf_legendre_Plm_deriv_array(int lmax,int m,double x,double* result_array,double* result_deriv_array);
156legendre_Plm_deriv_array :: Int -> Int -> Double -> Ptr Double -> Ptr Double -> Int
157legendre_Plm_deriv_array = gsl_sf_legendre_Plm_deriv_array
158foreign import ccall "legendre.h gsl_sf_legendre_Plm_deriv_array" gsl_sf_legendre_Plm_deriv_array :: Int -> Int -> Double -> Ptr Double -> Ptr Double -> Int
159
160-- | wrapper for int gsl_sf_legendre_sphPlm_e(int l,int m,double x,gsl_sf_result* result);
161legendre_sphPlm_e :: Int -> Int -> Double -> (Double,Double)
162legendre_sphPlm_e l m x = createSFR "legendre_sphPlm_e" $ gsl_sf_legendre_sphPlm_e l m x
163foreign import ccall "legendre.h gsl_sf_legendre_sphPlm_e" gsl_sf_legendre_sphPlm_e :: Int -> Int -> Double -> Ptr Double -> IO(Int)
164
165-- | wrapper for double gsl_sf_legendre_sphPlm(int l,int m,double x);
166legendre_sphPlm :: Int -> Int -> Double -> Double
167legendre_sphPlm = gsl_sf_legendre_sphPlm
168foreign import ccall "legendre.h gsl_sf_legendre_sphPlm" gsl_sf_legendre_sphPlm :: Int -> Int -> Double -> Double
169
170-- | wrapper for int gsl_sf_legendre_sphPlm_array(int lmax,int m,double x,double* result_array);
171legendre_sphPlm_array :: Int -> Int -> Double -> Ptr Double -> Int
172legendre_sphPlm_array = gsl_sf_legendre_sphPlm_array
173foreign import ccall "legendre.h gsl_sf_legendre_sphPlm_array" gsl_sf_legendre_sphPlm_array :: Int -> Int -> Double -> Ptr Double -> Int
174
175-- | wrapper for int gsl_sf_legendre_sphPlm_deriv_array(int lmax,int m,double x,double* result_array,double* result_deriv_array);
176legendre_sphPlm_deriv_array :: Int -> Int -> Double -> Ptr Double -> Ptr Double -> Int
177legendre_sphPlm_deriv_array = gsl_sf_legendre_sphPlm_deriv_array
178foreign import ccall "legendre.h gsl_sf_legendre_sphPlm_deriv_array" gsl_sf_legendre_sphPlm_deriv_array :: Int -> Int -> Double -> Ptr Double -> Ptr Double -> Int
179
180-- | wrapper for int gsl_sf_legendre_array_size(int lmax,int m);
181legendre_array_size :: Int -> Int -> Int
182legendre_array_size = gsl_sf_legendre_array_size
183foreign import ccall "legendre.h gsl_sf_legendre_array_size" gsl_sf_legendre_array_size :: Int -> Int -> Int
184
185-- | wrapper for int gsl_sf_conicalP_half_e(double lambda,double x,gsl_sf_result* result);
186conicalP_half_e :: Double -> Double -> (Double,Double)
187conicalP_half_e lambda x = createSFR "conicalP_half_e" $ gsl_sf_conicalP_half_e lambda x
188foreign import ccall "legendre.h gsl_sf_conicalP_half_e" gsl_sf_conicalP_half_e :: Double -> Double -> Ptr Double -> IO(Int)
189
190-- | wrapper for double gsl_sf_conicalP_half(double lambda,double x);
191conicalP_half :: Double -> Double -> Double
192conicalP_half = gsl_sf_conicalP_half
193foreign import ccall "legendre.h gsl_sf_conicalP_half" gsl_sf_conicalP_half :: Double -> Double -> Double
194
195-- | wrapper for int gsl_sf_conicalP_mhalf_e(double lambda,double x,gsl_sf_result* result);
196conicalP_mhalf_e :: Double -> Double -> (Double,Double)
197conicalP_mhalf_e lambda x = createSFR "conicalP_mhalf_e" $ gsl_sf_conicalP_mhalf_e lambda x
198foreign import ccall "legendre.h gsl_sf_conicalP_mhalf_e" gsl_sf_conicalP_mhalf_e :: Double -> Double -> Ptr Double -> IO(Int)
199
200-- | wrapper for double gsl_sf_conicalP_mhalf(double lambda,double x);
201conicalP_mhalf :: Double -> Double -> Double
202conicalP_mhalf = gsl_sf_conicalP_mhalf
203foreign import ccall "legendre.h gsl_sf_conicalP_mhalf" gsl_sf_conicalP_mhalf :: Double -> Double -> Double
204
205-- | wrapper for int gsl_sf_conicalP_0_e(double lambda,double x,gsl_sf_result* result);
206conicalP_0_e :: Double -> Double -> (Double,Double)
207conicalP_0_e lambda x = createSFR "conicalP_0_e" $ gsl_sf_conicalP_0_e lambda x
208foreign import ccall "legendre.h gsl_sf_conicalP_0_e" gsl_sf_conicalP_0_e :: Double -> Double -> Ptr Double -> IO(Int)
209
210-- | wrapper for double gsl_sf_conicalP_0(double lambda,double x);
211conicalP_0 :: Double -> Double -> Double
212conicalP_0 = gsl_sf_conicalP_0
213foreign import ccall "legendre.h gsl_sf_conicalP_0" gsl_sf_conicalP_0 :: Double -> Double -> Double
214
215-- | wrapper for int gsl_sf_conicalP_1_e(double lambda,double x,gsl_sf_result* result);
216conicalP_1_e :: Double -> Double -> (Double,Double)
217conicalP_1_e lambda x = createSFR "conicalP_1_e" $ gsl_sf_conicalP_1_e lambda x
218foreign import ccall "legendre.h gsl_sf_conicalP_1_e" gsl_sf_conicalP_1_e :: Double -> Double -> Ptr Double -> IO(Int)
219
220-- | wrapper for double gsl_sf_conicalP_1(double lambda,double x);
221conicalP_1 :: Double -> Double -> Double
222conicalP_1 = gsl_sf_conicalP_1
223foreign import ccall "legendre.h gsl_sf_conicalP_1" gsl_sf_conicalP_1 :: Double -> Double -> Double
224
225-- | wrapper for int gsl_sf_conicalP_sph_reg_e(int l,double lambda,double x,gsl_sf_result* result);
226conicalP_sph_reg_e :: Int -> Double -> Double -> (Double,Double)
227conicalP_sph_reg_e l lambda x = createSFR "conicalP_sph_reg_e" $ gsl_sf_conicalP_sph_reg_e l lambda x
228foreign import ccall "legendre.h gsl_sf_conicalP_sph_reg_e" gsl_sf_conicalP_sph_reg_e :: Int -> Double -> Double -> Ptr Double -> IO(Int)
229
230-- | wrapper for double gsl_sf_conicalP_sph_reg(int l,double lambda,double x);
231conicalP_sph_reg :: Int -> Double -> Double -> Double
232conicalP_sph_reg = gsl_sf_conicalP_sph_reg
233foreign import ccall "legendre.h gsl_sf_conicalP_sph_reg" gsl_sf_conicalP_sph_reg :: Int -> Double -> Double -> Double
234
235-- | wrapper for int gsl_sf_conicalP_cyl_reg_e(int m,double lambda,double x,gsl_sf_result* result);
236conicalP_cyl_reg_e :: Int -> Double -> Double -> (Double,Double)
237conicalP_cyl_reg_e m lambda x = createSFR "conicalP_cyl_reg_e" $ gsl_sf_conicalP_cyl_reg_e m lambda x
238foreign import ccall "legendre.h gsl_sf_conicalP_cyl_reg_e" gsl_sf_conicalP_cyl_reg_e :: Int -> Double -> Double -> Ptr Double -> IO(Int)
239
240-- | wrapper for double gsl_sf_conicalP_cyl_reg(int m,double lambda,double x);
241conicalP_cyl_reg :: Int -> Double -> Double -> Double
242conicalP_cyl_reg = gsl_sf_conicalP_cyl_reg
243foreign import ccall "legendre.h gsl_sf_conicalP_cyl_reg" gsl_sf_conicalP_cyl_reg :: Int -> Double -> Double -> Double
244
245-- | wrapper for int gsl_sf_legendre_H3d_0_e(double lambda,double eta,gsl_sf_result* result);
246legendre_H3d_0_e :: Double -> Double -> (Double,Double)
247legendre_H3d_0_e lambda eta = createSFR "legendre_H3d_0_e" $ gsl_sf_legendre_H3d_0_e lambda eta
248foreign import ccall "legendre.h gsl_sf_legendre_H3d_0_e" gsl_sf_legendre_H3d_0_e :: Double -> Double -> Ptr Double -> IO(Int)
249
250-- | wrapper for double gsl_sf_legendre_H3d_0(double lambda,double eta);
251legendre_H3d_0 :: Double -> Double -> Double
252legendre_H3d_0 = gsl_sf_legendre_H3d_0
253foreign import ccall "legendre.h gsl_sf_legendre_H3d_0" gsl_sf_legendre_H3d_0 :: Double -> Double -> Double
254
255-- | wrapper for int gsl_sf_legendre_H3d_1_e(double lambda,double eta,gsl_sf_result* result);
256legendre_H3d_1_e :: Double -> Double -> (Double,Double)
257legendre_H3d_1_e lambda eta = createSFR "legendre_H3d_1_e" $ gsl_sf_legendre_H3d_1_e lambda eta
258foreign import ccall "legendre.h gsl_sf_legendre_H3d_1_e" gsl_sf_legendre_H3d_1_e :: Double -> Double -> Ptr Double -> IO(Int)
259
260-- | wrapper for double gsl_sf_legendre_H3d_1(double lambda,double eta);
261legendre_H3d_1 :: Double -> Double -> Double
262legendre_H3d_1 = gsl_sf_legendre_H3d_1
263foreign import ccall "legendre.h gsl_sf_legendre_H3d_1" gsl_sf_legendre_H3d_1 :: Double -> Double -> Double
264
265-- | wrapper for int gsl_sf_legendre_H3d_e(int l,double lambda,double eta,gsl_sf_result* result);
266legendre_H3d_e :: Int -> Double -> Double -> (Double,Double)
267legendre_H3d_e l lambda eta = createSFR "legendre_H3d_e" $ gsl_sf_legendre_H3d_e l lambda eta
268foreign import ccall "legendre.h gsl_sf_legendre_H3d_e" gsl_sf_legendre_H3d_e :: Int -> Double -> Double -> Ptr Double -> IO(Int)
269
270-- | wrapper for double gsl_sf_legendre_H3d(int l,double lambda,double eta);
271legendre_H3d :: Int -> Double -> Double -> Double
272legendre_H3d = gsl_sf_legendre_H3d
273foreign import ccall "legendre.h gsl_sf_legendre_H3d" gsl_sf_legendre_H3d :: Int -> Double -> Double -> Double
274
275-- | wrapper for int gsl_sf_legendre_H3d_array(int lmax,double lambda,double eta,double* result_array);
276legendre_H3d_array :: Int -> Double -> Double -> Ptr Double -> Int
277legendre_H3d_array = gsl_sf_legendre_H3d_array
278foreign import ccall "legendre.h gsl_sf_legendre_H3d_array" gsl_sf_legendre_H3d_array :: Int -> Double -> Double -> Ptr Double -> Int
diff --git a/lib/Numeric/GSL/Special/Log.hs b/lib/Numeric/GSL/Special/Log.hs
new file mode 100644
index 0000000..e9c345b
--- /dev/null
+++ b/lib/Numeric/GSL/Special/Log.hs
@@ -0,0 +1,74 @@
1------------------------------------------------------------
2{- |
3Module : Numeric.GSL.Special.Log
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/Logarithm-and-Related-Functions.html>
13
14-}
15------------------------------------------------------------
16
17module Numeric.GSL.Special.Log(
18 log_e
19, Numeric.GSL.Special.Log.log
20, log_abs_e
21, log_abs
22, log_1plusx_e
23, log_1plusx
24, log_1plusx_mx_e
25, log_1plusx_mx
26) where
27
28import Foreign(Ptr)
29import Numeric.GSL.Special.Internal
30
31-- | wrapper for int gsl_sf_log_e(double x,gsl_sf_result* result);
32log_e :: Double -> (Double,Double)
33log_e x = createSFR "log_e" $ gsl_sf_log_e x
34foreign import ccall "log.h gsl_sf_log_e" gsl_sf_log_e :: Double -> Ptr Double -> IO(Int)
35
36-- | wrapper for double gsl_sf_log(double x);
37log :: Double -> Double
38log = gsl_sf_log
39foreign import ccall "log.h gsl_sf_log" gsl_sf_log :: Double -> Double
40
41-- | wrapper for int gsl_sf_log_abs_e(double x,gsl_sf_result* result);
42log_abs_e :: Double -> (Double,Double)
43log_abs_e x = createSFR "log_abs_e" $ gsl_sf_log_abs_e x
44foreign import ccall "log.h gsl_sf_log_abs_e" gsl_sf_log_abs_e :: Double -> Ptr Double -> IO(Int)
45
46-- | wrapper for double gsl_sf_log_abs(double x);
47log_abs :: Double -> Double
48log_abs = gsl_sf_log_abs
49foreign import ccall "log.h gsl_sf_log_abs" gsl_sf_log_abs :: Double -> Double
50
51-- | wrapper for int gsl_sf_complex_log_e(double zr,double zi,gsl_sf_result* lnr,gsl_sf_result* theta);
52complex_log_e :: Double -> Double -> Ptr Double -> (Double,Double)
53complex_log_e zr zi lnr = createSFR "complex_log_e" $ gsl_sf_complex_log_e zr zi lnr
54foreign import ccall "log.h gsl_sf_complex_log_e" gsl_sf_complex_log_e :: Double -> Double -> Ptr Double -> Ptr Double -> IO(Int)
55
56-- | wrapper for int gsl_sf_log_1plusx_e(double x,gsl_sf_result* result);
57log_1plusx_e :: Double -> (Double,Double)
58log_1plusx_e x = createSFR "log_1plusx_e" $ gsl_sf_log_1plusx_e x
59foreign import ccall "log.h gsl_sf_log_1plusx_e" gsl_sf_log_1plusx_e :: Double -> Ptr Double -> IO(Int)
60
61-- | wrapper for double gsl_sf_log_1plusx(double x);
62log_1plusx :: Double -> Double
63log_1plusx = gsl_sf_log_1plusx
64foreign import ccall "log.h gsl_sf_log_1plusx" gsl_sf_log_1plusx :: Double -> Double
65
66-- | wrapper for int gsl_sf_log_1plusx_mx_e(double x,gsl_sf_result* result);
67log_1plusx_mx_e :: Double -> (Double,Double)
68log_1plusx_mx_e x = createSFR "log_1plusx_mx_e" $ gsl_sf_log_1plusx_mx_e x
69foreign import ccall "log.h gsl_sf_log_1plusx_mx_e" gsl_sf_log_1plusx_mx_e :: Double -> Ptr Double -> IO(Int)
70
71-- | wrapper for double gsl_sf_log_1plusx_mx(double x);
72log_1plusx_mx :: Double -> Double
73log_1plusx_mx = gsl_sf_log_1plusx_mx
74foreign import ccall "log.h gsl_sf_log_1plusx_mx" gsl_sf_log_1plusx_mx :: Double -> Double
diff --git a/lib/Numeric/GSL/Special/Pow_int.hs b/lib/Numeric/GSL/Special/Pow_int.hs
new file mode 100644
index 0000000..384dfc4
--- /dev/null
+++ b/lib/Numeric/GSL/Special/Pow_int.hs
@@ -0,0 +1,37 @@
1------------------------------------------------------------
2{- |
3Module : Numeric.GSL.Special.Pow_int
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.google.com/search?q=gsl_sf_pow_int.h&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
13
14-}
15------------------------------------------------------------
16
17module Numeric.GSL.Special.Pow_int(
18 pow_int_e
19, pow_int
20) where
21
22import Foreign(Ptr)
23import Numeric.GSL.Special.Internal
24
25-- | wrapper for int gsl_sf_pow_int_e(double x,int n,gsl_sf_result* result);
26--
27-- <http://www.google.com/search?q=gsl_sf_pow_int_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
28pow_int_e :: Double -> Int -> (Double,Double)
29pow_int_e x n = createSFR "pow_int_e" $ gsl_sf_pow_int_e x n
30foreign import ccall "pow_int.h gsl_sf_pow_int_e" gsl_sf_pow_int_e :: Double -> Int -> Ptr Double -> IO(Int)
31
32-- | wrapper for double gsl_sf_pow_int(double x,int n);
33--
34-- <http://www.google.com/search?q=gsl_sf_pow_int&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
35pow_int :: Double -> Int -> Double
36pow_int = gsl_sf_pow_int
37foreign import ccall "pow_int.h gsl_sf_pow_int" gsl_sf_pow_int :: Double -> Int -> Double
diff --git a/lib/Numeric/GSL/Special/Psi.hs b/lib/Numeric/GSL/Special/Psi.hs
new file mode 100644
index 0000000..c0021e4
--- /dev/null
+++ b/lib/Numeric/GSL/Special/Psi.hs
@@ -0,0 +1,117 @@
1------------------------------------------------------------
2{- |
3Module : Numeric.GSL.Special.Psi
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.google.com/search?q=gsl_sf_psi.h&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
13
14-}
15------------------------------------------------------------
16
17module Numeric.GSL.Special.Psi(
18 psi_int_e
19, psi_int
20, psi_e
21, psi
22, psi_1piy_e
23, psi_1piy
24, psi_1_int_e
25, psi_1_int
26, psi_1_e
27, psi_1
28, psi_n_e
29, psi_n
30) where
31
32import Foreign(Ptr)
33import Numeric.GSL.Special.Internal
34
35-- | wrapper for int gsl_sf_psi_int_e(int n,gsl_sf_result* result);
36--
37-- <http://www.google.com/search?q=gsl_sf_psi_int_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
38psi_int_e :: Int -> (Double,Double)
39psi_int_e n = createSFR "psi_int_e" $ gsl_sf_psi_int_e n
40foreign import ccall "psi.h gsl_sf_psi_int_e" gsl_sf_psi_int_e :: Int -> Ptr Double -> IO(Int)
41
42-- | wrapper for double gsl_sf_psi_int(int n);
43--
44-- <http://www.google.com/search?q=gsl_sf_psi_int&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
45psi_int :: Int -> Double
46psi_int = gsl_sf_psi_int
47foreign import ccall "psi.h gsl_sf_psi_int" gsl_sf_psi_int :: Int -> Double
48
49-- | wrapper for int gsl_sf_psi_e(double x,gsl_sf_result* result);
50--
51-- <http://www.google.com/search?q=gsl_sf_psi_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
52psi_e :: Double -> (Double,Double)
53psi_e x = createSFR "psi_e" $ gsl_sf_psi_e x
54foreign import ccall "psi.h gsl_sf_psi_e" gsl_sf_psi_e :: Double -> Ptr Double -> IO(Int)
55
56-- | wrapper for double gsl_sf_psi(double x);
57--
58-- <http://www.google.com/search?q=gsl_sf_psi&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
59psi :: Double -> Double
60psi = gsl_sf_psi
61foreign import ccall "psi.h gsl_sf_psi" gsl_sf_psi :: Double -> Double
62
63-- | wrapper for int gsl_sf_psi_1piy_e(double y,gsl_sf_result* result);
64--
65-- <http://www.google.com/search?q=gsl_sf_psi_1piy_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
66psi_1piy_e :: Double -> (Double,Double)
67psi_1piy_e y = createSFR "psi_1piy_e" $ gsl_sf_psi_1piy_e y
68foreign import ccall "psi.h gsl_sf_psi_1piy_e" gsl_sf_psi_1piy_e :: Double -> Ptr Double -> IO(Int)
69
70-- | wrapper for double gsl_sf_psi_1piy(double y);
71--
72-- <http://www.google.com/search?q=gsl_sf_psi_1piy&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
73psi_1piy :: Double -> Double
74psi_1piy = gsl_sf_psi_1piy
75foreign import ccall "psi.h gsl_sf_psi_1piy" gsl_sf_psi_1piy :: Double -> Double
76
77-- | wrapper for int gsl_sf_psi_1_int_e(int n,gsl_sf_result* result);
78--
79-- <http://www.google.com/search?q=gsl_sf_psi_1_int_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
80psi_1_int_e :: Int -> (Double,Double)
81psi_1_int_e n = createSFR "psi_1_int_e" $ gsl_sf_psi_1_int_e n
82foreign import ccall "psi.h gsl_sf_psi_1_int_e" gsl_sf_psi_1_int_e :: Int -> Ptr Double -> IO(Int)
83
84-- | wrapper for double gsl_sf_psi_1_int(int n);
85--
86-- <http://www.google.com/search?q=gsl_sf_psi_1_int&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
87psi_1_int :: Int -> Double
88psi_1_int = gsl_sf_psi_1_int
89foreign import ccall "psi.h gsl_sf_psi_1_int" gsl_sf_psi_1_int :: Int -> Double
90
91-- | wrapper for int gsl_sf_psi_1_e(double x,gsl_sf_result* result);
92--
93-- <http://www.google.com/search?q=gsl_sf_psi_1_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
94psi_1_e :: Double -> (Double,Double)
95psi_1_e x = createSFR "psi_1_e" $ gsl_sf_psi_1_e x
96foreign import ccall "psi.h gsl_sf_psi_1_e" gsl_sf_psi_1_e :: Double -> Ptr Double -> IO(Int)
97
98-- | wrapper for double gsl_sf_psi_1(double x);
99--
100-- <http://www.google.com/search?q=gsl_sf_psi_1&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
101psi_1 :: Double -> Double
102psi_1 = gsl_sf_psi_1
103foreign import ccall "psi.h gsl_sf_psi_1" gsl_sf_psi_1 :: Double -> Double
104
105-- | wrapper for int gsl_sf_psi_n_e(int n,double x,gsl_sf_result* result);
106--
107-- <http://www.google.com/search?q=gsl_sf_psi_n_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
108psi_n_e :: Int -> Double -> (Double,Double)
109psi_n_e n x = createSFR "psi_n_e" $ gsl_sf_psi_n_e n x
110foreign import ccall "psi.h gsl_sf_psi_n_e" gsl_sf_psi_n_e :: Int -> Double -> Ptr Double -> IO(Int)
111
112-- | wrapper for double gsl_sf_psi_n(int n,double x);
113--
114-- <http://www.google.com/search?q=gsl_sf_psi_n&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
115psi_n :: Int -> Double -> Double
116psi_n = gsl_sf_psi_n
117foreign import ccall "psi.h gsl_sf_psi_n" gsl_sf_psi_n :: Int -> Double -> Double
diff --git a/lib/Numeric/GSL/Special/Synchrotron.hs b/lib/Numeric/GSL/Special/Synchrotron.hs
new file mode 100644
index 0000000..14881fe
--- /dev/null
+++ b/lib/Numeric/GSL/Special/Synchrotron.hs
@@ -0,0 +1,53 @@
1------------------------------------------------------------
2{- |
3Module : Numeric.GSL.Special.Synchrotron
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.google.com/search?q=gsl_sf_synchrotron.h&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
13
14-}
15------------------------------------------------------------
16
17module Numeric.GSL.Special.Synchrotron(
18 synchrotron_1_e
19, synchrotron_1
20, synchrotron_2_e
21, synchrotron_2
22) where
23
24import Foreign(Ptr)
25import Numeric.GSL.Special.Internal
26
27-- | wrapper for int gsl_sf_synchrotron_1_e(double x,gsl_sf_result* result);
28--
29-- <http://www.google.com/search?q=gsl_sf_synchrotron_1_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
30synchrotron_1_e :: Double -> (Double,Double)
31synchrotron_1_e x = createSFR "synchrotron_1_e" $ gsl_sf_synchrotron_1_e x
32foreign import ccall "synchrotron.h gsl_sf_synchrotron_1_e" gsl_sf_synchrotron_1_e :: Double -> Ptr Double -> IO(Int)
33
34-- | wrapper for double gsl_sf_synchrotron_1(double x);
35--
36-- <http://www.google.com/search?q=gsl_sf_synchrotron_1&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
37synchrotron_1 :: Double -> Double
38synchrotron_1 = gsl_sf_synchrotron_1
39foreign import ccall "synchrotron.h gsl_sf_synchrotron_1" gsl_sf_synchrotron_1 :: Double -> Double
40
41-- | wrapper for int gsl_sf_synchrotron_2_e(double x,gsl_sf_result* result);
42--
43-- <http://www.google.com/search?q=gsl_sf_synchrotron_2_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
44synchrotron_2_e :: Double -> (Double,Double)
45synchrotron_2_e x = createSFR "synchrotron_2_e" $ gsl_sf_synchrotron_2_e x
46foreign import ccall "synchrotron.h gsl_sf_synchrotron_2_e" gsl_sf_synchrotron_2_e :: Double -> Ptr Double -> IO(Int)
47
48-- | wrapper for double gsl_sf_synchrotron_2(double x);
49--
50-- <http://www.google.com/search?q=gsl_sf_synchrotron_2&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
51synchrotron_2 :: Double -> Double
52synchrotron_2 = gsl_sf_synchrotron_2
53foreign import ccall "synchrotron.h gsl_sf_synchrotron_2" gsl_sf_synchrotron_2 :: Double -> Double
diff --git a/lib/Numeric/GSL/Special/Trig.hs b/lib/Numeric/GSL/Special/Trig.hs
new file mode 100644
index 0000000..b846c1d
--- /dev/null
+++ b/lib/Numeric/GSL/Special/Trig.hs
@@ -0,0 +1,164 @@
1------------------------------------------------------------
2{- |
3Module : Numeric.GSL.Special.Trig
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/Trigonometric-Functions.html>
13
14-}
15------------------------------------------------------------
16
17module Numeric.GSL.Special.Trig(
18 sin_e
19, Numeric.GSL.Special.Trig.sin
20, cos_e
21, Numeric.GSL.Special.Trig.cos
22, hypot_e
23, hypot
24, sinc_e
25, sinc
26, lnsinh_e
27, lnsinh
28, lncosh_e
29, lncosh
30, sin_err_e
31, cos_err_e
32, angle_restrict_symm
33, angle_restrict_pos
34, angle_restrict_symm_err_e
35, angle_restrict_pos_err_e
36) where
37
38import Foreign(Ptr)
39import Numeric.GSL.Special.Internal
40
41-- | wrapper for int gsl_sf_sin_e(double x,gsl_sf_result* result);
42sin_e :: Double -> (Double,Double)
43sin_e x = createSFR "sin_e" $ gsl_sf_sin_e x
44foreign import ccall "trig.h gsl_sf_sin_e" gsl_sf_sin_e :: Double -> Ptr Double -> IO(Int)
45
46-- | wrapper for double gsl_sf_sin(double x);
47sin :: Double -> Double
48sin = gsl_sf_sin
49foreign import ccall "trig.h gsl_sf_sin" gsl_sf_sin :: Double -> Double
50
51-- | wrapper for int gsl_sf_cos_e(double x,gsl_sf_result* result);
52cos_e :: Double -> (Double,Double)
53cos_e x = createSFR "cos_e" $ gsl_sf_cos_e x
54foreign import ccall "trig.h gsl_sf_cos_e" gsl_sf_cos_e :: Double -> Ptr Double -> IO(Int)
55
56-- | wrapper for double gsl_sf_cos(double x);
57cos :: Double -> Double
58cos = gsl_sf_cos
59foreign import ccall "trig.h gsl_sf_cos" gsl_sf_cos :: Double -> Double
60
61-- | wrapper for int gsl_sf_hypot_e(double x,double y,gsl_sf_result* result);
62hypot_e :: Double -> Double -> (Double,Double)
63hypot_e x y = createSFR "hypot_e" $ gsl_sf_hypot_e x y
64foreign import ccall "trig.h gsl_sf_hypot_e" gsl_sf_hypot_e :: Double -> Double -> Ptr Double -> IO(Int)
65
66-- | wrapper for double gsl_sf_hypot(double x,double y);
67hypot :: Double -> Double -> Double
68hypot = gsl_sf_hypot
69foreign import ccall "trig.h gsl_sf_hypot" gsl_sf_hypot :: Double -> Double -> Double
70
71-- | wrapper for int gsl_sf_complex_sin_e(double zr,double zi,gsl_sf_result* szr,gsl_sf_result* szi);
72complex_sin_e :: Double -> Double -> Ptr Double -> (Double,Double)
73complex_sin_e zr zi szr = createSFR "complex_sin_e" $ gsl_sf_complex_sin_e zr zi szr
74foreign import ccall "trig.h gsl_sf_complex_sin_e" gsl_sf_complex_sin_e :: Double -> Double -> Ptr Double -> Ptr Double -> IO(Int)
75
76-- | wrapper for int gsl_sf_complex_cos_e(double zr,double zi,gsl_sf_result* czr,gsl_sf_result* czi);
77complex_cos_e :: Double -> Double -> Ptr Double -> (Double,Double)
78complex_cos_e zr zi czr = createSFR "complex_cos_e" $ gsl_sf_complex_cos_e zr zi czr
79foreign import ccall "trig.h gsl_sf_complex_cos_e" gsl_sf_complex_cos_e :: Double -> Double -> Ptr Double -> Ptr Double -> IO(Int)
80
81-- | wrapper for int gsl_sf_complex_logsin_e(double zr,double zi,gsl_sf_result* lszr,gsl_sf_result* lszi);
82complex_logsin_e :: Double -> Double -> Ptr Double -> (Double,Double)
83complex_logsin_e zr zi lszr = createSFR "complex_logsin_e" $ gsl_sf_complex_logsin_e zr zi lszr
84foreign import ccall "trig.h gsl_sf_complex_logsin_e" gsl_sf_complex_logsin_e :: Double -> Double -> Ptr Double -> Ptr Double -> IO(Int)
85
86-- | wrapper for int gsl_sf_sinc_e(double x,gsl_sf_result* result);
87sinc_e :: Double -> (Double,Double)
88sinc_e x = createSFR "sinc_e" $ gsl_sf_sinc_e x
89foreign import ccall "trig.h gsl_sf_sinc_e" gsl_sf_sinc_e :: Double -> Ptr Double -> IO(Int)
90
91-- | wrapper for double gsl_sf_sinc(double x);
92sinc :: Double -> Double
93sinc = gsl_sf_sinc
94foreign import ccall "trig.h gsl_sf_sinc" gsl_sf_sinc :: Double -> Double
95
96-- | wrapper for int gsl_sf_lnsinh_e(double x,gsl_sf_result* result);
97lnsinh_e :: Double -> (Double,Double)
98lnsinh_e x = createSFR "lnsinh_e" $ gsl_sf_lnsinh_e x
99foreign import ccall "trig.h gsl_sf_lnsinh_e" gsl_sf_lnsinh_e :: Double -> Ptr Double -> IO(Int)
100
101-- | wrapper for double gsl_sf_lnsinh(double x);
102lnsinh :: Double -> Double
103lnsinh = gsl_sf_lnsinh
104foreign import ccall "trig.h gsl_sf_lnsinh" gsl_sf_lnsinh :: Double -> Double
105
106-- | wrapper for int gsl_sf_lncosh_e(double x,gsl_sf_result* result);
107lncosh_e :: Double -> (Double,Double)
108lncosh_e x = createSFR "lncosh_e" $ gsl_sf_lncosh_e x
109foreign import ccall "trig.h gsl_sf_lncosh_e" gsl_sf_lncosh_e :: Double -> Ptr Double -> IO(Int)
110
111-- | wrapper for double gsl_sf_lncosh(double x);
112lncosh :: Double -> Double
113lncosh = gsl_sf_lncosh
114foreign import ccall "trig.h gsl_sf_lncosh" gsl_sf_lncosh :: Double -> Double
115
116-- | wrapper for int gsl_sf_polar_to_rect(double r,double theta,gsl_sf_result* x,gsl_sf_result* y);
117polar_to_rect :: Double -> Double -> Ptr Double -> (Double,Double)
118polar_to_rect r theta x = createSFR "polar_to_rect" $ gsl_sf_polar_to_rect r theta x
119foreign import ccall "trig.h gsl_sf_polar_to_rect" gsl_sf_polar_to_rect :: Double -> Double -> Ptr Double -> Ptr Double -> IO(Int)
120
121-- | wrapper for int gsl_sf_rect_to_polar(double x,double y,gsl_sf_result* r,gsl_sf_result* theta);
122rect_to_polar :: Double -> Double -> Ptr Double -> (Double,Double)
123rect_to_polar x y r = createSFR "rect_to_polar" $ gsl_sf_rect_to_polar x y r
124foreign import ccall "trig.h gsl_sf_rect_to_polar" gsl_sf_rect_to_polar :: Double -> Double -> Ptr Double -> Ptr Double -> IO(Int)
125
126-- | wrapper for int gsl_sf_sin_err_e(double x,double dx,gsl_sf_result* result);
127sin_err_e :: Double -> Double -> (Double,Double)
128sin_err_e x dx = createSFR "sin_err_e" $ gsl_sf_sin_err_e x dx
129foreign import ccall "trig.h gsl_sf_sin_err_e" gsl_sf_sin_err_e :: Double -> Double -> Ptr Double -> IO(Int)
130
131-- | wrapper for int gsl_sf_cos_err_e(double x,double dx,gsl_sf_result* result);
132cos_err_e :: Double -> Double -> (Double,Double)
133cos_err_e x dx = createSFR "cos_err_e" $ gsl_sf_cos_err_e x dx
134foreign import ccall "trig.h gsl_sf_cos_err_e" gsl_sf_cos_err_e :: Double -> Double -> Ptr Double -> IO(Int)
135
136-- | wrapper for int gsl_sf_angle_restrict_symm_e(double* theta);
137angle_restrict_symm_e :: Ptr Double -> Int
138angle_restrict_symm_e = gsl_sf_angle_restrict_symm_e
139foreign import ccall "trig.h gsl_sf_angle_restrict_symm_e" gsl_sf_angle_restrict_symm_e :: Ptr Double -> Int
140
141-- | wrapper for double gsl_sf_angle_restrict_symm(double theta);
142angle_restrict_symm :: Double -> Double
143angle_restrict_symm = gsl_sf_angle_restrict_symm
144foreign import ccall "trig.h gsl_sf_angle_restrict_symm" gsl_sf_angle_restrict_symm :: Double -> Double
145
146-- | wrapper for int gsl_sf_angle_restrict_pos_e(double* theta);
147angle_restrict_pos_e :: Ptr Double -> Int
148angle_restrict_pos_e = gsl_sf_angle_restrict_pos_e
149foreign import ccall "trig.h gsl_sf_angle_restrict_pos_e" gsl_sf_angle_restrict_pos_e :: Ptr Double -> Int
150
151-- | wrapper for double gsl_sf_angle_restrict_pos(double theta);
152angle_restrict_pos :: Double -> Double
153angle_restrict_pos = gsl_sf_angle_restrict_pos
154foreign import ccall "trig.h gsl_sf_angle_restrict_pos" gsl_sf_angle_restrict_pos :: Double -> Double
155
156-- | wrapper for int gsl_sf_angle_restrict_symm_err_e(double theta,gsl_sf_result* result);
157angle_restrict_symm_err_e :: Double -> (Double,Double)
158angle_restrict_symm_err_e theta = createSFR "angle_restrict_symm_err_e" $ gsl_sf_angle_restrict_symm_err_e theta
159foreign import ccall "trig.h gsl_sf_angle_restrict_symm_err_e" gsl_sf_angle_restrict_symm_err_e :: Double -> Ptr Double -> IO(Int)
160
161-- | wrapper for int gsl_sf_angle_restrict_pos_err_e(double theta,gsl_sf_result* result);
162angle_restrict_pos_err_e :: Double -> (Double,Double)
163angle_restrict_pos_err_e theta = createSFR "angle_restrict_pos_err_e" $ gsl_sf_angle_restrict_pos_err_e theta
164foreign import ccall "trig.h gsl_sf_angle_restrict_pos_err_e" gsl_sf_angle_restrict_pos_err_e :: Double -> Ptr Double -> IO(Int)
diff --git a/lib/Numeric/GSL/Special/Zeta.hs b/lib/Numeric/GSL/Special/Zeta.hs
new file mode 100644
index 0000000..48c8ff1
--- /dev/null
+++ b/lib/Numeric/GSL/Special/Zeta.hs
@@ -0,0 +1,133 @@
1------------------------------------------------------------
2{- |
3Module : Numeric.GSL.Special.Zeta
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.google.com/search?q=gsl_sf_zeta.h&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
13
14-}
15------------------------------------------------------------
16
17module Numeric.GSL.Special.Zeta(
18 zeta_int_e
19, zeta_int
20, zeta_e
21, zeta
22, zetam1_e
23, zetam1
24, zetam1_int_e
25, zetam1_int
26, hzeta_e
27, hzeta
28, eta_int_e
29, eta_int
30, eta_e
31, eta
32) where
33
34import Foreign(Ptr)
35import Numeric.GSL.Special.Internal
36
37-- | wrapper for int gsl_sf_zeta_int_e(int n,gsl_sf_result* result);
38--
39-- <http://www.google.com/search?q=gsl_sf_zeta_int_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
40zeta_int_e :: Int -> (Double,Double)
41zeta_int_e n = createSFR "zeta_int_e" $ gsl_sf_zeta_int_e n
42foreign import ccall "zeta.h gsl_sf_zeta_int_e" gsl_sf_zeta_int_e :: Int -> Ptr Double -> IO(Int)
43
44-- | wrapper for double gsl_sf_zeta_int(int n);
45--
46-- <http://www.google.com/search?q=gsl_sf_zeta_int&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
47zeta_int :: Int -> Double
48zeta_int = gsl_sf_zeta_int
49foreign import ccall "zeta.h gsl_sf_zeta_int" gsl_sf_zeta_int :: Int -> Double
50
51-- | wrapper for int gsl_sf_zeta_e(double s,gsl_sf_result* result);
52--
53-- <http://www.google.com/search?q=gsl_sf_zeta_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
54zeta_e :: Double -> (Double,Double)
55zeta_e s = createSFR "zeta_e" $ gsl_sf_zeta_e s
56foreign import ccall "zeta.h gsl_sf_zeta_e" gsl_sf_zeta_e :: Double -> Ptr Double -> IO(Int)
57
58-- | wrapper for double gsl_sf_zeta(double s);
59--
60-- <http://www.google.com/search?q=gsl_sf_zeta&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
61zeta :: Double -> Double
62zeta = gsl_sf_zeta
63foreign import ccall "zeta.h gsl_sf_zeta" gsl_sf_zeta :: Double -> Double
64
65-- | wrapper for int gsl_sf_zetam1_e(double s,gsl_sf_result* result);
66--
67-- <http://www.google.com/search?q=gsl_sf_zetam1_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
68zetam1_e :: Double -> (Double,Double)
69zetam1_e s = createSFR "zetam1_e" $ gsl_sf_zetam1_e s
70foreign import ccall "zeta.h gsl_sf_zetam1_e" gsl_sf_zetam1_e :: Double -> Ptr Double -> IO(Int)
71
72-- | wrapper for double gsl_sf_zetam1(double s);
73--
74-- <http://www.google.com/search?q=gsl_sf_zetam1&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
75zetam1 :: Double -> Double
76zetam1 = gsl_sf_zetam1
77foreign import ccall "zeta.h gsl_sf_zetam1" gsl_sf_zetam1 :: Double -> Double
78
79-- | wrapper for int gsl_sf_zetam1_int_e(int s,gsl_sf_result* result);
80--
81-- <http://www.google.com/search?q=gsl_sf_zetam1_int_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
82zetam1_int_e :: Int -> (Double,Double)
83zetam1_int_e s = createSFR "zetam1_int_e" $ gsl_sf_zetam1_int_e s
84foreign import ccall "zeta.h gsl_sf_zetam1_int_e" gsl_sf_zetam1_int_e :: Int -> Ptr Double -> IO(Int)
85
86-- | wrapper for double gsl_sf_zetam1_int(int s);
87--
88-- <http://www.google.com/search?q=gsl_sf_zetam1_int&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
89zetam1_int :: Int -> Double
90zetam1_int = gsl_sf_zetam1_int
91foreign import ccall "zeta.h gsl_sf_zetam1_int" gsl_sf_zetam1_int :: Int -> Double
92
93-- | wrapper for int gsl_sf_hzeta_e(double s,double q,gsl_sf_result* result);
94--
95-- <http://www.google.com/search?q=gsl_sf_hzeta_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
96hzeta_e :: Double -> Double -> (Double,Double)
97hzeta_e s q = createSFR "hzeta_e" $ gsl_sf_hzeta_e s q
98foreign import ccall "zeta.h gsl_sf_hzeta_e" gsl_sf_hzeta_e :: Double -> Double -> Ptr Double -> IO(Int)
99
100-- | wrapper for double gsl_sf_hzeta(double s,double q);
101--
102-- <http://www.google.com/search?q=gsl_sf_hzeta&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
103hzeta :: Double -> Double -> Double
104hzeta = gsl_sf_hzeta
105foreign import ccall "zeta.h gsl_sf_hzeta" gsl_sf_hzeta :: Double -> Double -> Double
106
107-- | wrapper for int gsl_sf_eta_int_e(int n,gsl_sf_result* result);
108--
109-- <http://www.google.com/search?q=gsl_sf_eta_int_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
110eta_int_e :: Int -> (Double,Double)
111eta_int_e n = createSFR "eta_int_e" $ gsl_sf_eta_int_e n
112foreign import ccall "zeta.h gsl_sf_eta_int_e" gsl_sf_eta_int_e :: Int -> Ptr Double -> IO(Int)
113
114-- | wrapper for double gsl_sf_eta_int(int n);
115--
116-- <http://www.google.com/search?q=gsl_sf_eta_int&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
117eta_int :: Int -> Double
118eta_int = gsl_sf_eta_int
119foreign import ccall "zeta.h gsl_sf_eta_int" gsl_sf_eta_int :: Int -> Double
120
121-- | wrapper for int gsl_sf_eta_e(double s,gsl_sf_result* result);
122--
123-- <http://www.google.com/search?q=gsl_sf_eta_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
124eta_e :: Double -> (Double,Double)
125eta_e s = createSFR "eta_e" $ gsl_sf_eta_e s
126foreign import ccall "zeta.h gsl_sf_eta_e" gsl_sf_eta_e :: Double -> Ptr Double -> IO(Int)
127
128-- | wrapper for double gsl_sf_eta(double s);
129--
130-- <http://www.google.com/search?q=gsl_sf_eta&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
131eta :: Double -> Double
132eta = gsl_sf_eta
133foreign import ccall "zeta.h gsl_sf_eta" gsl_sf_eta :: Double -> Double
diff --git a/lib/Numeric/GSL/Special/airy.h b/lib/Numeric/GSL/Special/airy.h
new file mode 100644
index 0000000..e34e012
--- /dev/null
+++ b/lib/Numeric/GSL/Special/airy.h
@@ -0,0 +1,24 @@
1int gsl_sf_airy_Ai_e(double x,int mode,double* result);
2double gsl_sf_airy_Ai(double x,int mode);
3int gsl_sf_airy_Bi_e(double x,int mode,double* result);
4double gsl_sf_airy_Bi(double x,int mode);
5int gsl_sf_airy_Ai_scaled_e(double x,int mode,double* result);
6double gsl_sf_airy_Ai_scaled(double x,int mode);
7int gsl_sf_airy_Bi_scaled_e(double x,int mode,double* result);
8double gsl_sf_airy_Bi_scaled(double x,int mode);
9int gsl_sf_airy_Ai_deriv_e(double x,int mode,double* result);
10double gsl_sf_airy_Ai_deriv(double x,int mode);
11int gsl_sf_airy_Bi_deriv_e(double x,int mode,double* result);
12double gsl_sf_airy_Bi_deriv(double x,int mode);
13int gsl_sf_airy_Ai_deriv_scaled_e(double x,int mode,double* result);
14double gsl_sf_airy_Ai_deriv_scaled(double x,int mode);
15int gsl_sf_airy_Bi_deriv_scaled_e(double x,int mode,double* result);
16double gsl_sf_airy_Bi_deriv_scaled(double x,int mode);
17int gsl_sf_airy_zero_Ai_e(int s,double* result);
18double gsl_sf_airy_zero_Ai(int s);
19int gsl_sf_airy_zero_Bi_e(int s,double* result);
20double gsl_sf_airy_zero_Bi(int s);
21int gsl_sf_airy_zero_Ai_deriv_e(int s,double* result);
22double gsl_sf_airy_zero_Ai_deriv(int s);
23int gsl_sf_airy_zero_Bi_deriv_e(int s,double* result);
24double gsl_sf_airy_zero_Bi_deriv(int s);
diff --git a/lib/Numeric/GSL/Special/auto.hs b/lib/Numeric/GSL/Special/auto.hs
new file mode 100644
index 0000000..d2baff6
--- /dev/null
+++ b/lib/Numeric/GSL/Special/auto.hs
@@ -0,0 +1,233 @@
1-- automatic generation of wrappers for simple GSL special functions
2
3import Text.ParserCombinators.Parsec
4import System
5import Data.List(intersperse, isPrefixOf)
6import Data.Char(toUpper,isUpper,toLower)
7
8data Type = Normal Ident | Pointer Ident deriving (Eq, Show)
9
10type Ident = String
11
12data Header = Header Type Ident [(Type,Ident)] deriving Show
13
14headers f = case parse parseHeaders "" f of
15 Right l -> l
16 Left s -> error (show s)
17
18
19rep (c,r) [] = []
20rep (c,r) f@(x:xs)
21 | c `isPrefixOf` f = r ++ rep (c,r) (drop (length c) f)
22 | otherwise = x:(rep (c,r) xs)
23
24
25fixlong [] = []
26fixlong "\\" = []
27fixlong ('\\':'\n':xs) = xs
28fixlong (x:xs) = x : fixlong xs
29
30
31safe (Header _ _ args) = all ok args
32 || all ok (init args) && kn (last args)
33 where ok ((Normal s),_) | s `elem` ["double","float","int","gsl_mode_t"] = True
34 ok _ = False
35 kn ((Pointer "gsl_sf_result"),_) = True
36 kn ((Pointer "gsl_sf_result_e10"),_) = True
37 kn _ = False
38
39
40
41fixC s = rep ("gsl_mode_t","int") $ rep ("gsl_sf_result","double") $ rep ("gsl_sf_result_e10","double") $ s
42
43main = do
44 args <- getArgs
45 let name = args!!0
46 headerfile =
47 case args of
48 [n] -> "/usr/include/gsl/gsl_sf_"++n++".h"
49 [_,f] -> f
50 file <- readFile headerfile
51
52 putStrLn headerfile
53 --mapM_ print (headers $ fixlong file)
54 let parsed = (headers $ fixlong file)
55 writeFile (name ++".h") (fixC $ unlines $ map showC parsed)
56
57 --putStrLn ""
58 --mapM (\(Header _ n _) -> putStrLn (drop 7 n ++",")) parsed
59 --putStrLn ""
60 --mapM_ (putStrLn.showFull (name ++".h")) parsed
61 let exports = rep (")",") where") $ rep ("(\n","(\n ") $ rep (",\n",", ") $ unlines $ ["("]++intersperse "," (map (\(Header _ n _) -> hName n) (filter safe parsed))++[")"]
62 let defs = unlines $ map (showFull (name ++".h")) parsed
63 let imports = "\nimport Foreign(Ptr)\nimport Numeric.GSL.Special.Internal\n"
64 let mod = modhead name ++ "module Numeric.GSL.Special."++ upperFirst name++exports++imports++defs
65 writeFile (upperFirst name ++ ".hs") mod
66
67
68google name = "<http://www.google.com/search?q="
69 ++name
70 ++"&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>"
71
72modhead name = replicate 60 '-' ++ "\n"
73 ++"{- |\n"
74 ++"Module : Numeric.GSL.Special."++upperFirst name++"\n"
75 ++"Copyright : (c) Alberto Ruiz 2006\n"
76 ++"License : GPL-style\n"
77 ++"Maintainer : Alberto Ruiz (aruiz at um dot es)\n"
78 ++"Stability : provisional\n"
79 ++"Portability : uses ffi\n"
80 ++"\nWrappers for selected functions described at:\n\n"
81 ++ google ( "gsl_sf_"++name++".h")
82 ++"\n\n-}\n"
83 ++ replicate 60 '-' ++ "\n\n"
84
85upperFirst (x:xs) = toUpper x : xs
86
87comment = do
88 string "/*"
89 closecomment
90 spaces
91 return "comment"
92
93closecomment = try (string "*/")
94 <|> (do anyChar
95 closecomment)
96
97ident = do
98 spaces
99 id <- many1 (noneOf "()[]* \n\t,;")
100 spaces
101 return id
102
103comment' = between (char '(') (char ')') (many $ noneOf ")")
104
105
106define = do
107 string "#"
108 closedefine
109 spaces
110 return "define"
111
112closedefine = try (string "\n")
113 <|> (do anyChar
114 closedefine)
115
116marks = do
117 try (string "__BEGIN_DECLS" >> spaces >> return "begin")
118 <|>
119 try (string "__END_DECLS" >> spaces >> return "end")
120
121
122
123irrelevant =
124 try comment
125 <|>
126 try define
127 <|>
128 marks
129
130
131parseHeaders = many parseHeader
132
133parseHeader = do
134 spaces
135 many irrelevant
136 spaces
137 (res,name) <- typ
138 spaces
139 args <- between (char '(') (char ')') (sepBy typ (char ','))
140 spaces
141 char ';'
142 spaces
143 many irrelevant
144 return $ Header res name args
145
146typ = try t1 <|> t2
147
148symbol s = spaces >> string s >> spaces
149
150t1 = do
151 t <- try (symbol "const" >> symbol "unsigned" >> ident) -- aaagh
152 <|>
153 try (symbol "const" >> ident)
154 <|>
155 try (symbol "unsigned" >> ident)
156 <|> ident
157 n <- ident
158 return (Normal t,n)
159
160t2 = do
161 t <- ident
162 spaces
163 char '*'
164 spaces
165 n <- ident
166 return (Pointer t,n)
167
168pure (Header _ _ args) | fst (last args) == Pointer "gsl_sf_result" = False
169 | fst (last args) == Pointer "gsl_sf_result_e10" = False
170 | otherwise = True
171
172showC (Header t n args) = showCt t ++ " " ++ n ++ "(" ++ (concat $ intersperse "," $ map showCa args) ++ ");"
173
174showCt (Normal s) = s
175showCt (Pointer s) = s ++ "*"
176
177showCa (t, a) = showCt t ++" "++ a
178
179showH hc h@(Header t n args) = "foreign import ccall \""++hc++" "++n++"\" "++n++" :: "++ (concat$intersperse" -> "$map showHa args) ++" -> " ++ t'
180 where t' | pure h = showHt t
181 | otherwise = "IO("++showHt t++")"
182
183showHt (Normal (s:ss)) = toUpper s : ss
184showHt (Pointer "gsl_sf_result") = "Ptr Double"
185showHt (Pointer "gsl_sf_result_e10") = "Ptr ()"
186showHt (Pointer (s:ss)) = "Ptr "++toUpper s : ss
187
188showHa (t,a) = showHt t
189
190showFull hc h@(Header t n args) = "\n-- | wrapper for "++showC h
191 ++"\n--\n-- "++google n ++"\n"
192 ++ boiler h ++"\n"
193 ++showH hc h
194
195fixmd1 = rep ("Gsl_mode_t","Precision")
196fixmd2 = rep ("mode"," (precCode mode)")
197
198boiler h@(Header t n args) | fst (last args) == Pointer "gsl_sf_result" = boilerResult h
199 | fst (last args) == Pointer "gsl_sf_result_e10" = boilerResultE10 h
200 | any isMode args = boilerMode h
201 | otherwise = boilerBasic h
202
203isMode (Normal "gsl_mode_t",_) = True
204isMode _ = False
205
206hName n = f $ drop 7 n
207 where f (s:ss) = toLower s : ss
208
209
210boilerResult h@(Header t n args) =
211 hName n++" :: "++ (fixmd1 $ concat $ intersperse" -> "$ map showHa (init args)) ++" -> " ++ "(Double,Double)\n" ++
212 hName n ++ " "++ initArgs args ++
213 " = createSFR \""++ hName n ++"\" $ " ++ n ++ " "++ (fixmd2 $ initArgs args)
214
215boilerResultE10 h@(Header t n args) =
216 hName n++" :: "++ (fixmd1 $ concat $ intersperse" -> "$ map showHa (init args)) ++" -> " ++ "(Double,Int,Double)\n" ++
217 hName n ++ " "++ initArgs args ++
218 " = createSFR_E10 \""++ hName n ++"\" $ " ++ n ++ " "++ (fixmd2 $ initArgs args)
219
220boilerBasic h@(Header t n args) =
221 hName n++" :: "++ (fixmd1 $ concat $ intersperse" -> "$map showHa args) ++" -> " ++showHt t ++ "\n" ++
222 hName n ++ " = " ++fixmd2 n
223
224boilerMode h@(Header t n args) =
225 hName n++" :: "++ (fixmd1 $ concat $ intersperse" -> "$ map showHa args) ++" -> " ++ showHt t++"\n" ++
226 hName n ++ " "++ allArgs args ++
227 " = " ++ n ++ " "++ (fixmd2 $ allArgs args)
228
229cVar (v:vs) | isUpper v = toLower v : v : vs
230 | otherwise = v:vs
231
232allArgs args = unwords (map (cVar.snd) args)
233initArgs args = unwords (map (cVar.snd) (init args)) \ No newline at end of file
diff --git a/lib/Numeric/GSL/Special/autoall.sh b/lib/Numeric/GSL/Special/autoall.sh
new file mode 100644
index 0000000..cb45957
--- /dev/null
+++ b/lib/Numeric/GSL/Special/autoall.sh
@@ -0,0 +1,41 @@
1#!/bin/bash
2
3#Airy.hs
4# include Precision (..) in the export list
5#Exp.hs
6# remove extern inline definition, qualify name
7#Coupling
8# remove deprecated INCORRECT
9#Trig.hs
10# qualify names
11#Legendre.hs
12# remove extern inline
13#Log.hs
14# remove extern inline, qualify name
15
16#runhaskell auto airy
17runhaskell auto bessel
18runhaskell auto clausen
19runhaskell auto coulomb
20#runhaskell auto coupling
21runhaskell auto dawson
22runhaskell auto debye
23runhaskell auto dilog
24runhaskell auto elementary
25runhaskell auto ellint
26runhaskell auto erf
27#runhaskell auto exp
28runhaskell auto expint
29runhaskell auto fermi_dirac
30runhaskell auto gamma
31runhaskell auto gegenbauer
32runhaskell auto hyperg
33runhaskell auto laguerre
34runhaskell auto lambert
35#runhaskell auto legendre
36#runhaskell auto log
37runhaskell auto pow_int
38runhaskell auto psi
39runhaskell auto synchrotron
40#runhaskell auto trig
41runhaskell auto zeta \ No newline at end of file
diff --git a/lib/Numeric/GSL/Special/bessel.h b/lib/Numeric/GSL/Special/bessel.h
new file mode 100644
index 0000000..5a2445d
--- /dev/null
+++ b/lib/Numeric/GSL/Special/bessel.h
@@ -0,0 +1,100 @@
1int gsl_sf_bessel_J0_e(double x,double* result);
2double gsl_sf_bessel_J0(double x);
3int gsl_sf_bessel_J1_e(double x,double* result);
4double gsl_sf_bessel_J1(double x);
5int gsl_sf_bessel_Jn_e(int n,double x,double* result);
6double gsl_sf_bessel_Jn(int n,double x);
7int gsl_sf_bessel_Jn_array(int nmin,int nmax,double x,double* result_array);
8int gsl_sf_bessel_Y0_e(double x,double* result);
9double gsl_sf_bessel_Y0(double x);
10int gsl_sf_bessel_Y1_e(double x,double* result);
11double gsl_sf_bessel_Y1(double x);
12int gsl_sf_bessel_Yn_e(int n,double x,double* result);
13double gsl_sf_bessel_Yn(int n,double x);
14int gsl_sf_bessel_Yn_array(int nmin,int nmax,double x,double* result_array);
15int gsl_sf_bessel_I0_e(double x,double* result);
16double gsl_sf_bessel_I0(double x);
17int gsl_sf_bessel_I1_e(double x,double* result);
18double gsl_sf_bessel_I1(double x);
19int gsl_sf_bessel_In_e(int n,double x,double* result);
20double gsl_sf_bessel_In(int n,double x);
21int gsl_sf_bessel_In_array(int nmin,int nmax,double x,double* result_array);
22int gsl_sf_bessel_I0_scaled_e(double x,double* result);
23double gsl_sf_bessel_I0_scaled(double x);
24int gsl_sf_bessel_I1_scaled_e(double x,double* result);
25double gsl_sf_bessel_I1_scaled(double x);
26int gsl_sf_bessel_In_scaled_e(int n,double x,double* result);
27double gsl_sf_bessel_In_scaled(int n,double x);
28int gsl_sf_bessel_In_scaled_array(int nmin,int nmax,double x,double* result_array);
29int gsl_sf_bessel_K0_e(double x,double* result);
30double gsl_sf_bessel_K0(double x);
31int gsl_sf_bessel_K1_e(double x,double* result);
32double gsl_sf_bessel_K1(double x);
33int gsl_sf_bessel_Kn_e(int n,double x,double* result);
34double gsl_sf_bessel_Kn(int n,double x);
35int gsl_sf_bessel_Kn_array(int nmin,int nmax,double x,double* result_array);
36int gsl_sf_bessel_K0_scaled_e(double x,double* result);
37double gsl_sf_bessel_K0_scaled(double x);
38int gsl_sf_bessel_K1_scaled_e(double x,double* result);
39double gsl_sf_bessel_K1_scaled(double x);
40int gsl_sf_bessel_Kn_scaled_e(int n,double x,double* result);
41double gsl_sf_bessel_Kn_scaled(int n,double x);
42int gsl_sf_bessel_Kn_scaled_array(int nmin,int nmax,double x,double* result_array);
43int gsl_sf_bessel_j0_e(double x,double* result);
44double gsl_sf_bessel_j0(double x);
45int gsl_sf_bessel_j1_e(double x,double* result);
46double gsl_sf_bessel_j1(double x);
47int gsl_sf_bessel_j2_e(double x,double* result);
48double gsl_sf_bessel_j2(double x);
49int gsl_sf_bessel_jl_e(int l,double x,double* result);
50double gsl_sf_bessel_jl(int l,double x);
51int gsl_sf_bessel_jl_array(int lmax,double x,double* result_array);
52int gsl_sf_bessel_jl_steed_array(int lmax,double x,double* jl_x_array);
53int gsl_sf_bessel_y0_e(double x,double* result);
54double gsl_sf_bessel_y0(double x);
55int gsl_sf_bessel_y1_e(double x,double* result);
56double gsl_sf_bessel_y1(double x);
57int gsl_sf_bessel_y2_e(double x,double* result);
58double gsl_sf_bessel_y2(double x);
59int gsl_sf_bessel_yl_e(int l,double x,double* result);
60double gsl_sf_bessel_yl(int l,double x);
61int gsl_sf_bessel_yl_array(int lmax,double x,double* result_array);
62int gsl_sf_bessel_i0_scaled_e(double x,double* result);
63double gsl_sf_bessel_i0_scaled(double x);
64int gsl_sf_bessel_i1_scaled_e(double x,double* result);
65double gsl_sf_bessel_i1_scaled(double x);
66int gsl_sf_bessel_i2_scaled_e(double x,double* result);
67double gsl_sf_bessel_i2_scaled(double x);
68int gsl_sf_bessel_il_scaled_e(int l,double x,double* result);
69double gsl_sf_bessel_il_scaled(int l,double x);
70int gsl_sf_bessel_il_scaled_array(int lmax,double x,double* result_array);
71int gsl_sf_bessel_k0_scaled_e(double x,double* result);
72double gsl_sf_bessel_k0_scaled(double x);
73int gsl_sf_bessel_k1_scaled_e(double x,double* result);
74double gsl_sf_bessel_k1_scaled(double x);
75int gsl_sf_bessel_k2_scaled_e(double x,double* result);
76double gsl_sf_bessel_k2_scaled(double x);
77int gsl_sf_bessel_kl_scaled_e(int l,double x,double* result);
78double gsl_sf_bessel_kl_scaled(int l,double x);
79int gsl_sf_bessel_kl_scaled_array(int lmax,double x,double* result_array);
80int gsl_sf_bessel_Jnu_e(double nu,double x,double* result);
81double gsl_sf_bessel_Jnu(double nu,double x);
82int gsl_sf_bessel_Ynu_e(double nu,double x,double* result);
83double gsl_sf_bessel_Ynu(double nu,double x);
84int gsl_sf_bessel_sequence_Jnu_e(double nu,int mode,size_t size,double* v);
85int gsl_sf_bessel_Inu_scaled_e(double nu,double x,double* result);
86double gsl_sf_bessel_Inu_scaled(double nu,double x);
87int gsl_sf_bessel_Inu_e(double nu,double x,double* result);
88double gsl_sf_bessel_Inu(double nu,double x);
89int gsl_sf_bessel_Knu_scaled_e(double nu,double x,double* result);
90double gsl_sf_bessel_Knu_scaled(double nu,double x);
91int gsl_sf_bessel_Knu_e(double nu,double x,double* result);
92double gsl_sf_bessel_Knu(double nu,double x);
93int gsl_sf_bessel_lnKnu_e(double nu,double x,double* result);
94double gsl_sf_bessel_lnKnu(double nu,double x);
95int gsl_sf_bessel_zero_J0_e(int s,double* result);
96double gsl_sf_bessel_zero_J0(int s);
97int gsl_sf_bessel_zero_J1_e(int s,double* result);
98double gsl_sf_bessel_zero_J1(int s);
99int gsl_sf_bessel_zero_Jnu_e(double nu,int s,double* result);
100double gsl_sf_bessel_zero_Jnu(double nu,int s);
diff --git a/lib/Numeric/GSL/Special/clausen.h b/lib/Numeric/GSL/Special/clausen.h
new file mode 100644
index 0000000..9f0225b
--- /dev/null
+++ b/lib/Numeric/GSL/Special/clausen.h
@@ -0,0 +1,2 @@
1int gsl_sf_clausen_e(double x,double* result);
2double gsl_sf_clausen(double x);
diff --git a/lib/Numeric/GSL/Special/coulomb.h b/lib/Numeric/GSL/Special/coulomb.h
new file mode 100644
index 0000000..2551081
--- /dev/null
+++ b/lib/Numeric/GSL/Special/coulomb.h
@@ -0,0 +1,11 @@
1int gsl_sf_hydrogenicR_1_e(double Z,double r,double* result);
2double gsl_sf_hydrogenicR_1(double Z,double r);
3int gsl_sf_hydrogenicR_e(int n,int l,double Z,double r,double* result);
4double gsl_sf_hydrogenicR(int n,int l,double Z,double r);
5int gsl_sf_coulomb_wave_FG_e(double eta,double x,double lam_F,int k_lam_G,double* F,double* Fp,double* G,double* Gp,double* exp_F,double* exp_G);
6int gsl_sf_coulomb_wave_F_array(double lam_min,int kmax,double eta,double x,double* fc_array,double* F_exponent);
7int gsl_sf_coulomb_wave_FG_array(double lam_min,int kmax,double eta,double x,double* fc_array,double* gc_array,double* F_exponent,double* G_exponent);
8int gsl_sf_coulomb_wave_FGp_array(double lam_min,int kmax,double eta,double x,double* fc_array,double* fcp_array,double* gc_array,double* gcp_array,double* F_exponent,double* G_exponent);
9int gsl_sf_coulomb_wave_sphF_array(double lam_min,int kmax,double eta,double x,double* fc_array,double* F_exponent);
10int gsl_sf_coulomb_CL_e(double L,double eta,double* result);
11int gsl_sf_coulomb_CL_array(double Lmin,int kmax,double eta,double* cl);
diff --git a/lib/Numeric/GSL/Special/coupling.h b/lib/Numeric/GSL/Special/coupling.h
new file mode 100644
index 0000000..17de964
--- /dev/null
+++ b/lib/Numeric/GSL/Special/coupling.h
@@ -0,0 +1,10 @@
1int gsl_sf_coupling_3j_e(int two_ja,int two_jb,int two_jc,int two_ma,int two_mb,int two_mc,double* result);
2double gsl_sf_coupling_3j(int two_ja,int two_jb,int two_jc,int two_ma,int two_mb,int two_mc);
3int gsl_sf_coupling_6j_e(int two_ja,int two_jb,int two_jc,int two_jd,int two_je,int two_jf,double* result);
4double gsl_sf_coupling_6j(int two_ja,int two_jb,int two_jc,int two_jd,int two_je,int two_jf);
5int gsl_sf_coupling_RacahW_e(int two_ja,int two_jb,int two_jc,int two_jd,int two_je,int two_jf,double* result);
6double gsl_sf_coupling_RacahW(int two_ja,int two_jb,int two_jc,int two_jd,int two_je,int two_jf);
7int gsl_sf_coupling_9j_e(int two_ja,int two_jb,int two_jc,int two_jd,int two_je,int two_jf,int two_jg,int two_jh,int two_ji,double* result);
8double gsl_sf_coupling_9j(int two_ja,int two_jb,int two_jc,int two_jd,int two_je,int two_jf,int two_jg,int two_jh,int two_ji);
9int gsl_sf_coupling_6j_INCORRECT_e(int two_ja,int two_jb,int two_jc,int two_jd,int two_je,int two_jf,double* result);
10double gsl_sf_coupling_6j_INCORRECT(int two_ja,int two_jb,int two_jc,int two_jd,int two_je,int two_jf);
diff --git a/lib/Numeric/GSL/Special/dawson.h b/lib/Numeric/GSL/Special/dawson.h
new file mode 100644
index 0000000..5f878b5
--- /dev/null
+++ b/lib/Numeric/GSL/Special/dawson.h
@@ -0,0 +1,2 @@
1int gsl_sf_dawson_e(double x,double* result);
2double gsl_sf_dawson(double x);
diff --git a/lib/Numeric/GSL/Special/debye.h b/lib/Numeric/GSL/Special/debye.h
new file mode 100644
index 0000000..2424b63
--- /dev/null
+++ b/lib/Numeric/GSL/Special/debye.h
@@ -0,0 +1,8 @@
1int gsl_sf_debye_1_e(double x,double* result);
2double gsl_sf_debye_1(double x);
3int gsl_sf_debye_2_e(double x,double* result);
4double gsl_sf_debye_2(double x);
5int gsl_sf_debye_3_e(double x,double* result);
6double gsl_sf_debye_3(double x);
7int gsl_sf_debye_4_e(double x,double* result);
8double gsl_sf_debye_4(double x);
diff --git a/lib/Numeric/GSL/Special/dilog.h b/lib/Numeric/GSL/Special/dilog.h
new file mode 100644
index 0000000..ce1599e
--- /dev/null
+++ b/lib/Numeric/GSL/Special/dilog.h
@@ -0,0 +1,5 @@
1int gsl_sf_dilog_e(double x,double* result);
2double gsl_sf_dilog(double x);
3int gsl_sf_complex_dilog_xy_e(double x,double y,double* result_re,double* result_im);
4int gsl_sf_complex_dilog_e(double r,double theta,double* result_re,double* result_im);
5int gsl_sf_complex_spence_xy_e(double x,double y,double* real_sp,double* imag_sp);
diff --git a/lib/Numeric/GSL/Special/elementary.h b/lib/Numeric/GSL/Special/elementary.h
new file mode 100644
index 0000000..bf5adf8
--- /dev/null
+++ b/lib/Numeric/GSL/Special/elementary.h
@@ -0,0 +1,3 @@
1int gsl_sf_multiply_e(double x,double y,double* result);
2double gsl_sf_multiply(double x,double y);
3int gsl_sf_multiply_err_e(double x,double dx,double y,double dy,double* result);
diff --git a/lib/Numeric/GSL/Special/ellint.h b/lib/Numeric/GSL/Special/ellint.h
new file mode 100644
index 0000000..5329c6c
--- /dev/null
+++ b/lib/Numeric/GSL/Special/ellint.h
@@ -0,0 +1,20 @@
1int gsl_sf_ellint_Kcomp_e(double k,int mode,double* result);
2double gsl_sf_ellint_Kcomp(double k,int mode);
3int gsl_sf_ellint_Ecomp_e(double k,int mode,double* result);
4double gsl_sf_ellint_Ecomp(double k,int mode);
5int gsl_sf_ellint_F_e(double phi,double k,int mode,double* result);
6double gsl_sf_ellint_F(double phi,double k,int mode);
7int gsl_sf_ellint_E_e(double phi,double k,int mode,double* result);
8double gsl_sf_ellint_E(double phi,double k,int mode);
9int gsl_sf_ellint_P_e(double phi,double k,double n,int mode,double* result);
10double gsl_sf_ellint_P(double phi,double k,double n,int mode);
11int gsl_sf_ellint_D_e(double phi,double k,double n,int mode,double* result);
12double gsl_sf_ellint_D(double phi,double k,double n,int mode);
13int gsl_sf_ellint_RC_e(double x,double y,int mode,double* result);
14double gsl_sf_ellint_RC(double x,double y,int mode);
15int gsl_sf_ellint_RD_e(double x,double y,double z,int mode,double* result);
16double gsl_sf_ellint_RD(double x,double y,double z,int mode);
17int gsl_sf_ellint_RF_e(double x,double y,double z,int mode,double* result);
18double gsl_sf_ellint_RF(double x,double y,double z,int mode);
19int gsl_sf_ellint_RJ_e(double x,double y,double z,double p,int mode,double* result);
20double gsl_sf_ellint_RJ(double x,double y,double z,double p,int mode);
diff --git a/lib/Numeric/GSL/Special/erf.h b/lib/Numeric/GSL/Special/erf.h
new file mode 100644
index 0000000..17369cf
--- /dev/null
+++ b/lib/Numeric/GSL/Special/erf.h
@@ -0,0 +1,12 @@
1int gsl_sf_erfc_e(double x,double* result);
2double gsl_sf_erfc(double x);
3int gsl_sf_log_erfc_e(double x,double* result);
4double gsl_sf_log_erfc(double x);
5int gsl_sf_erf_e(double x,double* result);
6double gsl_sf_erf(double x);
7int gsl_sf_erf_Z_e(double x,double* result);
8int gsl_sf_erf_Q_e(double x,double* result);
9double gsl_sf_erf_Z(double x);
10double gsl_sf_erf_Q(double x);
11int gsl_sf_hazard_e(double x,double* result);
12double gsl_sf_hazard(double x);
diff --git a/lib/Numeric/GSL/Special/exp.h b/lib/Numeric/GSL/Special/exp.h
new file mode 100644
index 0000000..20062f0
--- /dev/null
+++ b/lib/Numeric/GSL/Special/exp.h
@@ -0,0 +1,18 @@
1int gsl_sf_exp_e(double x,double* result);
2double gsl_sf_exp(double x);
3int gsl_sf_exp_e10_e(double x,double* result);
4int gsl_sf_exp_mult_e(double x,double y,double* result);
5double gsl_sf_exp_mult(double x,double y);
6int gsl_sf_exp_mult_e10_e(double x,double y,double* result);
7int gsl_sf_expm1_e(double x,double* result);
8double gsl_sf_expm1(double x);
9int gsl_sf_exprel_e(double x,double* result);
10double gsl_sf_exprel(double x);
11int gsl_sf_exprel_2_e(double x,double* result);
12double gsl_sf_exprel_2(double x);
13int gsl_sf_exprel_n_e(int n,double x,double* result);
14double gsl_sf_exprel_n(int n,double x);
15int gsl_sf_exp_err_e(double x,double dx,double* result);
16int gsl_sf_exp_err_e10_e(double x,double dx,double* result);
17int gsl_sf_exp_mult_err_e(double x,double dx,double y,double dy,double* result);
18int gsl_sf_exp_mult_err_e10_e(double x,double dx,double y,double dy,double* result);
diff --git a/lib/Numeric/GSL/Special/expint.h b/lib/Numeric/GSL/Special/expint.h
new file mode 100644
index 0000000..1dd469f
--- /dev/null
+++ b/lib/Numeric/GSL/Special/expint.h
@@ -0,0 +1,24 @@
1int gsl_sf_expint_E1_e(double x,double* result);
2double gsl_sf_expint_E1(double x);
3int gsl_sf_expint_E2_e(double x,double* result);
4double gsl_sf_expint_E2(double x);
5int gsl_sf_expint_E1_scaled_e(double x,double* result);
6double gsl_sf_expint_E1_scaled(double x);
7int gsl_sf_expint_E2_scaled_e(double x,double* result);
8double gsl_sf_expint_E2_scaled(double x);
9int gsl_sf_expint_Ei_e(double x,double* result);
10double gsl_sf_expint_Ei(double x);
11int gsl_sf_expint_Ei_scaled_e(double x,double* result);
12double gsl_sf_expint_Ei_scaled(double x);
13int gsl_sf_Shi_e(double x,double* result);
14double gsl_sf_Shi(double x);
15int gsl_sf_Chi_e(double x,double* result);
16double gsl_sf_Chi(double x);
17int gsl_sf_expint_3_e(double x,double* result);
18double gsl_sf_expint_3(double x);
19int gsl_sf_Si_e(double x,double* result);
20double gsl_sf_Si(double x);
21int gsl_sf_Ci_e(double x,double* result);
22double gsl_sf_Ci(double x);
23int gsl_sf_atanint_e(double x,double* result);
24double gsl_sf_atanint(double x);
diff --git a/lib/Numeric/GSL/Special/fermi_dirac.h b/lib/Numeric/GSL/Special/fermi_dirac.h
new file mode 100644
index 0000000..7a4c757
--- /dev/null
+++ b/lib/Numeric/GSL/Special/fermi_dirac.h
@@ -0,0 +1,18 @@
1int gsl_sf_fermi_dirac_m1_e(double x,double* result);
2double gsl_sf_fermi_dirac_m1(double x);
3int gsl_sf_fermi_dirac_0_e(double x,double* result);
4double gsl_sf_fermi_dirac_0(double x);
5int gsl_sf_fermi_dirac_1_e(double x,double* result);
6double gsl_sf_fermi_dirac_1(double x);
7int gsl_sf_fermi_dirac_2_e(double x,double* result);
8double gsl_sf_fermi_dirac_2(double x);
9int gsl_sf_fermi_dirac_int_e(int j,double x,double* result);
10double gsl_sf_fermi_dirac_int(int j,double x);
11int gsl_sf_fermi_dirac_mhalf_e(double x,double* result);
12double gsl_sf_fermi_dirac_mhalf(double x);
13int gsl_sf_fermi_dirac_half_e(double x,double* result);
14double gsl_sf_fermi_dirac_half(double x);
15int gsl_sf_fermi_dirac_3half_e(double x,double* result);
16double gsl_sf_fermi_dirac_3half(double x);
17int gsl_sf_fermi_dirac_inc_0_e(double x,double b,double* result);
18double gsl_sf_fermi_dirac_inc_0(double x,double b);
diff --git a/lib/Numeric/GSL/Special/gamma.h b/lib/Numeric/GSL/Special/gamma.h
new file mode 100644
index 0000000..c5cc417
--- /dev/null
+++ b/lib/Numeric/GSL/Special/gamma.h
@@ -0,0 +1,43 @@
1int gsl_sf_lngamma_e(double x,double* result);
2double gsl_sf_lngamma(double x);
3int gsl_sf_lngamma_sgn_e(double x,double* result_lg,double* sgn);
4int gsl_sf_gamma_e(double x,double* result);
5double gsl_sf_gamma(double x);
6int gsl_sf_gammastar_e(double x,double* result);
7double gsl_sf_gammastar(double x);
8int gsl_sf_gammainv_e(double x,double* result);
9double gsl_sf_gammainv(double x);
10int gsl_sf_lngamma_complex_e(double zr,double zi,double* lnr,double* arg);
11int gsl_sf_taylorcoeff_e(int n,double x,double* result);
12double gsl_sf_taylorcoeff(int n,double x);
13int gsl_sf_fact_e(int n,double* result);
14double gsl_sf_fact(int n);
15int gsl_sf_doublefact_e(int n,double* result);
16double gsl_sf_doublefact(int n);
17int gsl_sf_lnfact_e(int n,double* result);
18double gsl_sf_lnfact(int n);
19int gsl_sf_lndoublefact_e(int n,double* result);
20double gsl_sf_lndoublefact(int n);
21int gsl_sf_lnchoose_e(int n,int m,double* result);
22double gsl_sf_lnchoose(int n,int m);
23int gsl_sf_choose_e(int n,int m,double* result);
24double gsl_sf_choose(int n,int m);
25int gsl_sf_lnpoch_e(double a,double x,double* result);
26double gsl_sf_lnpoch(double a,double x);
27int gsl_sf_lnpoch_sgn_e(double a,double x,double* result,double* sgn);
28int gsl_sf_poch_e(double a,double x,double* result);
29double gsl_sf_poch(double a,double x);
30int gsl_sf_pochrel_e(double a,double x,double* result);
31double gsl_sf_pochrel(double a,double x);
32int gsl_sf_gamma_inc_Q_e(double a,double x,double* result);
33double gsl_sf_gamma_inc_Q(double a,double x);
34int gsl_sf_gamma_inc_P_e(double a,double x,double* result);
35double gsl_sf_gamma_inc_P(double a,double x);
36int gsl_sf_gamma_inc_e(double a,double x,double* result);
37double gsl_sf_gamma_inc(double a,double x);
38int gsl_sf_lnbeta_e(double a,double b,double* result);
39double gsl_sf_lnbeta(double a,double b);
40int gsl_sf_beta_e(double a,double b,double* result);
41double gsl_sf_beta(double a,double b);
42int gsl_sf_beta_inc_e(double a,double b,double x,double* result);
43double gsl_sf_beta_inc(double a,double b,double x);
diff --git a/lib/Numeric/GSL/Special/gegenbauer.h b/lib/Numeric/GSL/Special/gegenbauer.h
new file mode 100644
index 0000000..228cbd3
--- /dev/null
+++ b/lib/Numeric/GSL/Special/gegenbauer.h
@@ -0,0 +1,9 @@
1int gsl_sf_gegenpoly_1_e(double lambda,double x,double* result);
2int gsl_sf_gegenpoly_2_e(double lambda,double x,double* result);
3int gsl_sf_gegenpoly_3_e(double lambda,double x,double* result);
4double gsl_sf_gegenpoly_1(double lambda,double x);
5double gsl_sf_gegenpoly_2(double lambda,double x);
6double gsl_sf_gegenpoly_3(double lambda,double x);
7int gsl_sf_gegenpoly_n_e(int n,double lambda,double x,double* result);
8double gsl_sf_gegenpoly_n(int n,double lambda,double x);
9int gsl_sf_gegenpoly_array(int nmax,double lambda,double x,double* result_array);
diff --git a/lib/Numeric/GSL/Special/gsl_sf_exp.h b/lib/Numeric/GSL/Special/gsl_sf_exp.h
new file mode 100644
index 0000000..b1f0d89
--- /dev/null
+++ b/lib/Numeric/GSL/Special/gsl_sf_exp.h
@@ -0,0 +1,146 @@
1/* specfunc/gsl_sf_exp.h
2 *
3 * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2004 Gerard Jungman
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or (at
8 * your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful, but
11 * WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
18 */
19
20/* Author: G. Jungman */
21
22#ifndef __GSL_SF_EXP_H__
23#define __GSL_SF_EXP_H__
24
25#include <gsl/gsl_sf_result.h>
26#include <gsl/gsl_precision.h>
27
28#undef __BEGIN_DECLS
29#undef __END_DECLS
30#ifdef __cplusplus
31# define __BEGIN_DECLS extern "C" {
32# define __END_DECLS }
33#else
34# define __BEGIN_DECLS /* empty */
35# define __END_DECLS /* empty */
36#endif
37
38__BEGIN_DECLS
39
40/* Provide an exp() function with GSL semantics,
41 * i.e. with proper error checking, etc.
42 *
43 * exceptions: GSL_EOVRFLW, GSL_EUNDRFLW
44 */
45int gsl_sf_exp_e(const double x, gsl_sf_result * result);
46double gsl_sf_exp(const double x);
47
48
49/* Exp(x)
50 *
51 * exceptions: GSL_EOVRFLW, GSL_EUNDRFLW
52 */
53int gsl_sf_exp_e10_e(const double x, gsl_sf_result_e10 * result);
54
55
56/* Exponentiate and multiply by a given factor: y * Exp(x)
57 *
58 * exceptions: GSL_EOVRFLW, GSL_EUNDRFLW
59 */
60int gsl_sf_exp_mult_e(const double x, const double y, gsl_sf_result * result);
61double gsl_sf_exp_mult(const double x, const double y);
62
63
64/* Exponentiate and multiply by a given factor: y * Exp(x)
65 *
66 * exceptions: GSL_EOVRFLW, GSL_EUNDRFLW
67 */
68int gsl_sf_exp_mult_e10_e(const double x, const double y, gsl_sf_result_e10 * result);
69
70
71/* exp(x)-1
72 *
73 * exceptions: GSL_EOVRFLW
74 */
75int gsl_sf_expm1_e(const double x, gsl_sf_result * result);
76double gsl_sf_expm1(const double x);
77
78
79/* (exp(x)-1)/x = 1 + x/2 + x^2/(2*3) + x^3/(2*3*4) + ...
80 *
81 * exceptions: GSL_EOVRFLW
82 */
83int gsl_sf_exprel_e(const double x, gsl_sf_result * result);
84double gsl_sf_exprel(const double x);
85
86
87/* 2(exp(x)-1-x)/x^2 = 1 + x/3 + x^2/(3*4) + x^3/(3*4*5) + ...
88 *
89 * exceptions: GSL_EOVRFLW
90 */
91int gsl_sf_exprel_2_e(double x, gsl_sf_result * result);
92double gsl_sf_exprel_2(const double x);
93
94
95/* Similarly for the N-th generalization of
96 * the above. The so-called N-relative exponential
97 *
98 * exprel_N(x) = N!/x^N (exp(x) - Sum[x^k/k!, {k,0,N-1}])
99 * = 1 + x/(N+1) + x^2/((N+1)(N+2)) + ...
100 * = 1F1(1,1+N,x)
101 */
102int gsl_sf_exprel_n_e(const int n, const double x, gsl_sf_result * result);
103double gsl_sf_exprel_n(const int n, const double x);
104
105
106/* Exponentiate a quantity with an associated error.
107 */
108int gsl_sf_exp_err_e(const double x, const double dx, gsl_sf_result * result);
109
110/* Exponentiate a quantity with an associated error.
111 */
112int gsl_sf_exp_err_e10_e(const double x, const double dx, gsl_sf_result_e10 * result);
113
114
115/* Exponentiate and multiply by a given factor: y * Exp(x),
116 * for quantities with associated errors.
117 *
118 * exceptions: GSL_EOVRFLW, GSL_EUNDRFLW
119 */
120int gsl_sf_exp_mult_err_e(const double x, const double dx, const double y, const double dy, gsl_sf_result * result);
121
122
123/* Exponentiate and multiply by a given factor: y * Exp(x),
124 * for quantities with associated errors.
125 *
126 * exceptions: GSL_EOVRFLW, GSL_EUNDRFLW
127 */
128int gsl_sf_exp_mult_err_e10_e(const double x, const double dx, const double y, const double dy, gsl_sf_result_e10 * result);
129
130__END_DECLS
131
132
133#ifdef HAVE_INLINE
134#include <gsl/gsl_math.h>
135#include <gsl/gsl_errno.h>
136
137__BEGIN_DECLS
138
139
140
141__END_DECLS
142
143#endif /* HAVE_INLINE */
144
145
146#endif /* __GSL_SF_EXP_H__ */
diff --git a/lib/Numeric/GSL/Special/gsl_sf_log.h b/lib/Numeric/GSL/Special/gsl_sf_log.h
new file mode 100644
index 0000000..5225d05
--- /dev/null
+++ b/lib/Numeric/GSL/Special/gsl_sf_log.h
@@ -0,0 +1,90 @@
1/* specfunc/gsl_sf_log.h
2 *
3 * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2004 Gerard Jungman
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or (at
8 * your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful, but
11 * WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
18 */
19
20/* Author: G. Jungman */
21
22#ifndef __GSL_SF_LOG_H__
23#define __GSL_SF_LOG_H__
24
25#include <gsl/gsl_sf_result.h>
26
27#undef __BEGIN_DECLS
28#undef __END_DECLS
29#ifdef __cplusplus
30# define __BEGIN_DECLS extern "C" {
31# define __END_DECLS }
32#else
33# define __BEGIN_DECLS /* empty */
34# define __END_DECLS /* empty */
35#endif
36
37__BEGIN_DECLS
38
39
40/* Provide a logarithm function with GSL semantics.
41 *
42 * exceptions: GSL_EDOM
43 */
44int gsl_sf_log_e(const double x, gsl_sf_result * result);
45double gsl_sf_log(const double x);
46
47
48/* Log(|x|)
49 *
50 * exceptions: GSL_EDOM
51 */
52int gsl_sf_log_abs_e(const double x, gsl_sf_result * result);
53double gsl_sf_log_abs(const double x);
54
55
56/* Complex Logarithm
57 * exp(lnr + I theta) = zr + I zi
58 * Returns argument in [-pi,pi].
59 *
60 * exceptions: GSL_EDOM
61 */
62int gsl_sf_complex_log_e(const double zr, const double zi, gsl_sf_result * lnr, gsl_sf_result * theta);
63
64
65/* Log(1 + x)
66 *
67 * exceptions: GSL_EDOM
68 */
69int gsl_sf_log_1plusx_e(const double x, gsl_sf_result * result);
70double gsl_sf_log_1plusx(const double x);
71
72
73/* Log(1 + x) - x
74 *
75 * exceptions: GSL_EDOM
76 */
77int gsl_sf_log_1plusx_mx_e(const double x, gsl_sf_result * result);
78double gsl_sf_log_1plusx_mx(const double x);
79
80
81#ifdef HAVE_INLINE
82#include <gsl/gsl_math.h>
83#include <gsl/gsl_errno.h>
84
85#endif /* HAVE_INLINE */
86
87
88__END_DECLS
89
90#endif /* __GSL_SF_LOG_H__ */
diff --git a/lib/Numeric/GSL/Special/hyperg.h b/lib/Numeric/GSL/Special/hyperg.h
new file mode 100644
index 0000000..aa59106
--- /dev/null
+++ b/lib/Numeric/GSL/Special/hyperg.h
@@ -0,0 +1,22 @@
1int gsl_sf_hyperg_0F1_e(double c,double x,double* result);
2double gsl_sf_hyperg_0F1(double c,double x);
3int gsl_sf_hyperg_1F1_int_e(int m,int n,double x,double* result);
4double gsl_sf_hyperg_1F1_int(int m,int n,double x);
5int gsl_sf_hyperg_1F1_e(double a,double b,double x,double* result);
6double gsl_sf_hyperg_1F1(double a,double b,double x);
7int gsl_sf_hyperg_U_int_e(int m,int n,double x,double* result);
8double gsl_sf_hyperg_U_int(int m,int n,double x);
9int gsl_sf_hyperg_U_int_e10_e(int m,int n,double x,double* result);
10int gsl_sf_hyperg_U_e(double a,double b,double x,double* result);
11double gsl_sf_hyperg_U(double a,double b,double x);
12int gsl_sf_hyperg_U_e10_e(double a,double b,double x,double* result);
13int gsl_sf_hyperg_2F1_e(double a,double b,double c,double x,double* result);
14double gsl_sf_hyperg_2F1(double a,double b,double c,double x);
15int gsl_sf_hyperg_2F1_conj_e(double aR,double aI,double c,double x,double* result);
16double gsl_sf_hyperg_2F1_conj(double aR,double aI,double c,double x);
17int gsl_sf_hyperg_2F1_renorm_e(double a,double b,double c,double x,double* result);
18double gsl_sf_hyperg_2F1_renorm(double a,double b,double c,double x);
19int gsl_sf_hyperg_2F1_conj_renorm_e(double aR,double aI,double c,double x,double* result);
20double gsl_sf_hyperg_2F1_conj_renorm(double aR,double aI,double c,double x);
21int gsl_sf_hyperg_2F0_e(double a,double b,double x,double* result);
22double gsl_sf_hyperg_2F0(double a,double b,double x);
diff --git a/lib/Numeric/GSL/Special/laguerre.h b/lib/Numeric/GSL/Special/laguerre.h
new file mode 100644
index 0000000..6275a05
--- /dev/null
+++ b/lib/Numeric/GSL/Special/laguerre.h
@@ -0,0 +1,8 @@
1int gsl_sf_laguerre_1_e(double a,double x,double* result);
2int gsl_sf_laguerre_2_e(double a,double x,double* result);
3int gsl_sf_laguerre_3_e(double a,double x,double* result);
4double gsl_sf_laguerre_1(double a,double x);
5double gsl_sf_laguerre_2(double a,double x);
6double gsl_sf_laguerre_3(double a,double x);
7int gsl_sf_laguerre_n_e(int n,double a,double x,double* result);
8double gsl_sf_laguerre_n(int n,double a,double x);
diff --git a/lib/Numeric/GSL/Special/lambert.h b/lib/Numeric/GSL/Special/lambert.h
new file mode 100644
index 0000000..df90d11
--- /dev/null
+++ b/lib/Numeric/GSL/Special/lambert.h
@@ -0,0 +1,4 @@
1int gsl_sf_lambert_W0_e(double x,double* result);
2double gsl_sf_lambert_W0(double x);
3int gsl_sf_lambert_Wm1_e(double x,double* result);
4double gsl_sf_lambert_Wm1(double x);
diff --git a/lib/Numeric/GSL/Special/legendre.h b/lib/Numeric/GSL/Special/legendre.h
new file mode 100644
index 0000000..aebe84f
--- /dev/null
+++ b/lib/Numeric/GSL/Special/legendre.h
@@ -0,0 +1,44 @@
1int gsl_sf_legendre_Pl_e(int l,double x,double* result);
2double gsl_sf_legendre_Pl(int l,double x);
3int gsl_sf_legendre_Pl_array(int lmax,double x,double* result_array);
4int gsl_sf_legendre_Pl_deriv_array(int lmax,double x,double* result_array,double* result_deriv_array);
5int gsl_sf_legendre_P1_e(double x,double* result);
6int gsl_sf_legendre_P2_e(double x,double* result);
7int gsl_sf_legendre_P3_e(double x,double* result);
8double gsl_sf_legendre_P1(double x);
9double gsl_sf_legendre_P2(double x);
10double gsl_sf_legendre_P3(double x);
11int gsl_sf_legendre_Q0_e(double x,double* result);
12double gsl_sf_legendre_Q0(double x);
13int gsl_sf_legendre_Q1_e(double x,double* result);
14double gsl_sf_legendre_Q1(double x);
15int gsl_sf_legendre_Ql_e(int l,double x,double* result);
16double gsl_sf_legendre_Ql(int l,double x);
17int gsl_sf_legendre_Plm_e(int l,int m,double x,double* result);
18double gsl_sf_legendre_Plm(int l,int m,double x);
19int gsl_sf_legendre_Plm_array(int lmax,int m,double x,double* result_array);
20int gsl_sf_legendre_Plm_deriv_array(int lmax,int m,double x,double* result_array,double* result_deriv_array);
21int gsl_sf_legendre_sphPlm_e(int l,int m,double x,double* result);
22double gsl_sf_legendre_sphPlm(int l,int m,double x);
23int gsl_sf_legendre_sphPlm_array(int lmax,int m,double x,double* result_array);
24int gsl_sf_legendre_sphPlm_deriv_array(int lmax,int m,double x,double* result_array,double* result_deriv_array);
25int gsl_sf_legendre_array_size(int lmax,int m);
26int gsl_sf_conicalP_half_e(double lambda,double x,double* result);
27double gsl_sf_conicalP_half(double lambda,double x);
28int gsl_sf_conicalP_mhalf_e(double lambda,double x,double* result);
29double gsl_sf_conicalP_mhalf(double lambda,double x);
30int gsl_sf_conicalP_0_e(double lambda,double x,double* result);
31double gsl_sf_conicalP_0(double lambda,double x);
32int gsl_sf_conicalP_1_e(double lambda,double x,double* result);
33double gsl_sf_conicalP_1(double lambda,double x);
34int gsl_sf_conicalP_sph_reg_e(int l,double lambda,double x,double* result);
35double gsl_sf_conicalP_sph_reg(int l,double lambda,double x);
36int gsl_sf_conicalP_cyl_reg_e(int m,double lambda,double x,double* result);
37double gsl_sf_conicalP_cyl_reg(int m,double lambda,double x);
38int gsl_sf_legendre_H3d_0_e(double lambda,double eta,double* result);
39double gsl_sf_legendre_H3d_0(double lambda,double eta);
40int gsl_sf_legendre_H3d_1_e(double lambda,double eta,double* result);
41double gsl_sf_legendre_H3d_1(double lambda,double eta);
42int gsl_sf_legendre_H3d_e(int l,double lambda,double eta,double* result);
43double gsl_sf_legendre_H3d(int l,double lambda,double eta);
44int gsl_sf_legendre_H3d_array(int lmax,double lambda,double eta,double* result_array);
diff --git a/lib/Numeric/GSL/Special/log.h b/lib/Numeric/GSL/Special/log.h
new file mode 100644
index 0000000..5713845
--- /dev/null
+++ b/lib/Numeric/GSL/Special/log.h
@@ -0,0 +1,9 @@
1int gsl_sf_log_e(double x,double* result);
2double gsl_sf_log(double x);
3int gsl_sf_log_abs_e(double x,double* result);
4double gsl_sf_log_abs(double x);
5int gsl_sf_complex_log_e(double zr,double zi,double* lnr,double* theta);
6int gsl_sf_log_1plusx_e(double x,double* result);
7double gsl_sf_log_1plusx(double x);
8int gsl_sf_log_1plusx_mx_e(double x,double* result);
9double gsl_sf_log_1plusx_mx(double x);
diff --git a/lib/Numeric/GSL/Special/pow_int.h b/lib/Numeric/GSL/Special/pow_int.h
new file mode 100644
index 0000000..aba8bc9
--- /dev/null
+++ b/lib/Numeric/GSL/Special/pow_int.h
@@ -0,0 +1,2 @@
1int gsl_sf_pow_int_e(double x,int n,double* result);
2double gsl_sf_pow_int(double x,int n);
diff --git a/lib/Numeric/GSL/Special/psi.h b/lib/Numeric/GSL/Special/psi.h
new file mode 100644
index 0000000..589eb34
--- /dev/null
+++ b/lib/Numeric/GSL/Special/psi.h
@@ -0,0 +1,12 @@
1int gsl_sf_psi_int_e(int n,double* result);
2double gsl_sf_psi_int(int n);
3int gsl_sf_psi_e(double x,double* result);
4double gsl_sf_psi(double x);
5int gsl_sf_psi_1piy_e(double y,double* result);
6double gsl_sf_psi_1piy(double y);
7int gsl_sf_psi_1_int_e(int n,double* result);
8double gsl_sf_psi_1_int(int n);
9int gsl_sf_psi_1_e(double x,double* result);
10double gsl_sf_psi_1(double x);
11int gsl_sf_psi_n_e(int n,double x,double* result);
12double gsl_sf_psi_n(int n,double x);
diff --git a/lib/Numeric/GSL/Special/synchrotron.h b/lib/Numeric/GSL/Special/synchrotron.h
new file mode 100644
index 0000000..786401c
--- /dev/null
+++ b/lib/Numeric/GSL/Special/synchrotron.h
@@ -0,0 +1,4 @@
1int gsl_sf_synchrotron_1_e(double x,double* result);
2double gsl_sf_synchrotron_1(double x);
3int gsl_sf_synchrotron_2_e(double x,double* result);
4double gsl_sf_synchrotron_2(double x);
diff --git a/lib/Numeric/GSL/Special/trig.h b/lib/Numeric/GSL/Special/trig.h
new file mode 100644
index 0000000..50677f2
--- /dev/null
+++ b/lib/Numeric/GSL/Special/trig.h
@@ -0,0 +1,25 @@
1int gsl_sf_sin_e(double x,double* result);
2double gsl_sf_sin(double x);
3int gsl_sf_cos_e(double x,double* result);
4double gsl_sf_cos(double x);
5int gsl_sf_hypot_e(double x,double y,double* result);
6double gsl_sf_hypot(double x,double y);
7int gsl_sf_complex_sin_e(double zr,double zi,double* szr,double* szi);
8int gsl_sf_complex_cos_e(double zr,double zi,double* czr,double* czi);
9int gsl_sf_complex_logsin_e(double zr,double zi,double* lszr,double* lszi);
10int gsl_sf_sinc_e(double x,double* result);
11double gsl_sf_sinc(double x);
12int gsl_sf_lnsinh_e(double x,double* result);
13double gsl_sf_lnsinh(double x);
14int gsl_sf_lncosh_e(double x,double* result);
15double gsl_sf_lncosh(double x);
16int gsl_sf_polar_to_rect(double r,double theta,double* x,double* y);
17int gsl_sf_rect_to_polar(double x,double y,double* r,double* theta);
18int gsl_sf_sin_err_e(double x,double dx,double* result);
19int gsl_sf_cos_err_e(double x,double dx,double* result);
20int gsl_sf_angle_restrict_symm_e(double* theta);
21double gsl_sf_angle_restrict_symm(double theta);
22int gsl_sf_angle_restrict_pos_e(double* theta);
23double gsl_sf_angle_restrict_pos(double theta);
24int gsl_sf_angle_restrict_symm_err_e(double theta,double* result);
25int gsl_sf_angle_restrict_pos_err_e(double theta,double* result);
diff --git a/lib/Numeric/GSL/Special/zeta.h b/lib/Numeric/GSL/Special/zeta.h
new file mode 100644
index 0000000..b961ece
--- /dev/null
+++ b/lib/Numeric/GSL/Special/zeta.h
@@ -0,0 +1,14 @@
1int gsl_sf_zeta_int_e(int n,double* result);
2double gsl_sf_zeta_int(int n);
3int gsl_sf_zeta_e(double s,double* result);
4double gsl_sf_zeta(double s);
5int gsl_sf_zetam1_e(double s,double* result);
6double gsl_sf_zetam1(double s);
7int gsl_sf_zetam1_int_e(int s,double* result);
8double gsl_sf_zetam1_int(int s);
9int gsl_sf_hzeta_e(double s,double q,double* result);
10double gsl_sf_hzeta(double s,double q);
11int gsl_sf_eta_int_e(int n,double* result);
12double gsl_sf_eta_int(int n);
13int gsl_sf_eta_e(double s,double* result);
14double gsl_sf_eta(double s);
diff --git a/lib/Numeric/GSL/Vector.hs b/lib/Numeric/GSL/Vector.hs
new file mode 100644
index 0000000..ef3d5e8
--- /dev/null
+++ b/lib/Numeric/GSL/Vector.hs
@@ -0,0 +1,145 @@
1{-# OPTIONS_GHC -fglasgow-exts #-}
2-----------------------------------------------------------------------------
3-- |
4-- Module : Numeric.GSL.Vector
5-- Copyright : (c) Alberto Ruiz 2007
6-- License : GPL-style
7--
8-- Maintainer : Alberto Ruiz <aruiz@um.es>
9-- Stability : provisional
10-- Portability : portable (uses FFI)
11--
12-- Vector operations
13--
14-----------------------------------------------------------------------------
15-- #hide
16
17module Numeric.GSL.Vector (
18 FunCodeS(..), toScalarR,
19 FunCodeV(..), vectorMapR, vectorMapC,
20 FunCodeSV(..), vectorMapValR, vectorMapValC,
21 FunCodeVV(..), vectorZipR, vectorZipC
22) where
23
24import Data.Packed.Internal.Common
25import Data.Packed.Internal.Vector
26
27import Complex
28import Foreign
29
30data FunCodeV = Sin
31 | Cos
32 | Tan
33 | Abs
34 | ASin
35 | ACos
36 | ATan
37 | Sinh
38 | Cosh
39 | Tanh
40 | ASinh
41 | ACosh
42 | ATanh
43 | Exp
44 | Log
45 | Sign
46 | Sqrt
47 deriving Enum
48
49data FunCodeSV = Scale
50 | Recip
51 | AddConstant
52 | Negate
53 | PowSV
54 | PowVS
55 deriving Enum
56
57data FunCodeVV = Add
58 | Sub
59 | Mul
60 | Div
61 | Pow
62 | ATan2
63 deriving Enum
64
65data FunCodeS = Norm2
66 | AbsSum
67 | MaxIdx
68 | Max
69 | MinIdx
70 | Min
71 deriving Enum
72
73------------------------------------------------------------------
74
75toScalarAux fun code v = unsafePerformIO $ do
76 r <- createVector 1
77 fun (fromEnum code) // vec v // vec r // check "toScalarAux" [v]
78 return (r `at` 0)
79
80vectorMapAux fun code v = unsafePerformIO $ do
81 r <- createVector (dim v)
82 fun (fromEnum code) // vec v // vec r // check "vectorMapAux" [v]
83 return r
84
85vectorMapValAux fun code val v = unsafePerformIO $ do
86 r <- createVector (dim v)
87 pval <- newArray [val]
88 fun (fromEnum code) pval // vec v // vec r // check "vectorMapValAux" [v]
89 free pval
90 return r
91
92vectorZipAux fun code u v = unsafePerformIO $ do
93 r <- createVector (dim u)
94 fun (fromEnum code) // vec u // vec v // vec r // check "vectorZipAux" [u,v]
95 return r
96
97---------------------------------------------------------------------
98
99-- | obtains different functions of a vector: norm1, norm2, max, min, posmax, posmin, etc.
100toScalarR :: FunCodeS -> Vector Double -> Double
101toScalarR oper = toScalarAux c_toScalarR (fromEnum oper)
102
103foreign import ccall safe "gsl-aux.h toScalarR" c_toScalarR :: Int -> TVV
104
105------------------------------------------------------------------
106
107-- | map of real vectors with given function
108vectorMapR :: FunCodeV -> Vector Double -> Vector Double
109vectorMapR = vectorMapAux c_vectorMapR
110
111foreign import ccall safe "gsl-aux.h mapR" c_vectorMapR :: Int -> TVV
112
113-- | map of complex vectors with given function
114vectorMapC :: FunCodeV -> Vector (Complex Double) -> Vector (Complex Double)
115vectorMapC oper = vectorMapAux c_vectorMapC (fromEnum oper)
116
117foreign import ccall safe "gsl-aux.h mapC" c_vectorMapC :: Int -> TCVCV
118
119-------------------------------------------------------------------
120
121-- | map of real vectors with given function
122vectorMapValR :: FunCodeSV -> Double -> Vector Double -> Vector Double
123vectorMapValR oper = vectorMapValAux c_vectorMapValR (fromEnum oper)
124
125foreign import ccall safe "gsl-aux.h mapValR" c_vectorMapValR :: Int -> Ptr Double -> TVV
126
127-- | map of complex vectors with given function
128vectorMapValC :: FunCodeSV -> Complex Double -> Vector (Complex Double) -> Vector (Complex Double)
129vectorMapValC = vectorMapValAux c_vectorMapValC
130
131foreign import ccall safe "gsl-aux.h mapValC" c_vectorMapValC :: Int -> Ptr (Complex Double) -> TCVCV
132
133-------------------------------------------------------------------
134
135-- | elementwise operation on real vectors
136vectorZipR :: FunCodeVV -> Vector Double -> Vector Double -> Vector Double
137vectorZipR = vectorZipAux c_vectorZipR
138
139foreign import ccall safe "gsl-aux.h zipR" c_vectorZipR :: Int -> TVVV
140
141-- | elementwise operation on complex vectors
142vectorZipC :: FunCodeVV -> Vector (Complex Double) -> Vector (Complex Double) -> Vector (Complex Double)
143vectorZipC = vectorZipAux c_vectorZipC
144
145foreign import ccall safe "gsl-aux.h zipC" c_vectorZipC :: Int -> TCVCVCV
diff --git a/lib/Numeric/GSL/gsl-aux.c b/lib/Numeric/GSL/gsl-aux.c
new file mode 100644
index 0000000..c602d5e
--- /dev/null
+++ b/lib/Numeric/GSL/gsl-aux.c
@@ -0,0 +1,743 @@
1#include "gsl-aux.h"
2#include <gsl/gsl_blas.h>
3#include <gsl/gsl_linalg.h>
4#include <gsl/gsl_matrix.h>
5#include <gsl/gsl_math.h>
6#include <gsl/gsl_errno.h>
7#include <gsl/gsl_fft_complex.h>
8#include <gsl/gsl_eigen.h>
9#include <gsl/gsl_integration.h>
10#include <gsl/gsl_deriv.h>
11#include <gsl/gsl_poly.h>
12#include <gsl/gsl_multimin.h>
13#include <gsl/gsl_complex.h>
14#include <gsl/gsl_complex_math.h>
15#include <string.h>
16#include <stdio.h>
17
18#define MACRO(B) do {B} while (0)
19#define ERROR(CODE) MACRO(return CODE;)
20#define REQUIRES(COND, CODE) MACRO(if(!(COND)) {ERROR(CODE);})
21#define OK return 0;
22
23#define MIN(A,B) ((A)<(B)?(A):(B))
24#define MAX(A,B) ((A)>(B)?(A):(B))
25
26#ifdef DBG
27#define DEBUGMSG(M) printf("*** calling aux C function: %s\n",M);
28#else
29#define DEBUGMSG(M)
30#endif
31
32#define CHECK(RES,CODE) MACRO(if(RES) return CODE;)
33
34#ifdef DBG
35#define DEBUGMAT(MSG,X) printf(MSG" = \n"); gsl_matrix_fprintf(stdout,X,"%f"); printf("\n");
36#else
37#define DEBUGMAT(MSG,X)
38#endif
39
40#ifdef DBG
41#define DEBUGVEC(MSG,X) printf(MSG" = \n"); gsl_vector_fprintf(stdout,X,"%f"); printf("\n");
42#else
43#define DEBUGVEC(MSG,X)
44#endif
45
46#define DVVIEW(A) gsl_vector_view A = gsl_vector_view_array(A##p,A##n)
47#define DMVIEW(A) gsl_matrix_view A = gsl_matrix_view_array(A##p,A##r,A##c)
48#define CVVIEW(A) gsl_vector_complex_view A = gsl_vector_complex_view_array((double*)A##p,A##n)
49#define CMVIEW(A) gsl_matrix_complex_view A = gsl_matrix_complex_view_array((double*)A##p,A##r,A##c)
50#define KDVVIEW(A) gsl_vector_const_view A = gsl_vector_const_view_array(A##p,A##n)
51#define KDMVIEW(A) gsl_matrix_const_view A = gsl_matrix_const_view_array(A##p,A##r,A##c)
52#define KCVVIEW(A) gsl_vector_complex_const_view A = gsl_vector_complex_const_view_array((double*)A##p,A##n)
53#define KCMVIEW(A) gsl_matrix_complex_const_view A = gsl_matrix_complex_const_view_array((double*)A##p,A##r,A##c)
54
55#define V(a) (&a.vector)
56#define M(a) (&a.matrix)
57
58#define GCVEC(A) int A##n, gsl_complex*A##p
59#define KGCVEC(A) int A##n, const gsl_complex*A##p
60
61#define BAD_SIZE 2000
62#define BAD_CODE 2001
63#define MEM 2002
64#define BAD_FILE 2003
65
66
67void no_abort_on_error() {
68 gsl_set_error_handler_off();
69}
70
71
72int toScalarR(int code, KRVEC(x), RVEC(r)) {
73 REQUIRES(rn==1,BAD_SIZE);
74 DEBUGMSG("toScalarR");
75 KDVVIEW(x);
76 double res;
77 switch(code) {
78 case 0: { res = gsl_blas_dnrm2(V(x)); break; }
79 case 1: { res = gsl_blas_dasum(V(x)); break; }
80 case 2: { res = gsl_vector_max_index(V(x)); break; }
81 case 3: { res = gsl_vector_max(V(x)); break; }
82 case 4: { res = gsl_vector_min_index(V(x)); break; }
83 case 5: { res = gsl_vector_min(V(x)); break; }
84 default: ERROR(BAD_CODE);
85 }
86 rp[0] = res;
87 OK
88}
89
90
91inline double sign(double x) {
92 if(x>0) {
93 return +1.0;
94 } else if (x<0) {
95 return -1.0;
96 } else {
97 return 0.0;
98 }
99}
100
101
102#define OP(C,F) case C: { for(k=0;k<xn;k++) rp[k] = F(xp[k]); OK }
103#define OPV(C,E) case C: { for(k=0;k<xn;k++) rp[k] = E; OK }
104int mapR(int code, KRVEC(x), RVEC(r)) {
105 int k;
106 REQUIRES(xn == rn,BAD_SIZE);
107 DEBUGMSG("mapR");
108 switch (code) {
109 OP(0,sin)
110 OP(1,cos)
111 OP(2,tan)
112 OP(3,fabs)
113 OP(4,asin)
114 OP(5,acos)
115 OP(6,atan) /* atan2 mediante vectorZip */
116 OP(7,sinh)
117 OP(8,cosh)
118 OP(9,tanh)
119 OP(10,asinh)
120 OP(11,acosh)
121 OP(12,atanh)
122 OP(13,exp)
123 OP(14,log)
124 OP(15,sign)
125 OP(16,sqrt)
126 default: ERROR(BAD_CODE);
127 }
128}
129
130int mapCAux(int code, KGCVEC(x), GCVEC(r)) {
131 int k;
132 REQUIRES(xn == rn,BAD_SIZE);
133 DEBUGMSG("mapC");
134 switch (code) {
135 OP(0,gsl_complex_sin)
136 OP(1,gsl_complex_cos)
137 OP(2,gsl_complex_tan)
138
139 OP(4,gsl_complex_arcsin)
140 OP(5,gsl_complex_arccos)
141 OP(6,gsl_complex_arctan)
142 OP(7,gsl_complex_sinh)
143 OP(8,gsl_complex_cosh)
144 OP(9,gsl_complex_tanh)
145 OP(10,gsl_complex_arcsinh)
146 OP(11,gsl_complex_arccosh)
147 OP(12,gsl_complex_arctanh)
148 OP(13,gsl_complex_exp)
149 OP(14,gsl_complex_log)
150
151 OP(16,gsl_complex_sqrt)
152
153 // gsl_complex_arg
154 // gsl_complex_abs
155 default: ERROR(BAD_CODE);
156 }
157}
158
159int mapC(int code, KCVEC(x), CVEC(r)) {
160 return mapCAux(code, xn, (gsl_complex*)xp, rn, (gsl_complex*)rp);
161}
162
163
164/*
165int scaleR(double* alpha, KRVEC(x), RVEC(r)) {
166 REQUIRES(xn == rn,BAD_SIZE);
167 DEBUGMSG("scaleR");
168 KDVVIEW(x);
169 DVVIEW(r);
170 CHECK( gsl_vector_memcpy(V(r),V(x)) , MEM);
171 int res = gsl_vector_scale(V(r),*alpha);
172 CHECK(res,res);
173 OK
174}
175
176int scaleC(gsl_complex *alpha, KCVEC(x), CVEC(r)) {
177 REQUIRES(xn == rn,BAD_SIZE);
178 DEBUGMSG("scaleC");
179 //KCVVIEW(x);
180 CVVIEW(r);
181 gsl_vector_const_view vrx = gsl_vector_const_view_array((double*)xp,xn*2);
182 gsl_vector_view vrr = gsl_vector_view_array((double*)rp,rn*2);
183 CHECK(gsl_vector_memcpy(V(vrr),V(vrx)) , MEM);
184 gsl_blas_zscal(*alpha,V(r)); // void !
185 int res = 0;
186 CHECK(res,res);
187 OK
188}
189
190int addConstantR(double offs, KRVEC(x), RVEC(r)) {
191 REQUIRES(xn == rn,BAD_SIZE);
192 DEBUGMSG("addConstantR");
193 KDVVIEW(x);
194 DVVIEW(r);
195 CHECK(gsl_vector_memcpy(V(r),V(x)), MEM);
196 int res = gsl_vector_add_constant(V(r),offs);
197 CHECK(res,res);
198 OK
199}
200
201*/
202
203
204
205int mapValR(int code, double* pval, KRVEC(x), RVEC(r)) {
206 int k;
207 double val = *pval;
208 REQUIRES(xn == rn,BAD_SIZE);
209 DEBUGMSG("mapValR");
210 switch (code) {
211 OPV(0,val*xp[k])
212 OPV(1,val/xp[k])
213 OPV(2,val+xp[k])
214 OPV(3,val-xp[k])
215 OPV(4,pow(val,xp[k]))
216 OPV(5,pow(xp[k],val))
217 default: ERROR(BAD_CODE);
218 }
219}
220
221int mapValCAux(int code, gsl_complex* pval, KGCVEC(x), GCVEC(r)) {
222 int k;
223 gsl_complex val = *pval;
224 REQUIRES(xn == rn,BAD_SIZE);
225 DEBUGMSG("mapValC");
226 switch (code) {
227 OPV(0,gsl_complex_mul(val,xp[k]))
228 OPV(1,gsl_complex_div(val,xp[k]))
229 OPV(2,gsl_complex_add(val,xp[k]))
230 OPV(3,gsl_complex_sub(val,xp[k]))
231 OPV(4,gsl_complex_pow(val,xp[k]))
232 OPV(5,gsl_complex_pow(xp[k],val))
233 default: ERROR(BAD_CODE);
234 }
235}
236
237int mapValC(int code, gsl_complex* val, KCVEC(x), CVEC(r)) {
238 return mapValCAux(code, val, xn, (gsl_complex*)xp, rn, (gsl_complex*)rp);
239}
240
241
242#define OPZE(C,msg,E) case C: {DEBUGMSG(msg) for(k=0;k<an;k++) rp[k] = E(ap[k],bp[k]); OK }
243#define OPZV(C,msg,E) case C: {DEBUGMSG(msg) res = E(V(r),V(b)); CHECK(res,res); OK }
244int zipR(int code, KRVEC(a), KRVEC(b), RVEC(r)) {
245 REQUIRES(an == bn && an == rn, BAD_SIZE);
246 int k;
247 switch(code) {
248 OPZE(4,"zipR Pow",pow)
249 OPZE(5,"zipR ATan2",atan2)
250 }
251 KDVVIEW(a);
252 KDVVIEW(b);
253 DVVIEW(r);
254 gsl_vector_memcpy(V(r),V(a));
255 int res;
256 switch(code) {
257 OPZV(0,"zipR Add",gsl_vector_add)
258 OPZV(1,"zipR Sub",gsl_vector_sub)
259 OPZV(2,"zipR Mul",gsl_vector_mul)
260 OPZV(3,"zipR Div",gsl_vector_div)
261 default: ERROR(BAD_CODE);
262 }
263}
264
265
266int zipCAux(int code, KGCVEC(a), KGCVEC(b), GCVEC(r)) {
267 REQUIRES(an == bn && an == rn, BAD_SIZE);
268 int k;
269 switch(code) {
270 OPZE(0,"zipC Add",gsl_complex_add)
271 OPZE(1,"zipC Sub",gsl_complex_sub)
272 OPZE(2,"zipC Mul",gsl_complex_mul)
273 OPZE(3,"zipC Div",gsl_complex_div)
274 OPZE(4,"zipC Pow",gsl_complex_pow)
275 //OPZE(5,"zipR ATan2",atan2)
276 }
277 //KCVVIEW(a);
278 //KCVVIEW(b);
279 //CVVIEW(r);
280 //gsl_vector_memcpy(V(r),V(a));
281 //int res;
282 switch(code) {
283 default: ERROR(BAD_CODE);
284 }
285}
286
287
288int zipC(int code, KCVEC(a), KCVEC(b), CVEC(r)) {
289 return zipCAux(code, an, (gsl_complex*)ap, bn, (gsl_complex*)bp, rn, (gsl_complex*)rp);
290}
291
292
293
294
295int luSolveR(KRMAT(a),KRMAT(b),RMAT(r)) {
296 REQUIRES(ar==ac && ac==br && ar==rr && bc==rc,BAD_SIZE);
297 DEBUGMSG("luSolveR");
298 KDMVIEW(a);
299 KDMVIEW(b);
300 DMVIEW(r);
301 int res;
302 gsl_matrix *LU = gsl_matrix_alloc(ar,ar);
303 CHECK(!LU,MEM);
304 int s;
305 gsl_permutation * p = gsl_permutation_alloc (ar);
306 CHECK(!p,MEM);
307 CHECK(gsl_matrix_memcpy(LU,M(a)),MEM);
308 res = gsl_linalg_LU_decomp(LU, p, &s);
309 CHECK(res,res);
310 int c;
311
312 for (c=0; c<bc; c++) {
313 gsl_vector_const_view colb = gsl_matrix_const_column (M(b), c);
314 gsl_vector_view colr = gsl_matrix_column (M(r), c);
315 res = gsl_linalg_LU_solve (LU, p, V(colb), V(colr));
316 CHECK(res,res);
317 }
318 gsl_permutation_free(p);
319 gsl_matrix_free(LU);
320 OK
321}
322
323
324int luSolveC(KCMAT(a),KCMAT(b),CMAT(r)) {
325 REQUIRES(ar==ac && ac==br && ar==rr && bc==rc,BAD_SIZE);
326 DEBUGMSG("luSolveC");
327 KCMVIEW(a);
328 KCMVIEW(b);
329 CMVIEW(r);
330 gsl_matrix_complex *LU = gsl_matrix_complex_alloc(ar,ar);
331 CHECK(!LU,MEM);
332 int s;
333 gsl_permutation * p = gsl_permutation_alloc (ar);
334 CHECK(!p,MEM);
335 CHECK(gsl_matrix_complex_memcpy(LU,M(a)),MEM);
336 int res;
337 res = gsl_linalg_complex_LU_decomp(LU, p, &s);
338 CHECK(res,res);
339 int c;
340 for (c=0; c<bc; c++) {
341 gsl_vector_complex_const_view colb = gsl_matrix_complex_const_column (M(b), c);
342 gsl_vector_complex_view colr = gsl_matrix_complex_column (M(r), c);
343 res = gsl_linalg_complex_LU_solve (LU, p, V(colb), V(colr));
344 CHECK(res,res);
345 }
346 gsl_permutation_free(p);
347 gsl_matrix_complex_free(LU);
348 OK
349}
350
351
352int luRaux(KRMAT(a),RVEC(b)) {
353 REQUIRES(ar==ac && bn==ar*ar+ar+1,BAD_SIZE);
354 DEBUGMSG("luRaux");
355 KDMVIEW(a);
356 //DVVIEW(b);
357 gsl_matrix_view LU = gsl_matrix_view_array(bp,ar,ac);
358 int s;
359 gsl_permutation * p = gsl_permutation_alloc (ar);
360 CHECK(!p,MEM);
361 CHECK(gsl_matrix_memcpy(M(LU),M(a)),MEM);
362 gsl_linalg_LU_decomp(M(LU), p, &s);
363 bp[ar*ar] = s;
364 int k;
365 for (k=0; k<ar; k++) {
366 bp[ar*ar+k+1] = gsl_permutation_get(p,k);
367 }
368 gsl_permutation_free(p);
369 OK
370}
371
372int luCaux(KCMAT(a),CVEC(b)) {
373 REQUIRES(ar==ac && bn==ar*ar+ar+1,BAD_SIZE);
374 DEBUGMSG("luCaux");
375 KCMVIEW(a);
376 //DVVIEW(b);
377 gsl_matrix_complex_view LU = gsl_matrix_complex_view_array((double*)bp,ar,ac);
378 int s;
379 gsl_permutation * p = gsl_permutation_alloc (ar);
380 CHECK(!p,MEM);
381 CHECK(gsl_matrix_complex_memcpy(M(LU),M(a)),MEM);
382 int res;
383 res = gsl_linalg_complex_LU_decomp(M(LU), p, &s);
384 CHECK(res,res);
385 ((double*)bp)[2*ar*ar] = s;
386 ((double*)bp)[2*ar*ar+1] = 0;
387 int k;
388 for (k=0; k<ar; k++) {
389 ((double*)bp)[2*ar*ar+2*k+2] = gsl_permutation_get(p,k);
390 ((double*)bp)[2*ar*ar+2*k+2+1] = 0;
391 }
392 gsl_permutation_free(p);
393 OK
394}
395
396int svd(KRMAT(a),RMAT(u), RVEC(s),RMAT(v)) {
397 REQUIRES(ar==ur && ac==uc && ac==sn && ac==vr && ac==vc,BAD_SIZE);
398 DEBUGMSG("svd");
399 KDMVIEW(a);
400 DMVIEW(u);
401 DVVIEW(s);
402 DMVIEW(v);
403 gsl_vector *workv = gsl_vector_alloc(ac);
404 CHECK(!workv,MEM);
405 gsl_matrix *workm = gsl_matrix_alloc(ac,ac);
406 CHECK(!workm,MEM);
407 CHECK(gsl_matrix_memcpy(M(u),M(a)),MEM);
408 // int res = gsl_linalg_SV_decomp_jacobi (&U.matrix, &V.matrix, &S.vector);
409 // doesn't work
410 //int res = gsl_linalg_SV_decomp (&U.matrix, &V.matrix, &S.vector, workv);
411 int res = gsl_linalg_SV_decomp_mod (M(u), workm, M(v), V(s), workv);
412 CHECK(res,res);
413 //gsl_matrix_transpose(M(v));
414 gsl_vector_free(workv);
415 gsl_matrix_free(workm);
416 OK
417}
418
419
420// for real symmetric matrices
421int eigensystemR(KRMAT(x),RVEC(l),RMAT(v)) {
422 REQUIRES(xr==xc && xr==ln && xr==vr && vr==vc,BAD_SIZE);
423 DEBUGMSG("eigensystemR (gsl_eigen_symmv)");
424 KDMVIEW(x);
425 DVVIEW(l);
426 DMVIEW(v);
427 gsl_matrix *XC = gsl_matrix_alloc(xr,xr);
428 gsl_matrix_memcpy(XC,M(x)); // needed because the argument is destroyed
429 // many thanks to Nico Mahlo for the bug report
430 gsl_eigen_symmv_workspace * w = gsl_eigen_symmv_alloc (xc);
431 int res = gsl_eigen_symmv (XC, V(l), M(v), w);
432 CHECK(res,res);
433 gsl_eigen_symmv_free (w);
434 gsl_matrix_free(XC);
435 gsl_eigen_symmv_sort (V(l), M(v), GSL_EIGEN_SORT_ABS_DESC);
436 OK
437}
438
439// for hermitian matrices
440int eigensystemC(KCMAT(x),RVEC(l),CMAT(v)) {
441 REQUIRES(xr==xc && xr==ln && xr==vr && vr==vc,BAD_SIZE);
442 DEBUGMSG("eigensystemC");
443 KCMVIEW(x);
444 DVVIEW(l);
445 CMVIEW(v);
446 gsl_matrix_complex *XC = gsl_matrix_complex_alloc(xr,xr);
447 gsl_matrix_complex_memcpy(XC,M(x)); // again needed because the argument is destroyed
448 gsl_eigen_hermv_workspace * w = gsl_eigen_hermv_alloc (xc);
449 int res = gsl_eigen_hermv (XC, V(l), M(v), w);
450 CHECK(res,res);
451 gsl_eigen_hermv_free (w);
452 gsl_matrix_complex_free(XC);
453 gsl_eigen_hermv_sort (V(l), M(v), GSL_EIGEN_SORT_ABS_DESC);
454 OK
455}
456
457int QR(KRMAT(x),RMAT(q),RMAT(r)) {
458 REQUIRES(xr==rr && xc==rc && qr==qc && xr==qr,BAD_SIZE);
459 DEBUGMSG("QR");
460 KDMVIEW(x);
461 DMVIEW(q);
462 DMVIEW(r);
463 gsl_matrix * a = gsl_matrix_alloc(xr,xc);
464 gsl_vector * tau = gsl_vector_alloc(MIN(xr,xc));
465 gsl_matrix_memcpy(a,M(x));
466 int res = gsl_linalg_QR_decomp(a,tau);
467 CHECK(res,res);
468 gsl_linalg_QR_unpack(a,tau,M(q),M(r));
469 gsl_vector_free(tau);
470 gsl_matrix_free(a);
471 OK
472}
473
474int cholR(KRMAT(x),RMAT(l)) {
475 REQUIRES(xr==xc && lr==xr && lr==lc,BAD_SIZE);
476 DEBUGMSG("cholR");
477 KDMVIEW(x);
478 DMVIEW(l);
479 gsl_matrix_memcpy(M(l),M(x));
480 int res = gsl_linalg_cholesky_decomp(M(l));
481 CHECK(res,res);
482 int r,c;
483 for (r=0; r<xr-1; r++) {
484 for(c=r+1; c<xc; c++) {
485 lp[r*lc+c] = 0.;
486 }
487 }
488 OK
489}
490
491int cholC(KCMAT(x),CMAT(l)) {
492 REQUIRES(xr==xc && lr==xr && lr==lc,BAD_SIZE);
493 DEBUGMSG("cholC");
494 KCMVIEW(x);
495 CMVIEW(l);
496 gsl_matrix_complex_memcpy(M(l),M(x));
497 int res = 0; // gsl_linalg_complex_cholesky_decomp(M(l));
498 CHECK(res,res);
499 gsl_complex zero = {0.,0.};
500 int r,c;
501 for (r=0; r<xr-1; r++) {
502 for(c=r+1; c<xc; c++) {
503 lp[r*lc+c] = zero;
504 }
505 }
506 OK
507}
508
509int fft(int code, KCVEC(X), CVEC(R)) {
510 REQUIRES(Xn == Rn,BAD_SIZE);
511 DEBUGMSG("fft");
512 int s = Xn;
513 gsl_fft_complex_wavetable * wavetable = gsl_fft_complex_wavetable_alloc (s);
514 gsl_fft_complex_workspace * workspace = gsl_fft_complex_workspace_alloc (s);
515 gsl_vector_const_view X = gsl_vector_const_view_array((double*)Xp, 2*Xn);
516 gsl_vector_view R = gsl_vector_view_array((double*)Rp, 2*Rn);
517 gsl_blas_dcopy(&X.vector,&R.vector);
518 if(code==0) {
519 gsl_fft_complex_forward ((double*)Rp, 1, s, wavetable, workspace);
520 } else {
521 gsl_fft_complex_inverse ((double*)Rp, 1, s, wavetable, workspace);
522 }
523 gsl_fft_complex_wavetable_free (wavetable);
524 gsl_fft_complex_workspace_free (workspace);
525 OK
526}
527
528
529int integrate_qng(double f(double, void*), double a, double b, double prec,
530 double *result, double*error) {
531 DEBUGMSG("integrate_qng");
532 gsl_function F;
533 F.function = f;
534 F.params = NULL;
535 size_t neval;
536 int res = gsl_integration_qng (&F, a,b, 0, prec, result, error, &neval);
537 CHECK(res,res);
538 OK
539}
540
541int integrate_qags(double f(double,void*), double a, double b, double prec, int w,
542 double *result, double* error) {
543 DEBUGMSG("integrate_qags");
544 gsl_integration_workspace * wk = gsl_integration_workspace_alloc (w);
545 gsl_function F;
546 F.function = f;
547 F.params = NULL;
548 int res = gsl_integration_qags (&F, a,b, 0, prec, w,wk, result, error);
549 CHECK(res,res);
550 gsl_integration_workspace_free (wk);
551 OK
552}
553
554int polySolve(KRVEC(a), CVEC(z)) {
555 DEBUGMSG("polySolve");
556 REQUIRES(an>1,BAD_SIZE);
557 gsl_poly_complex_workspace * w = gsl_poly_complex_workspace_alloc (an);
558 int res = gsl_poly_complex_solve ((double*)ap, an, w, (double*)zp);
559 CHECK(res,res);
560 gsl_poly_complex_workspace_free (w);
561 OK;
562}
563
564int matrix_fscanf(char*filename, RMAT(a)) {
565 DEBUGMSG("gsl_matrix_fscanf");
566 //printf(filename); printf("\n");
567 DMVIEW(a);
568 FILE * f = fopen(filename,"r");
569 CHECK(!f,BAD_FILE);
570 int res = gsl_matrix_fscanf(f, M(a));
571 CHECK(res,res);
572 fclose (f);
573 OK
574}
575
576//---------------------------------------------------------------
577
578typedef double Trawfun(int, double*);
579
580double only_f_aux_min(const gsl_vector*x, void *pars) {
581 Trawfun * f = (Trawfun*) pars;
582 double* p = (double*)calloc(x->size,sizeof(double));
583 int k;
584 for(k=0;k<x->size;k++) {
585 p[k] = gsl_vector_get(x,k);
586 }
587 double res = f(x->size,p);
588 free(p);
589 return res;
590}
591
592// this version returns info about intermediate steps
593int minimize(double f(int, double*), double tolsize, int maxit,
594 KRVEC(xi), KRVEC(sz), RMAT(sol)) {
595 REQUIRES(xin==szn && solr == maxit && solc == 3+xin,BAD_SIZE);
596 DEBUGMSG("minimizeList (nmsimplex)");
597 gsl_multimin_function my_func;
598 // extract function from pars
599 my_func.f = only_f_aux_min;
600 my_func.n = xin;
601 my_func.params = f;
602 size_t iter = 0;
603 int status;
604 double size;
605 const gsl_multimin_fminimizer_type *T;
606 gsl_multimin_fminimizer *s = NULL;
607 // Initial vertex size vector
608 KDVVIEW(sz);
609 // Starting point
610 KDVVIEW(xi);
611 // Minimizer nmsimplex, without derivatives
612 T = gsl_multimin_fminimizer_nmsimplex;
613 s = gsl_multimin_fminimizer_alloc (T, my_func.n);
614 gsl_multimin_fminimizer_set (s, &my_func, V(xi), V(sz));
615 do {
616 status = gsl_multimin_fminimizer_iterate (s);
617 size = gsl_multimin_fminimizer_size (s);
618
619 solp[iter*solc+0] = iter;
620 solp[iter*solc+1] = s->fval;
621 solp[iter*solc+2] = size;
622
623 int k;
624 for(k=0;k<xin;k++) {
625 solp[iter*solc+k+3] = gsl_vector_get(s->x,k);
626 }
627 status = gsl_multimin_test_size (size, tolsize);
628 iter++;
629 } while (status == GSL_CONTINUE && iter < maxit);
630 int i,j;
631 for (i=iter; i<solr; i++) {
632 solp[i*solc+0] = iter;
633 for(j=1;j<solc;j++) {
634 solp[i*solc+j]=0.;
635 }
636 }
637 gsl_multimin_fminimizer_free(s);
638 OK
639}
640
641// working with the gradient
642
643typedef struct {double (*f)(int, double*); void (*df)(int, double*, double*);} Tfdf;
644
645double f_aux_min(const gsl_vector*x, void *pars) {
646 Tfdf * fdf = ((Tfdf*) pars);
647 double* p = (double*)calloc(x->size,sizeof(double));
648 int k;
649 for(k=0;k<x->size;k++) {
650 p[k] = gsl_vector_get(x,k);
651 }
652 double res = fdf->f(x->size,p);
653 free(p);
654 return res;
655}
656
657
658void df_aux_min(const gsl_vector * x, void * pars, gsl_vector * g) {
659 Tfdf * fdf = ((Tfdf*) pars);
660 double* p = (double*)calloc(x->size,sizeof(double));
661 double* q = (double*)calloc(x->size,sizeof(double));
662 int k;
663 for(k=0;k<x->size;k++) {
664 p[k] = gsl_vector_get(x,k);
665 }
666
667 fdf->df(x->size,p,q);
668
669 for(k=0;k<x->size;k++) {
670 gsl_vector_set(g,k,q[k]);
671 }
672 free(p);
673 free(q);
674}
675
676void fdf_aux_min(const gsl_vector * x, void * pars, double * f, gsl_vector * g) {
677 *f = f_aux_min(x,pars);
678 df_aux_min(x,pars,g);
679}
680
681// conjugate gradient
682int minimizeWithDeriv(double f(int, double*), void df(int, double*, double*),
683 double initstep, double minimpar, double tolgrad, int maxit,
684 KRVEC(xi), RMAT(sol)) {
685 REQUIRES(solr == maxit && solc == 2+xin,BAD_SIZE);
686 DEBUGMSG("minimizeWithDeriv (conjugate_fr)");
687 gsl_multimin_function_fdf my_func;
688 // extract function from pars
689 my_func.f = f_aux_min;
690 my_func.df = df_aux_min;
691 my_func.fdf = fdf_aux_min;
692 my_func.n = xin;
693 Tfdf stfdf;
694 stfdf.f = f;
695 stfdf.df = df;
696 my_func.params = &stfdf;
697 size_t iter = 0;
698 int status;
699 const gsl_multimin_fdfminimizer_type *T;
700 gsl_multimin_fdfminimizer *s = NULL;
701 // Starting point
702 KDVVIEW(xi);
703 // conjugate gradient fr
704 T = gsl_multimin_fdfminimizer_conjugate_fr;
705 s = gsl_multimin_fdfminimizer_alloc (T, my_func.n);
706 gsl_multimin_fdfminimizer_set (s, &my_func, V(xi), initstep, minimpar);
707 do {
708 status = gsl_multimin_fdfminimizer_iterate (s);
709 solp[iter*solc+0] = iter;
710 solp[iter*solc+1] = s->f;
711 int k;
712 for(k=0;k<xin;k++) {
713 solp[iter*solc+k+2] = gsl_vector_get(s->x,k);
714 }
715 status = gsl_multimin_test_gradient (s->gradient, tolgrad);
716 iter++;
717 } while (status == GSL_CONTINUE && iter < maxit);
718 int i,j;
719 for (i=iter; i<solr; i++) {
720 solp[i*solc+0] = iter;
721 for(j=1;j<solc;j++) {
722 solp[i*solc+j]=0.;
723 }
724 }
725 gsl_multimin_fdfminimizer_free(s);
726 OK
727}
728
729
730int deriv(int code, double f(double, void*), double x, double h, double * result, double * abserr)
731{
732 gsl_function F;
733 F.function = f;
734 F.params = 0;
735
736 if(code==0) return gsl_deriv_central (&F, x, h, result, abserr);
737
738 if(code==1) return gsl_deriv_forward (&F, x, h, result, abserr);
739
740 if(code==2) return gsl_deriv_backward (&F, x, h, result, abserr);
741
742 return 0;
743}
diff --git a/lib/Numeric/GSL/gsl-aux.h b/lib/Numeric/GSL/gsl-aux.h
new file mode 100644
index 0000000..3ccac25
--- /dev/null
+++ b/lib/Numeric/GSL/gsl-aux.h
@@ -0,0 +1,62 @@
1#include <gsl/gsl_complex.h>
2
3#define RVEC(A) int A##n, double*A##p
4#define RMAT(A) int A##r, int A##c, double* A##p
5#define KRVEC(A) int A##n, const double*A##p
6#define KRMAT(A) int A##r, int A##c, const double* A##p
7
8#define CVEC(A) int A##n, gsl_complex*A##p
9#define CMAT(A) int A##r, int A##c, gsl_complex* A##p
10#define KCVEC(A) int A##n, const gsl_complex*A##p
11#define KCMAT(A) int A##r, int A##c, const gsl_complex* A##p
12
13void no_abort_on_error();
14
15int toScalarR(int code, KRVEC(x), RVEC(r));
16/* norm2, absdif, maximum, posmax, etc. */
17
18int mapR(int code, KRVEC(x), RVEC(r));
19int mapC(int code, KCVEC(x), CVEC(r));
20/* sin cos tan etc. */
21
22int mapValR(int code, double*, KRVEC(x), RVEC(r));
23int mapValC(int code, gsl_complex*, KCVEC(x), CVEC(r));
24
25int zipR(int code, KRVEC(a), KRVEC(b), RVEC(r));
26int zipC(int code, KCVEC(a), KCVEC(b), CVEC(r));
27
28
29int luSolveR(KRMAT(a),KRMAT(b),RMAT(r));
30int luSolveC(KCMAT(a),KCMAT(b),CMAT(r));
31int luRaux(KRMAT(a),RVEC(b));
32int luCaux(KCMAT(a),CVEC(b));
33
34int svd(KRMAT(x),RMAT(u), RVEC(s),RMAT(v));
35
36int eigensystemR(KRMAT(x),RVEC(l),RMAT(v));
37int eigensystemC(KCMAT(x),RVEC(l),CMAT(v));
38
39int QR(KRMAT(x),RMAT(q),RMAT(r));
40
41int cholR(KRMAT(x),RMAT(l));
42
43int cholC(KCMAT(x),CMAT(l));
44
45int fft(int code, KCVEC(a), CVEC(b));
46
47int integrate_qng(double f(double, void*), double a, double b, double prec,
48 double *result, double*error);
49
50int integrate_qags(double f(double,void*), double a, double b, double prec, int w,
51 double *result, double* error);
52
53int polySolve(KRVEC(a), CVEC(z));
54
55int minimize(double f(int, double*), double tolsize, int maxit,
56 KRVEC(xi), KRVEC(sz), RMAT(sol));
57
58int minimizeWithDeriv(double f(int, double*), void df(int, double*, double*),
59 double initstep, double minimpar, double tolgrad, int maxit,
60 KRVEC(xi), RMAT(sol));
61
62int deriv(int code, double f(double, void*), double x, double h, double * result, double * abserr);