summaryrefslogtreecommitdiff
path: root/lib/GSL/Special/Log.hs
diff options
context:
space:
mode:
authorAlberto Ruiz <aruiz@um.es>2007-07-29 15:43:21 +0000
committerAlberto Ruiz <aruiz@um.es>2007-07-29 15:43:21 +0000
commitb9db4d25d87cd4ab0f493413db92fb41b7eacda9 (patch)
treea447fe6f7e16b3768e912064a033ce257040720e /lib/GSL/Special/Log.hs
parentb1b908c10ad7a393200651b4b23fc0b26efbc1b9 (diff)
more automatic wrappers for simple special functions
Diffstat (limited to 'lib/GSL/Special/Log.hs')
-rw-r--r--lib/GSL/Special/Log.hs72
1 files changed, 72 insertions, 0 deletions
diff --git a/lib/GSL/Special/Log.hs b/lib/GSL/Special/Log.hs
new file mode 100644
index 0000000..9fd51a8
--- /dev/null
+++ b/lib/GSL/Special/Log.hs
@@ -0,0 +1,72 @@
1------------------------------------------------------------
2{- |
3Module : GSL.Special.Log
4Copyright : (c) Alberto Ruiz 2006
5License : GPL-style
6Maintainer : Alberto Ruiz (aruiz at um dot es)
7Stability : provisional
8Portability : uses ffi
9
10
11
12-}
13------------------------------------------------------------
14
15module GSL.Special.Log(
16 log_e
17, 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 GSL.Special.Internal
28
29-- | wrapper for int gsl_sf_log_e(double x,gsl_sf_result* result);
30log_e :: Double -> (Double,Double)
31log_e x = createSFR "log_e" $ gsl_sf_log_e x
32foreign import ccall "log.h gsl_sf_log_e" gsl_sf_log_e :: Double -> Ptr Double -> IO(Int)
33
34-- | wrapper for double gsl_sf_log(double x);
35log :: Double -> Double
36log = gsl_sf_log
37foreign import ccall "log.h gsl_sf_log" gsl_sf_log :: Double -> Double
38
39-- | wrapper for int gsl_sf_log_abs_e(double x,gsl_sf_result* result);
40log_abs_e :: Double -> (Double,Double)
41log_abs_e x = createSFR "log_abs_e" $ gsl_sf_log_abs_e x
42foreign import ccall "log.h gsl_sf_log_abs_e" gsl_sf_log_abs_e :: Double -> Ptr Double -> IO(Int)
43
44-- | wrapper for double gsl_sf_log_abs(double x);
45log_abs :: Double -> Double
46log_abs = gsl_sf_log_abs
47foreign import ccall "log.h gsl_sf_log_abs" gsl_sf_log_abs :: Double -> Double
48
49-- | wrapper for int gsl_sf_complex_log_e(double zr,double zi,gsl_sf_result* lnr,gsl_sf_result* theta);
50complex_log_e :: Double -> Double -> Ptr Double -> (Double,Double)
51complex_log_e zr zi lnr = createSFR "complex_log_e" $ gsl_sf_complex_log_e zr zi lnr
52foreign import ccall "log.h gsl_sf_complex_log_e" gsl_sf_complex_log_e :: Double -> Double -> Ptr Double -> Ptr Double -> IO(Int)
53
54-- | wrapper for int gsl_sf_log_1plusx_e(double x,gsl_sf_result* result);
55log_1plusx_e :: Double -> (Double,Double)
56log_1plusx_e x = createSFR "log_1plusx_e" $ gsl_sf_log_1plusx_e x
57foreign import ccall "log.h gsl_sf_log_1plusx_e" gsl_sf_log_1plusx_e :: Double -> Ptr Double -> IO(Int)
58
59-- | wrapper for double gsl_sf_log_1plusx(double x);
60log_1plusx :: Double -> Double
61log_1plusx = gsl_sf_log_1plusx
62foreign import ccall "log.h gsl_sf_log_1plusx" gsl_sf_log_1plusx :: Double -> Double
63
64-- | wrapper for int gsl_sf_log_1plusx_mx_e(double x,gsl_sf_result* result);
65log_1plusx_mx_e :: Double -> (Double,Double)
66log_1plusx_mx_e x = createSFR "log_1plusx_mx_e" $ gsl_sf_log_1plusx_mx_e x
67foreign import ccall "log.h gsl_sf_log_1plusx_mx_e" gsl_sf_log_1plusx_mx_e :: Double -> Ptr Double -> IO(Int)
68
69-- | wrapper for double gsl_sf_log_1plusx_mx(double x);
70log_1plusx_mx :: Double -> Double
71log_1plusx_mx = gsl_sf_log_1plusx_mx
72foreign import ccall "log.h gsl_sf_log_1plusx_mx" gsl_sf_log_1plusx_mx :: Double -> Double