diff options
Diffstat (limited to 'packages/special/lib/Numeric/GSL/Special/Exp.hs')
-rw-r--r-- | packages/special/lib/Numeric/GSL/Special/Exp.hs | 115 |
1 files changed, 115 insertions, 0 deletions
diff --git a/packages/special/lib/Numeric/GSL/Special/Exp.hs b/packages/special/lib/Numeric/GSL/Special/Exp.hs new file mode 100644 index 0000000..4f15964 --- /dev/null +++ b/packages/special/lib/Numeric/GSL/Special/Exp.hs | |||
@@ -0,0 +1,115 @@ | |||
1 | ------------------------------------------------------------ | ||
2 | -- | | ||
3 | -- Module : Numeric.GSL.Special.Exp | ||
4 | -- Copyright : (c) Alberto Ruiz 2006 | ||
5 | -- License : GPL | ||
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.google.com/search?q=gsl_sf_exp.h&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
13 | ------------------------------------------------------------ | ||
14 | |||
15 | module Numeric.GSL.Special.Exp( | ||
16 | exp_e | ||
17 | , Numeric.GSL.Special.Exp.exp | ||
18 | , exp_e10_e | ||
19 | , exp_mult_e | ||
20 | , exp_mult | ||
21 | , exp_mult_e10_e | ||
22 | , expm1_e | ||
23 | , expm1 | ||
24 | , exprel_e | ||
25 | , exprel | ||
26 | , exprel_2_e | ||
27 | , exprel_2 | ||
28 | , exprel_n_e | ||
29 | , exprel_n | ||
30 | -- , exprel_n_CF_e | ||
31 | , exp_err_e | ||
32 | , exp_err_e10_e | ||
33 | , exp_mult_err_e | ||
34 | , exp_mult_err_e10_e | ||
35 | ) where | ||
36 | |||
37 | import Foreign(Ptr) | ||
38 | import Foreign.C.Types(CInt) | ||
39 | import Numeric.GSL.Special.Internal | ||
40 | |||
41 | exp_e :: Double -> (Double,Double) | ||
42 | exp_e x = createSFR "exp_e" $ gsl_sf_exp_e x | ||
43 | foreign import ccall SAFE_CHEAP "gsl_sf_exp_e" gsl_sf_exp_e :: Double -> Ptr () -> IO CInt | ||
44 | |||
45 | exp :: Double -> Double | ||
46 | exp = gsl_sf_exp | ||
47 | foreign import ccall SAFE_CHEAP "gsl_sf_exp" gsl_sf_exp :: Double -> Double | ||
48 | |||
49 | exp_e10_e :: Double -> (Double,Int,Double) | ||
50 | exp_e10_e x = createSFR_E10 "exp_e10_e" $ gsl_sf_exp_e10_e x | ||
51 | foreign import ccall SAFE_CHEAP "gsl_sf_exp_e10_e" gsl_sf_exp_e10_e :: Double -> Ptr () -> IO CInt | ||
52 | |||
53 | exp_mult_e :: Double -> Double -> (Double,Double) | ||
54 | exp_mult_e x y = createSFR "exp_mult_e" $ gsl_sf_exp_mult_e x y | ||
55 | foreign import ccall SAFE_CHEAP "gsl_sf_exp_mult_e" gsl_sf_exp_mult_e :: Double -> Double -> Ptr () -> IO CInt | ||
56 | |||
57 | exp_mult :: Double -> Double -> Double | ||
58 | exp_mult = gsl_sf_exp_mult | ||
59 | foreign import ccall SAFE_CHEAP "gsl_sf_exp_mult" gsl_sf_exp_mult :: Double -> Double -> Double | ||
60 | |||
61 | exp_mult_e10_e :: Double -> Double -> (Double,Int,Double) | ||
62 | exp_mult_e10_e x y = createSFR_E10 "exp_mult_e10_e" $ gsl_sf_exp_mult_e10_e x y | ||
63 | foreign import ccall SAFE_CHEAP "gsl_sf_exp_mult_e10_e" gsl_sf_exp_mult_e10_e :: Double -> Double -> Ptr () -> IO CInt | ||
64 | |||
65 | expm1_e :: Double -> (Double,Double) | ||
66 | expm1_e x = createSFR "expm1_e" $ gsl_sf_expm1_e x | ||
67 | foreign import ccall SAFE_CHEAP "gsl_sf_expm1_e" gsl_sf_expm1_e :: Double -> Ptr () -> IO CInt | ||
68 | |||
69 | expm1 :: Double -> Double | ||
70 | expm1 = gsl_sf_expm1 | ||
71 | foreign import ccall SAFE_CHEAP "gsl_sf_expm1" gsl_sf_expm1 :: Double -> Double | ||
72 | |||
73 | exprel_e :: Double -> (Double,Double) | ||
74 | exprel_e x = createSFR "exprel_e" $ gsl_sf_exprel_e x | ||
75 | foreign import ccall SAFE_CHEAP "gsl_sf_exprel_e" gsl_sf_exprel_e :: Double -> Ptr () -> IO CInt | ||
76 | |||
77 | exprel :: Double -> Double | ||
78 | exprel = gsl_sf_exprel | ||
79 | foreign import ccall SAFE_CHEAP "gsl_sf_exprel" gsl_sf_exprel :: Double -> Double | ||
80 | |||
81 | exprel_2_e :: Double -> (Double,Double) | ||
82 | exprel_2_e x = createSFR "exprel_2_e" $ gsl_sf_exprel_2_e x | ||
83 | foreign import ccall SAFE_CHEAP "gsl_sf_exprel_2_e" gsl_sf_exprel_2_e :: Double -> Ptr () -> IO CInt | ||
84 | |||
85 | exprel_2 :: Double -> Double | ||
86 | exprel_2 = gsl_sf_exprel_2 | ||
87 | foreign import ccall SAFE_CHEAP "gsl_sf_exprel_2" gsl_sf_exprel_2 :: Double -> Double | ||
88 | |||
89 | exprel_n_e :: CInt -> Double -> (Double,Double) | ||
90 | exprel_n_e n x = createSFR "exprel_n_e" $ gsl_sf_exprel_n_e n x | ||
91 | foreign import ccall SAFE_CHEAP "gsl_sf_exprel_n_e" gsl_sf_exprel_n_e :: CInt -> Double -> Ptr () -> IO CInt | ||
92 | |||
93 | exprel_n :: CInt -> Double -> Double | ||
94 | exprel_n = gsl_sf_exprel_n | ||
95 | foreign import ccall SAFE_CHEAP "gsl_sf_exprel_n" gsl_sf_exprel_n :: CInt -> Double -> Double | ||
96 | |||
97 | exprel_n_CF_e :: Double -> Double -> (Double,Double) | ||
98 | exprel_n_CF_e n x = createSFR "exprel_n_CF_e" $ gsl_sf_exprel_n_CF_e n x | ||
99 | foreign import ccall SAFE_CHEAP "gsl_sf_exprel_n_CF_e" gsl_sf_exprel_n_CF_e :: Double -> Double -> Ptr () -> IO CInt | ||
100 | |||
101 | exp_err_e :: Double -> Double -> (Double,Double) | ||
102 | exp_err_e x dx = createSFR "exp_err_e" $ gsl_sf_exp_err_e x dx | ||
103 | foreign import ccall SAFE_CHEAP "gsl_sf_exp_err_e" gsl_sf_exp_err_e :: Double -> Double -> Ptr () -> IO CInt | ||
104 | |||
105 | exp_err_e10_e :: Double -> Double -> (Double,Int,Double) | ||
106 | exp_err_e10_e x dx = createSFR_E10 "exp_err_e10_e" $ gsl_sf_exp_err_e10_e x dx | ||
107 | foreign import ccall SAFE_CHEAP "gsl_sf_exp_err_e10_e" gsl_sf_exp_err_e10_e :: Double -> Double -> Ptr () -> IO CInt | ||
108 | |||
109 | exp_mult_err_e :: Double -> Double -> Double -> Double -> (Double,Double) | ||
110 | exp_mult_err_e x dx y dy = createSFR "exp_mult_err_e" $ gsl_sf_exp_mult_err_e x dx y dy | ||
111 | foreign import ccall SAFE_CHEAP "gsl_sf_exp_mult_err_e" gsl_sf_exp_mult_err_e :: Double -> Double -> Double -> Double -> Ptr () -> IO CInt | ||
112 | |||
113 | exp_mult_err_e10_e :: Double -> Double -> Double -> Double -> (Double,Int,Double) | ||
114 | 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 | ||
115 | foreign import ccall SAFE_CHEAP "gsl_sf_exp_mult_err_e10_e" gsl_sf_exp_mult_err_e10_e :: Double -> Double -> Double -> Double -> Ptr () -> IO CInt | ||