summaryrefslogtreecommitdiff
path: root/packages/special/lib/Numeric/GSL/Special/Pow_int.hs
blob: 08fd4973239745f6e8f58bfd2375c2899e1fc1f8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
------------------------------------------------------------
-- |
-- Module      :  Numeric.GSL.Special.Pow_int
-- Copyright   :  (c) Alberto Ruiz 2006-11
-- License     :  GPL
-- Maintainer  :  Alberto Ruiz (aruiz at um dot es)
-- Stability   :  provisional
-- Portability :  uses ffi
--
-- Wrappers for selected functions described at:
--
-- <http://www.google.com/search?q=gsl_sf_pow_int.h&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
------------------------------------------------------------

module Numeric.GSL.Special.Pow_int(
  pow_int_e
, pow_int
) where

import Foreign(Ptr)
import Foreign.C.Types
import Numeric.GSL.Special.Internal

pow_int_e :: Double -> CInt -> (Double,Double)
pow_int_e x n = createSFR "pow_int_e" $ gsl_sf_pow_int_e x n
foreign import ccall SAFE_CHEAP "gsl_sf_pow_int_e" gsl_sf_pow_int_e :: Double -> CInt -> Ptr () -> IO CInt

pow_int :: Double -> CInt -> Double
pow_int = gsl_sf_pow_int
foreign import ccall SAFE_CHEAP "gsl_sf_pow_int" gsl_sf_pow_int :: Double -> CInt -> Double