diff options
author | Alberto Ruiz <aruiz@um.es> | 2008-01-21 21:40:07 +0000 |
---|---|---|
committer | Alberto Ruiz <aruiz@um.es> | 2008-01-21 21:40:07 +0000 |
commit | 17749900a9146ddf6cd8ebf59dc35e56d6bff413 (patch) | |
tree | d352b7b155ebf650cd41a134aeb39450e54163b2 /lib/Numeric/GSL/Special/Exp.hs | |
parent | 4fb0006a2227d3d5293a53b88ef67ce6ebd73440 (diff) |
IO CInt results
Diffstat (limited to 'lib/Numeric/GSL/Special/Exp.hs')
-rw-r--r-- | lib/Numeric/GSL/Special/Exp.hs | 69 |
1 files changed, 53 insertions, 16 deletions
diff --git a/lib/Numeric/GSL/Special/Exp.hs b/lib/Numeric/GSL/Special/Exp.hs index 2787df4..52ec6df 100644 --- a/lib/Numeric/GSL/Special/Exp.hs +++ b/lib/Numeric/GSL/Special/Exp.hs | |||
@@ -9,7 +9,7 @@ Portability : uses ffi | |||
9 | 9 | ||
10 | Wrappers for selected functions described at: | 10 | Wrappers for selected functions described at: |
11 | 11 | ||
12 | <http://www.gnu.org/software/gsl/manual/html_node/Exponential-Functions.html> | 12 | <http://www.google.com/search?q=gsl_sf_exp.h&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> |
13 | 13 | ||
14 | -} | 14 | -} |
15 | ------------------------------------------------------------ | 15 | ------------------------------------------------------------ |
@@ -36,94 +36,131 @@ module Numeric.GSL.Special.Exp( | |||
36 | ) where | 36 | ) where |
37 | 37 | ||
38 | import Foreign(Ptr) | 38 | import Foreign(Ptr) |
39 | import Foreign.C.Types(CInt) | ||
39 | import Numeric.GSL.Special.Internal | 40 | import Numeric.GSL.Special.Internal |
40 | 41 | ||
41 | -- | wrapper for int gsl_sf_exp_e(double x,gsl_sf_result* result); | 42 | -- | wrapper for int gsl_sf_exp_e(double x,gsl_sf_result* result); |
43 | -- | ||
44 | -- <http://www.google.com/search?q=gsl_sf_exp_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
42 | exp_e :: Double -> (Double,Double) | 45 | exp_e :: Double -> (Double,Double) |
43 | exp_e x = createSFR "exp_e" $ gsl_sf_exp_e x | 46 | 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) | 47 | foreign import ccall "exp.h gsl_sf_exp_e" gsl_sf_exp_e :: Double -> Ptr () -> IO CInt |
45 | 48 | ||
46 | -- | wrapper for double gsl_sf_exp(double x); | 49 | -- | wrapper for double gsl_sf_exp(double x); |
50 | -- | ||
51 | -- <http://www.google.com/search?q=gsl_sf_exp&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
47 | exp :: Double -> Double | 52 | exp :: Double -> Double |
48 | exp = gsl_sf_exp | 53 | exp = gsl_sf_exp |
49 | foreign import ccall "exp.h gsl_sf_exp" gsl_sf_exp :: Double -> Double | 54 | foreign import ccall "exp.h gsl_sf_exp" gsl_sf_exp :: Double -> Double |
50 | 55 | ||
51 | -- | wrapper for int gsl_sf_exp_e10_e(double x,gsl_sf_result_e10* result); | 56 | -- | wrapper for int gsl_sf_exp_e10_e(double x,gsl_sf_result_e10* result); |
57 | -- | ||
58 | -- <http://www.google.com/search?q=gsl_sf_exp_e10_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
52 | exp_e10_e :: Double -> (Double,Int,Double) | 59 | exp_e10_e :: Double -> (Double,Int,Double) |
53 | exp_e10_e x = createSFR_E10 "exp_e10_e" $ gsl_sf_exp_e10_e x | 60 | 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) | 61 | foreign import ccall "exp.h gsl_sf_exp_e10_e" gsl_sf_exp_e10_e :: Double -> Ptr () -> IO CInt |
55 | 62 | ||
56 | -- | wrapper for int gsl_sf_exp_mult_e(double x,double y,gsl_sf_result* result); | 63 | -- | wrapper for int gsl_sf_exp_mult_e(double x,double y,gsl_sf_result* result); |
64 | -- | ||
65 | -- <http://www.google.com/search?q=gsl_sf_exp_mult_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
57 | exp_mult_e :: Double -> Double -> (Double,Double) | 66 | exp_mult_e :: Double -> Double -> (Double,Double) |
58 | exp_mult_e x y = createSFR "exp_mult_e" $ gsl_sf_exp_mult_e x y | 67 | 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) | 68 | foreign import ccall "exp.h gsl_sf_exp_mult_e" gsl_sf_exp_mult_e :: Double -> Double -> Ptr () -> IO CInt |
60 | 69 | ||
61 | -- | wrapper for double gsl_sf_exp_mult(double x,double y); | 70 | -- | wrapper for double gsl_sf_exp_mult(double x,double y); |
71 | -- | ||
72 | -- <http://www.google.com/search?q=gsl_sf_exp_mult&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
62 | exp_mult :: Double -> Double -> Double | 73 | exp_mult :: Double -> Double -> Double |
63 | exp_mult = gsl_sf_exp_mult | 74 | exp_mult = gsl_sf_exp_mult |
64 | foreign import ccall "exp.h gsl_sf_exp_mult" gsl_sf_exp_mult :: Double -> Double -> Double | 75 | foreign import ccall "exp.h gsl_sf_exp_mult" gsl_sf_exp_mult :: Double -> Double -> Double |
65 | 76 | ||
66 | -- | wrapper for int gsl_sf_exp_mult_e10_e(double x,double y,gsl_sf_result_e10* result); | 77 | -- | wrapper for int gsl_sf_exp_mult_e10_e(double x,double y,gsl_sf_result_e10* result); |
78 | -- | ||
79 | -- <http://www.google.com/search?q=gsl_sf_exp_mult_e10_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
67 | exp_mult_e10_e :: Double -> Double -> (Double,Int,Double) | 80 | 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 | 81 | 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) | 82 | foreign import ccall "exp.h gsl_sf_exp_mult_e10_e" gsl_sf_exp_mult_e10_e :: Double -> Double -> Ptr () -> IO CInt |
70 | 83 | ||
71 | -- | wrapper for int gsl_sf_expm1_e(double x,gsl_sf_result* result); | 84 | -- | wrapper for int gsl_sf_expm1_e(double x,gsl_sf_result* result); |
85 | -- | ||
86 | -- <http://www.google.com/search?q=gsl_sf_expm1_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
72 | expm1_e :: Double -> (Double,Double) | 87 | expm1_e :: Double -> (Double,Double) |
73 | expm1_e x = createSFR "expm1_e" $ gsl_sf_expm1_e x | 88 | 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) | 89 | foreign import ccall "exp.h gsl_sf_expm1_e" gsl_sf_expm1_e :: Double -> Ptr () -> IO CInt |
75 | 90 | ||
76 | -- | wrapper for double gsl_sf_expm1(double x); | 91 | -- | wrapper for double gsl_sf_expm1(double x); |
92 | -- | ||
93 | -- <http://www.google.com/search?q=gsl_sf_expm1&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
77 | expm1 :: Double -> Double | 94 | expm1 :: Double -> Double |
78 | expm1 = gsl_sf_expm1 | 95 | expm1 = gsl_sf_expm1 |
79 | foreign import ccall "exp.h gsl_sf_expm1" gsl_sf_expm1 :: Double -> Double | 96 | foreign import ccall "exp.h gsl_sf_expm1" gsl_sf_expm1 :: Double -> Double |
80 | 97 | ||
81 | -- | wrapper for int gsl_sf_exprel_e(double x,gsl_sf_result* result); | 98 | -- | wrapper for int gsl_sf_exprel_e(double x,gsl_sf_result* result); |
99 | -- | ||
100 | -- <http://www.google.com/search?q=gsl_sf_exprel_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
82 | exprel_e :: Double -> (Double,Double) | 101 | exprel_e :: Double -> (Double,Double) |
83 | exprel_e x = createSFR "exprel_e" $ gsl_sf_exprel_e x | 102 | 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) | 103 | foreign import ccall "exp.h gsl_sf_exprel_e" gsl_sf_exprel_e :: Double -> Ptr () -> IO CInt |
85 | 104 | ||
86 | -- | wrapper for double gsl_sf_exprel(double x); | 105 | -- | wrapper for double gsl_sf_exprel(double x); |
106 | -- | ||
107 | -- <http://www.google.com/search?q=gsl_sf_exprel&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
87 | exprel :: Double -> Double | 108 | exprel :: Double -> Double |
88 | exprel = gsl_sf_exprel | 109 | exprel = gsl_sf_exprel |
89 | foreign import ccall "exp.h gsl_sf_exprel" gsl_sf_exprel :: Double -> Double | 110 | foreign import ccall "exp.h gsl_sf_exprel" gsl_sf_exprel :: Double -> Double |
90 | 111 | ||
91 | -- | wrapper for int gsl_sf_exprel_2_e(double x,gsl_sf_result* result); | 112 | -- | wrapper for int gsl_sf_exprel_2_e(double x,gsl_sf_result* result); |
113 | -- | ||
114 | -- <http://www.google.com/search?q=gsl_sf_exprel_2_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
92 | exprel_2_e :: Double -> (Double,Double) | 115 | exprel_2_e :: Double -> (Double,Double) |
93 | exprel_2_e x = createSFR "exprel_2_e" $ gsl_sf_exprel_2_e x | 116 | 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) | 117 | foreign import ccall "exp.h gsl_sf_exprel_2_e" gsl_sf_exprel_2_e :: Double -> Ptr () -> IO CInt |
95 | 118 | ||
96 | -- | wrapper for double gsl_sf_exprel_2(double x); | 119 | -- | wrapper for double gsl_sf_exprel_2(double x); |
120 | -- | ||
121 | -- <http://www.google.com/search?q=gsl_sf_exprel_2&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
97 | exprel_2 :: Double -> Double | 122 | exprel_2 :: Double -> Double |
98 | exprel_2 = gsl_sf_exprel_2 | 123 | exprel_2 = gsl_sf_exprel_2 |
99 | foreign import ccall "exp.h gsl_sf_exprel_2" gsl_sf_exprel_2 :: Double -> Double | 124 | foreign import ccall "exp.h gsl_sf_exprel_2" gsl_sf_exprel_2 :: Double -> Double |
100 | 125 | ||
101 | -- | wrapper for int gsl_sf_exprel_n_e(int n,double x,gsl_sf_result* result); | 126 | -- | wrapper for int gsl_sf_exprel_n_e(int n,double x,gsl_sf_result* result); |
102 | exprel_n_e :: Int -> Double -> (Double,Double) | 127 | -- |
128 | -- <http://www.google.com/search?q=gsl_sf_exprel_n_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
129 | exprel_n_e :: CInt -> Double -> (Double,Double) | ||
103 | exprel_n_e n x = createSFR "exprel_n_e" $ gsl_sf_exprel_n_e n x | 130 | 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) | 131 | foreign import ccall "exp.h gsl_sf_exprel_n_e" gsl_sf_exprel_n_e :: CInt -> Double -> Ptr () -> IO CInt |
105 | 132 | ||
106 | -- | wrapper for double gsl_sf_exprel_n(int n,double x); | 133 | -- | wrapper for double gsl_sf_exprel_n(int n,double x); |
107 | exprel_n :: Int -> Double -> Double | 134 | -- |
135 | -- <http://www.google.com/search?q=gsl_sf_exprel_n&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
136 | exprel_n :: CInt -> Double -> Double | ||
108 | exprel_n = gsl_sf_exprel_n | 137 | exprel_n = gsl_sf_exprel_n |
109 | foreign import ccall "exp.h gsl_sf_exprel_n" gsl_sf_exprel_n :: Int -> Double -> Double | 138 | foreign import ccall "exp.h gsl_sf_exprel_n" gsl_sf_exprel_n :: CInt -> Double -> Double |
110 | 139 | ||
111 | -- | wrapper for int gsl_sf_exp_err_e(double x,double dx,gsl_sf_result* result); | 140 | -- | wrapper for int gsl_sf_exp_err_e(double x,double dx,gsl_sf_result* result); |
141 | -- | ||
142 | -- <http://www.google.com/search?q=gsl_sf_exp_err_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
112 | exp_err_e :: Double -> Double -> (Double,Double) | 143 | exp_err_e :: Double -> Double -> (Double,Double) |
113 | exp_err_e x dx = createSFR "exp_err_e" $ gsl_sf_exp_err_e x dx | 144 | 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) | 145 | foreign import ccall "exp.h gsl_sf_exp_err_e" gsl_sf_exp_err_e :: Double -> Double -> Ptr () -> IO CInt |
115 | 146 | ||
116 | -- | wrapper for int gsl_sf_exp_err_e10_e(double x,double dx,gsl_sf_result_e10* result); | 147 | -- | wrapper for int gsl_sf_exp_err_e10_e(double x,double dx,gsl_sf_result_e10* result); |
148 | -- | ||
149 | -- <http://www.google.com/search?q=gsl_sf_exp_err_e10_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
117 | exp_err_e10_e :: Double -> Double -> (Double,Int,Double) | 150 | 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 | 151 | 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) | 152 | foreign import ccall "exp.h gsl_sf_exp_err_e10_e" gsl_sf_exp_err_e10_e :: Double -> Double -> Ptr () -> IO CInt |
120 | 153 | ||
121 | -- | wrapper for int gsl_sf_exp_mult_err_e(double x,double dx,double y,double dy,gsl_sf_result* result); | 154 | -- | wrapper for int gsl_sf_exp_mult_err_e(double x,double dx,double y,double dy,gsl_sf_result* result); |
155 | -- | ||
156 | -- <http://www.google.com/search?q=gsl_sf_exp_mult_err_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
122 | exp_mult_err_e :: Double -> Double -> Double -> Double -> (Double,Double) | 157 | 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 | 158 | 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) | 159 | foreign import ccall "exp.h gsl_sf_exp_mult_err_e" gsl_sf_exp_mult_err_e :: Double -> Double -> Double -> Double -> Ptr () -> IO CInt |
125 | 160 | ||
126 | -- | wrapper for int gsl_sf_exp_mult_err_e10_e(double x,double dx,double y,double dy,gsl_sf_result_e10* result); | 161 | -- | wrapper for int gsl_sf_exp_mult_err_e10_e(double x,double dx,double y,double dy,gsl_sf_result_e10* result); |
162 | -- | ||
163 | -- <http://www.google.com/search?q=gsl_sf_exp_mult_err_e10_e&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
127 | exp_mult_err_e10_e :: Double -> Double -> Double -> Double -> (Double,Int,Double) | 164 | 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 | 165 | 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) | 166 | 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 CInt |