module Numeric.GSL.Special.Elljac(
elljac_e
) where
import System.IO.Unsafe
import Foreign.Ptr
import Foreign.Storable
import Foreign.Marshal
import Foreign.C.Types
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