From b9db4d25d87cd4ab0f493413db92fb41b7eacda9 Mon Sep 17 00:00:00 2001 From: Alberto Ruiz Date: Sun, 29 Jul 2007 15:43:21 +0000 Subject: more automatic wrappers for simple special functions --- lib/GSL/Special/Lambert.hs | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 lib/GSL/Special/Lambert.hs (limited to 'lib/GSL/Special/Lambert.hs') diff --git a/lib/GSL/Special/Lambert.hs b/lib/GSL/Special/Lambert.hs new file mode 100644 index 0000000..ff4c75c --- /dev/null +++ b/lib/GSL/Special/Lambert.hs @@ -0,0 +1,43 @@ +------------------------------------------------------------ +{- | +Module : GSL.Special.Lambert +Copyright : (c) Alberto Ruiz 2006 +License : GPL-style +Maintainer : Alberto Ruiz (aruiz at um dot es) +Stability : provisional +Portability : uses ffi + + + +-} +------------------------------------------------------------ + +module GSL.Special.Lambert( + lambert_W0_e +, lambert_W0 +, lambert_Wm1_e +, lambert_Wm1 +) where + +import Foreign(Ptr) +import GSL.Special.Internal + +-- | wrapper for int gsl_sf_lambert_W0_e(double x,gsl_sf_result* result); +lambert_W0_e :: Double -> (Double,Double) +lambert_W0_e x = createSFR "lambert_W0_e" $ gsl_sf_lambert_W0_e x +foreign import ccall "lambert.h gsl_sf_lambert_W0_e" gsl_sf_lambert_W0_e :: Double -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_lambert_W0(double x); +lambert_W0 :: Double -> Double +lambert_W0 = gsl_sf_lambert_W0 +foreign import ccall "lambert.h gsl_sf_lambert_W0" gsl_sf_lambert_W0 :: Double -> Double + +-- | wrapper for int gsl_sf_lambert_Wm1_e(double x,gsl_sf_result* result); +lambert_Wm1_e :: Double -> (Double,Double) +lambert_Wm1_e x = createSFR "lambert_Wm1_e" $ gsl_sf_lambert_Wm1_e x +foreign import ccall "lambert.h gsl_sf_lambert_Wm1_e" gsl_sf_lambert_Wm1_e :: Double -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_lambert_Wm1(double x); +lambert_Wm1 :: Double -> Double +lambert_Wm1 = gsl_sf_lambert_Wm1 +foreign import ccall "lambert.h gsl_sf_lambert_Wm1" gsl_sf_lambert_Wm1 :: Double -> Double -- cgit v1.2.3