summaryrefslogtreecommitdiff
path: root/packages/special/lib/Numeric/GSL/Special/Log.hs
diff options
context:
space:
mode:
authorAlberto Ruiz <aruiz@um.es>2010-02-24 13:23:42 +0000
committerAlberto Ruiz <aruiz@um.es>2010-02-24 13:23:42 +0000
commit54bcc1fc1e0f9676cb10f627f412eeeea34b5d2c (patch)
tree3983a0046ce08a2390c5a495aae60fd419c58986 /packages/special/lib/Numeric/GSL/Special/Log.hs
parentaae45de54aca92c5f0f013e46c6d6f65508d76f5 (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.hs64
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
15module 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
26import Foreign(Ptr)
27import Foreign.C.Types(CInt)
28import Numeric.GSL.Special.Internal
29
30log_e :: Double -> (Double,Double)
31log_e x = createSFR "log_e" $ gsl_sf_log_e x
32foreign import ccall SAFE_CHEAP "gsl_sf_log_e" gsl_sf_log_e :: Double -> Ptr () -> IO CInt
33
34log :: Double -> Double
35log = gsl_sf_log
36foreign import ccall SAFE_CHEAP "gsl_sf_log" gsl_sf_log :: Double -> Double
37
38log_abs_e :: Double -> (Double,Double)
39log_abs_e x = createSFR "log_abs_e" $ gsl_sf_log_abs_e x
40foreign import ccall SAFE_CHEAP "gsl_sf_log_abs_e" gsl_sf_log_abs_e :: Double -> Ptr () -> IO CInt
41
42log_abs :: Double -> Double
43log_abs = gsl_sf_log_abs
44foreign import ccall SAFE_CHEAP "gsl_sf_log_abs" gsl_sf_log_abs :: Double -> Double
45
46complex_log_e :: Double -> Double -> Ptr () -> (Double,Double)
47complex_log_e zr zi lnr = createSFR "complex_log_e" $ gsl_sf_complex_log_e zr zi lnr
48foreign import ccall SAFE_CHEAP "gsl_sf_complex_log_e" gsl_sf_complex_log_e :: Double -> Double -> Ptr () -> Ptr () -> IO CInt
49
50log_1plusx_e :: Double -> (Double,Double)
51log_1plusx_e x = createSFR "log_1plusx_e" $ gsl_sf_log_1plusx_e x
52foreign import ccall SAFE_CHEAP "gsl_sf_log_1plusx_e" gsl_sf_log_1plusx_e :: Double -> Ptr () -> IO CInt
53
54log_1plusx :: Double -> Double
55log_1plusx = gsl_sf_log_1plusx
56foreign import ccall SAFE_CHEAP "gsl_sf_log_1plusx" gsl_sf_log_1plusx :: Double -> Double
57
58log_1plusx_mx_e :: Double -> (Double,Double)
59log_1plusx_mx_e x = createSFR "log_1plusx_mx_e" $ gsl_sf_log_1plusx_mx_e x
60foreign import ccall SAFE_CHEAP "gsl_sf_log_1plusx_mx_e" gsl_sf_log_1plusx_mx_e :: Double -> Ptr () -> IO CInt
61
62log_1plusx_mx :: Double -> Double
63log_1plusx_mx = gsl_sf_log_1plusx_mx
64foreign import ccall SAFE_CHEAP "gsl_sf_log_1plusx_mx" gsl_sf_log_1plusx_mx :: Double -> Double