diff options
author | Alberto Ruiz <aruiz@um.es> | 2007-07-28 18:35:00 +0000 |
---|---|---|
committer | Alberto Ruiz <aruiz@um.es> | 2007-07-28 18:35:00 +0000 |
commit | 8731b5e093e0014472e870bf5166e2d074d206c1 (patch) | |
tree | 76c49133991b25e6587d617185236a8c789e7023 /lib/GSL/Special/Exp.hs | |
parent | 774924233c87a20c31a3232cbd01d9bf5170a951 (diff) |
GSL.Special.Exp.hs
Diffstat (limited to 'lib/GSL/Special/Exp.hs')
-rw-r--r-- | lib/GSL/Special/Exp.hs | 129 |
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 | {- | | ||
3 | Module : GSL.Special.Exp | ||
4 | Copyright : (c) Alberto Ruiz 2006 | ||
5 | License : GPL-style | ||
6 | Maintainer : Alberto Ruiz (aruiz at um dot es) | ||
7 | Stability : provisional | ||
8 | Portability : uses ffi | ||
9 | |||
10 | Wrappers for selected functions described at: | ||
11 | |||
12 | <http://www.gnu.org/software/gsl/manual/html_node/Exponential-Functions.html> | ||
13 | |||
14 | -} | ||
15 | ------------------------------------------------------------ | ||
16 | |||
17 | module 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 | |||
38 | import Foreign(Ptr) | ||
39 | import GSL.Special.Internal | ||
40 | |||
41 | -- | wrapper for int gsl_sf_exp_e(double x,gsl_sf_result* result); | ||
42 | exp_e :: Double -> (Double,Double) | ||
43 | exp_e x = createSFR "exp_e" $ gsl_sf_exp_e x | ||
44 | foreign 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); | ||
47 | exp :: Double -> Double | ||
48 | exp = gsl_sf_exp | ||
49 | foreign 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); | ||
52 | exp_e10_e :: Double -> (Double,Int,Double) | ||
53 | exp_e10_e x = createSFR_E10 "exp_e10_e" $ gsl_sf_exp_e10_e x | ||
54 | foreign 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); | ||
57 | exp_mult_e :: Double -> Double -> (Double,Double) | ||
58 | exp_mult_e x y = createSFR "exp_mult_e" $ gsl_sf_exp_mult_e x y | ||
59 | foreign 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); | ||
62 | exp_mult :: Double -> Double -> Double | ||
63 | exp_mult = gsl_sf_exp_mult | ||
64 | foreign 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); | ||
67 | exp_mult_e10_e :: Double -> Double -> (Double,Int,Double) | ||
68 | exp_mult_e10_e x y = createSFR_E10 "exp_mult_e10_e" $ gsl_sf_exp_mult_e10_e x y | ||
69 | foreign 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); | ||
72 | expm1_e :: Double -> (Double,Double) | ||
73 | expm1_e x = createSFR "expm1_e" $ gsl_sf_expm1_e x | ||
74 | foreign 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); | ||
77 | expm1 :: Double -> Double | ||
78 | expm1 = gsl_sf_expm1 | ||
79 | foreign 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); | ||
82 | exprel_e :: Double -> (Double,Double) | ||
83 | exprel_e x = createSFR "exprel_e" $ gsl_sf_exprel_e x | ||
84 | foreign 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); | ||
87 | exprel :: Double -> Double | ||
88 | exprel = gsl_sf_exprel | ||
89 | foreign 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); | ||
92 | exprel_2_e :: Double -> (Double,Double) | ||
93 | exprel_2_e x = createSFR "exprel_2_e" $ gsl_sf_exprel_2_e x | ||
94 | foreign 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); | ||
97 | exprel_2 :: Double -> Double | ||
98 | exprel_2 = gsl_sf_exprel_2 | ||
99 | foreign 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); | ||
102 | exprel_n_e :: Int -> Double -> (Double,Double) | ||
103 | exprel_n_e n x = createSFR "exprel_n_e" $ gsl_sf_exprel_n_e n x | ||
104 | foreign 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); | ||
107 | exprel_n :: Int -> Double -> Double | ||
108 | exprel_n = gsl_sf_exprel_n | ||
109 | foreign 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); | ||
112 | exp_err_e :: Double -> Double -> (Double,Double) | ||
113 | exp_err_e x dx = createSFR "exp_err_e" $ gsl_sf_exp_err_e x dx | ||
114 | foreign 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); | ||
117 | exp_err_e10_e :: Double -> Double -> (Double,Int,Double) | ||
118 | exp_err_e10_e x dx = createSFR_E10 "exp_err_e10_e" $ gsl_sf_exp_err_e10_e x dx | ||
119 | foreign 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); | ||
122 | exp_mult_err_e :: Double -> Double -> Double -> Double -> (Double,Double) | ||
123 | exp_mult_err_e x dx y dy = createSFR "exp_mult_err_e" $ gsl_sf_exp_mult_err_e x dx y dy | ||
124 | foreign 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); | ||
127 | exp_mult_err_e10_e :: Double -> Double -> Double -> Double -> (Double,Int,Double) | ||
128 | exp_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 | ||
129 | foreign 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) | ||