summaryrefslogtreecommitdiff
path: root/lib/GSL/Special/Exp.hs
diff options
context:
space:
mode:
authorAlberto Ruiz <aruiz@um.es>2007-07-28 18:35:00 +0000
committerAlberto Ruiz <aruiz@um.es>2007-07-28 18:35:00 +0000
commit8731b5e093e0014472e870bf5166e2d074d206c1 (patch)
tree76c49133991b25e6587d617185236a8c789e7023 /lib/GSL/Special/Exp.hs
parent774924233c87a20c31a3232cbd01d9bf5170a951 (diff)
GSL.Special.Exp.hs
Diffstat (limited to 'lib/GSL/Special/Exp.hs')
-rw-r--r--lib/GSL/Special/Exp.hs129
1 files changed, 129 insertions, 0 deletions
diff --git a/lib/GSL/Special/Exp.hs b/lib/GSL/Special/Exp.hs
new file mode 100644
index 0000000..8c3e5b8
--- /dev/null
+++ b/lib/GSL/Special/Exp.hs
@@ -0,0 +1,129 @@
1------------------------------------------------------------
2{- |
3Module : 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 GSL.Special.Exp(
18 exp_e
19, 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 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)