diff options
author | Alberto Ruiz <aruiz@um.es> | 2007-07-29 15:43:21 +0000 |
---|---|---|
committer | Alberto Ruiz <aruiz@um.es> | 2007-07-29 15:43:21 +0000 |
commit | b9db4d25d87cd4ab0f493413db92fb41b7eacda9 (patch) | |
tree | a447fe6f7e16b3768e912064a033ce257040720e /lib/GSL/Special/Pow_int.hs | |
parent | b1b908c10ad7a393200651b4b23fc0b26efbc1b9 (diff) |
more automatic wrappers for simple special functions
Diffstat (limited to 'lib/GSL/Special/Pow_int.hs')
-rw-r--r-- | lib/GSL/Special/Pow_int.hs | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/lib/GSL/Special/Pow_int.hs b/lib/GSL/Special/Pow_int.hs new file mode 100644 index 0000000..3585db4 --- /dev/null +++ b/lib/GSL/Special/Pow_int.hs | |||
@@ -0,0 +1,31 @@ | |||
1 | ------------------------------------------------------------ | ||
2 | {- | | ||
3 | Module : GSL.Special.Pow_int | ||
4 | Copyright : (c) Alberto Ruiz 2006 | ||
5 | License : GPL-style | ||
6 | Maintainer : Alberto Ruiz (aruiz at um dot es) | ||
7 | Stability : provisional | ||
8 | Portability : uses ffi | ||
9 | |||
10 | |||
11 | |||
12 | -} | ||
13 | ------------------------------------------------------------ | ||
14 | |||
15 | module GSL.Special.Pow_int( | ||
16 | pow_int_e | ||
17 | , pow_int | ||
18 | ) where | ||
19 | |||
20 | import Foreign(Ptr) | ||
21 | import GSL.Special.Internal | ||
22 | |||
23 | -- | wrapper for int gsl_sf_pow_int_e(double x,int n,gsl_sf_result* result); | ||
24 | pow_int_e :: Double -> Int -> (Double,Double) | ||
25 | pow_int_e x n = createSFR "pow_int_e" $ gsl_sf_pow_int_e x n | ||
26 | foreign import ccall "pow_int.h gsl_sf_pow_int_e" gsl_sf_pow_int_e :: Double -> Int -> Ptr Double -> IO(Int) | ||
27 | |||
28 | -- | wrapper for double gsl_sf_pow_int(double x,int n); | ||
29 | pow_int :: Double -> Int -> Double | ||
30 | pow_int = gsl_sf_pow_int | ||
31 | foreign import ccall "pow_int.h gsl_sf_pow_int" gsl_sf_pow_int :: Double -> Int -> Double | ||