diff options
author | Alberto Ruiz <aruiz@um.es> | 2010-02-24 13:23:42 +0000 |
---|---|---|
committer | Alberto Ruiz <aruiz@um.es> | 2010-02-24 13:23:42 +0000 |
commit | 54bcc1fc1e0f9676cb10f627f412eeeea34b5d2c (patch) | |
tree | 3983a0046ce08a2390c5a495aae60fd419c58986 /packages/special/lib/Numeric/GSL/Special/Log.hs | |
parent | aae45de54aca92c5f0f013e46c6d6f65508d76f5 (diff) |
created package hmatrix-special
Diffstat (limited to 'packages/special/lib/Numeric/GSL/Special/Log.hs')
-rw-r--r-- | packages/special/lib/Numeric/GSL/Special/Log.hs | 64 |
1 files changed, 64 insertions, 0 deletions
diff --git a/packages/special/lib/Numeric/GSL/Special/Log.hs b/packages/special/lib/Numeric/GSL/Special/Log.hs new file mode 100644 index 0000000..a57b67a --- /dev/null +++ b/packages/special/lib/Numeric/GSL/Special/Log.hs | |||
@@ -0,0 +1,64 @@ | |||
1 | ------------------------------------------------------------ | ||
2 | -- | | ||
3 | -- Module : Numeric.GSL.Special.Log | ||
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_log.h&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky> | ||
13 | ------------------------------------------------------------ | ||
14 | |||
15 | module Numeric.GSL.Special.Log( | ||
16 | log_e | ||
17 | , Numeric.GSL.Special.Log.log | ||
18 | , log_abs_e | ||
19 | , log_abs | ||
20 | , log_1plusx_e | ||
21 | , log_1plusx | ||
22 | , log_1plusx_mx_e | ||
23 | , log_1plusx_mx | ||
24 | ) where | ||
25 | |||
26 | import Foreign(Ptr) | ||
27 | import Foreign.C.Types(CInt) | ||
28 | import Numeric.GSL.Special.Internal | ||
29 | |||
30 | log_e :: Double -> (Double,Double) | ||
31 | log_e x = createSFR "log_e" $ gsl_sf_log_e x | ||
32 | foreign import ccall SAFE_CHEAP "gsl_sf_log_e" gsl_sf_log_e :: Double -> Ptr () -> IO CInt | ||
33 | |||
34 | log :: Double -> Double | ||
35 | log = gsl_sf_log | ||
36 | foreign import ccall SAFE_CHEAP "gsl_sf_log" gsl_sf_log :: Double -> Double | ||
37 | |||
38 | log_abs_e :: Double -> (Double,Double) | ||
39 | log_abs_e x = createSFR "log_abs_e" $ gsl_sf_log_abs_e x | ||
40 | foreign import ccall SAFE_CHEAP "gsl_sf_log_abs_e" gsl_sf_log_abs_e :: Double -> Ptr () -> IO CInt | ||
41 | |||
42 | log_abs :: Double -> Double | ||
43 | log_abs = gsl_sf_log_abs | ||
44 | foreign import ccall SAFE_CHEAP "gsl_sf_log_abs" gsl_sf_log_abs :: Double -> Double | ||
45 | |||
46 | complex_log_e :: Double -> Double -> Ptr () -> (Double,Double) | ||
47 | complex_log_e zr zi lnr = createSFR "complex_log_e" $ gsl_sf_complex_log_e zr zi lnr | ||
48 | foreign import ccall SAFE_CHEAP "gsl_sf_complex_log_e" gsl_sf_complex_log_e :: Double -> Double -> Ptr () -> Ptr () -> IO CInt | ||
49 | |||
50 | log_1plusx_e :: Double -> (Double,Double) | ||
51 | log_1plusx_e x = createSFR "log_1plusx_e" $ gsl_sf_log_1plusx_e x | ||
52 | foreign import ccall SAFE_CHEAP "gsl_sf_log_1plusx_e" gsl_sf_log_1plusx_e :: Double -> Ptr () -> IO CInt | ||
53 | |||
54 | log_1plusx :: Double -> Double | ||
55 | log_1plusx = gsl_sf_log_1plusx | ||
56 | foreign import ccall SAFE_CHEAP "gsl_sf_log_1plusx" gsl_sf_log_1plusx :: Double -> Double | ||
57 | |||
58 | log_1plusx_mx_e :: Double -> (Double,Double) | ||
59 | log_1plusx_mx_e x = createSFR "log_1plusx_mx_e" $ gsl_sf_log_1plusx_mx_e x | ||
60 | foreign import ccall SAFE_CHEAP "gsl_sf_log_1plusx_mx_e" gsl_sf_log_1plusx_mx_e :: Double -> Ptr () -> IO CInt | ||
61 | |||
62 | log_1plusx_mx :: Double -> Double | ||
63 | log_1plusx_mx = gsl_sf_log_1plusx_mx | ||
64 | foreign import ccall SAFE_CHEAP "gsl_sf_log_1plusx_mx" gsl_sf_log_1plusx_mx :: Double -> Double | ||