blob: 5b32cfeaf460ba064cfd71cbdad1d0756ee4b567 (
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
31
32
33
34
35
36
37
38
|
------------------------------------------------------------
-- |
-- Module : Numeric.GSL.Special.Elljac
-- Copyright : (c) Alberto Ruiz 2006
-- 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_elljac.h&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
------------------------------------------------------------
module Numeric.GSL.Special.Elljac(
elljac_e
) where
import Foreign
import Foreign.C.Types(CInt)
elljac_e :: Double -> Double -> (Double,Double,Double)
elljac_e u m = unsafePerformIO $ do
psn <- malloc
pcn <- malloc
pdn <- malloc
res <- gsl_sf_elljac_e u m psn pcn pdn
sn <- peek psn
cn <- peek pcn
dn <- peek pdn
free psn
free pcn
free pdn
if res == 0 then return (sn,cn,dn)
else error $ "error code "++show res++
" in elljac_e "++show u++" "++show m
foreign import ccall "gsl_sf_elljac_e" gsl_sf_elljac_e :: Double -> Double -> Ptr Double -> Ptr Double -> Ptr Double -> IO CInt
|