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.hs | 63 +++++++++++++--- lib/GSL/Special/Clausen.hs | 31 ++++++++ lib/GSL/Special/Coulomb.hs | 79 ++++++++++++++++++++ lib/GSL/Special/Coupling.hs | 79 ++++++++++++++++++++ lib/GSL/Special/Dawson.hs | 31 ++++++++ lib/GSL/Special/Debye.hs | 67 +++++++++++++++++ lib/GSL/Special/Dilog.hs | 46 ++++++++++++ lib/GSL/Special/Elementary.hs | 37 ++++++++++ lib/GSL/Special/Ellint.hs | 139 +++++++++++++++++++++++++++++++++++ lib/GSL/Special/Expint.hs | 163 +++++++++++++++++++++++++++++++++++++++++ lib/GSL/Special/Fermi_dirac.hs | 127 ++++++++++++++++++++++++++++++++ lib/GSL/Special/Gegenbauer.hs | 72 ++++++++++++++++++ lib/GSL/Special/Hyperg.hs | 151 ++++++++++++++++++++++++++++++++++++++ lib/GSL/Special/Laguerre.hs | 67 +++++++++++++++++ lib/GSL/Special/Lambert.hs | 43 +++++++++++ lib/GSL/Special/Log.hs | 72 ++++++++++++++++++ lib/GSL/Special/Pow_int.hs | 31 ++++++++ lib/GSL/Special/Psi.hs | 91 +++++++++++++++++++++++ lib/GSL/Special/Synchrotron.hs | 43 +++++++++++ lib/GSL/Special/Trig.hs | 162 ++++++++++++++++++++++++++++++++++++++++ lib/GSL/Special/Zeta.hs | 103 ++++++++++++++++++++++++++ lib/GSL/Special/auto.hs | 35 +++++---- lib/GSL/Special/clausen.h | 2 + lib/GSL/Special/coulomb.h | 11 +++ lib/GSL/Special/coupling.h | 10 +++ lib/GSL/Special/dawson.h | 2 + lib/GSL/Special/debye.h | 8 ++ lib/GSL/Special/dilog.h | 5 ++ lib/GSL/Special/elementary.h | 3 + lib/GSL/Special/ellint.h | 20 +++++ lib/GSL/Special/expint.h | 24 ++++++ lib/GSL/Special/fermi_dirac.h | 18 +++++ lib/GSL/Special/gegenbauer.h | 9 +++ lib/GSL/Special/gsl_sf_exp.h | 146 ++++++++++++++++++++++++++++++++++++ lib/GSL/Special/gsl_sf_log.h | 90 +++++++++++++++++++++++ lib/GSL/Special/hyperg.h | 22 ++++++ lib/GSL/Special/laguerre.h | 8 ++ lib/GSL/Special/lambert.h | 4 + lib/GSL/Special/log.h | 9 +++ lib/GSL/Special/manual.txt | 10 +++ lib/GSL/Special/pow_int.h | 2 + lib/GSL/Special/psi.h | 12 +++ lib/GSL/Special/synchrotron.h | 4 + lib/GSL/Special/trig.h | 25 +++++++ lib/GSL/Special/zeta.h | 14 ++++ 45 files changed, 2167 insertions(+), 23 deletions(-) create mode 100644 lib/GSL/Special/Clausen.hs create mode 100644 lib/GSL/Special/Coulomb.hs create mode 100644 lib/GSL/Special/Coupling.hs create mode 100644 lib/GSL/Special/Dawson.hs create mode 100644 lib/GSL/Special/Debye.hs create mode 100644 lib/GSL/Special/Dilog.hs create mode 100644 lib/GSL/Special/Elementary.hs create mode 100644 lib/GSL/Special/Ellint.hs create mode 100644 lib/GSL/Special/Expint.hs create mode 100644 lib/GSL/Special/Fermi_dirac.hs create mode 100644 lib/GSL/Special/Gegenbauer.hs create mode 100644 lib/GSL/Special/Hyperg.hs create mode 100644 lib/GSL/Special/Laguerre.hs create mode 100644 lib/GSL/Special/Lambert.hs create mode 100644 lib/GSL/Special/Log.hs create mode 100644 lib/GSL/Special/Pow_int.hs create mode 100644 lib/GSL/Special/Psi.hs create mode 100644 lib/GSL/Special/Synchrotron.hs create mode 100644 lib/GSL/Special/Trig.hs create mode 100644 lib/GSL/Special/Zeta.hs create mode 100644 lib/GSL/Special/clausen.h create mode 100644 lib/GSL/Special/coulomb.h create mode 100644 lib/GSL/Special/coupling.h create mode 100644 lib/GSL/Special/dawson.h create mode 100644 lib/GSL/Special/debye.h create mode 100644 lib/GSL/Special/dilog.h create mode 100644 lib/GSL/Special/elementary.h create mode 100644 lib/GSL/Special/ellint.h create mode 100644 lib/GSL/Special/expint.h create mode 100644 lib/GSL/Special/fermi_dirac.h create mode 100644 lib/GSL/Special/gegenbauer.h create mode 100644 lib/GSL/Special/gsl_sf_exp.h create mode 100644 lib/GSL/Special/gsl_sf_log.h create mode 100644 lib/GSL/Special/hyperg.h create mode 100644 lib/GSL/Special/laguerre.h create mode 100644 lib/GSL/Special/lambert.h create mode 100644 lib/GSL/Special/log.h create mode 100644 lib/GSL/Special/manual.txt create mode 100644 lib/GSL/Special/pow_int.h create mode 100644 lib/GSL/Special/psi.h create mode 100644 lib/GSL/Special/synchrotron.h create mode 100644 lib/GSL/Special/trig.h create mode 100644 lib/GSL/Special/zeta.h (limited to 'lib/GSL') diff --git a/lib/GSL/Special.hs b/lib/GSL/Special.hs index 8124055..e9c1798 100644 --- a/lib/GSL/Special.hs +++ b/lib/GSL/Special.hs @@ -16,21 +16,64 @@ Wrappers for selected special functions. ----------------------------------------------------------------------------- module GSL.Special ( - module GSL.Special.Airy, - module GSL.Special.Bessel, - module GSL.Special.Erf, - module GSL.Special.Exp, - module GSL.Special.Gamma + module GSL.Special.Airy +, module GSL.Special.Bessel +, module GSL.Special.Clausen +, module GSL.Special.Coulomb +, module GSL.Special.Coupling +, module GSL.Special.Dawson +, module GSL.Special.Debye +, module GSL.Special.Dilog +, module GSL.Special.Elementary +, module GSL.Special.Ellint +, module GSL.Special.Erf +, module GSL.Special.Exp +, module GSL.Special.Expint +, module GSL.Special.Fermi_dirac +, module GSL.Special.Gamma +, module GSL.Special.Gegenbauer +, module GSL.Special.Hyperg +, module GSL.Special.Internal +, module GSL.Special.Laguerre +, module GSL.Special.Lambert +, module GSL.Special.Log +, module GSL.Special.Pow_int +, module GSL.Special.Psi +, module GSL.Special.Synchrotron +, module GSL.Special.Trig +, module GSL.Special.Zeta ) where import Foreign import GSL.Special.Internal -import GSL.Special.Gamma -import GSL.Special.Erf -import GSL.Special.Exp -import GSL.Special.Airy -import GSL.Special.Bessel +import GSL.Special.Airy hiding (Precision(..)) +import GSL.Special.Bessel +import GSL.Special.Clausen +import GSL.Special.Coulomb +import GSL.Special.Coupling +import GSL.Special.Dawson +import GSL.Special.Debye +import GSL.Special.Dilog +import GSL.Special.Elementary +import GSL.Special.Ellint +import GSL.Special.Erf +import GSL.Special.Exp +import GSL.Special.Expint +import GSL.Special.Fermi_dirac +import GSL.Special.Gamma +import GSL.Special.Gegenbauer +import GSL.Special.Hyperg +import GSL.Special.Internal +import GSL.Special.Laguerre +import GSL.Special.Lambert +import GSL.Special.Log +import GSL.Special.Pow_int +import GSL.Special.Psi +import GSL.Special.Synchrotron +import GSL.Special.Trig +import GSL.Special.Zeta + -------------------- simple functions -------------------------- diff --git a/lib/GSL/Special/Clausen.hs b/lib/GSL/Special/Clausen.hs new file mode 100644 index 0000000..9089499 --- /dev/null +++ b/lib/GSL/Special/Clausen.hs @@ -0,0 +1,31 @@ +------------------------------------------------------------ +{- | +Module : GSL.Special.Clausen +Copyright : (c) Alberto Ruiz 2006 +License : GPL-style +Maintainer : Alberto Ruiz (aruiz at um dot es) +Stability : provisional +Portability : uses ffi + + + +-} +------------------------------------------------------------ + +module GSL.Special.Clausen( + clausen_e +, clausen +) where + +import Foreign(Ptr) +import GSL.Special.Internal + +-- | wrapper for int gsl_sf_clausen_e(double x,gsl_sf_result* result); +clausen_e :: Double -> (Double,Double) +clausen_e x = createSFR "clausen_e" $ gsl_sf_clausen_e x +foreign import ccall "clausen.h gsl_sf_clausen_e" gsl_sf_clausen_e :: Double -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_clausen(double x); +clausen :: Double -> Double +clausen = gsl_sf_clausen +foreign import ccall "clausen.h gsl_sf_clausen" gsl_sf_clausen :: Double -> Double diff --git a/lib/GSL/Special/Coulomb.hs b/lib/GSL/Special/Coulomb.hs new file mode 100644 index 0000000..df3b8a4 --- /dev/null +++ b/lib/GSL/Special/Coulomb.hs @@ -0,0 +1,79 @@ +------------------------------------------------------------ +{- | +Module : GSL.Special.Coulomb +Copyright : (c) Alberto Ruiz 2006 +License : GPL-style +Maintainer : Alberto Ruiz (aruiz at um dot es) +Stability : provisional +Portability : uses ffi + + + +-} +------------------------------------------------------------ + +module GSL.Special.Coulomb( + hydrogenicR_1_e +, hydrogenicR_1 +, hydrogenicR_e +, hydrogenicR +, coulomb_CL_e +) where + +import Foreign(Ptr) +import GSL.Special.Internal + +-- | wrapper for int gsl_sf_hydrogenicR_1_e(double Z,double r,gsl_sf_result* result); +hydrogenicR_1_e :: Double -> Double -> (Double,Double) +hydrogenicR_1_e zZ r = createSFR "hydrogenicR_1_e" $ gsl_sf_hydrogenicR_1_e zZ r +foreign import ccall "coulomb.h gsl_sf_hydrogenicR_1_e" gsl_sf_hydrogenicR_1_e :: Double -> Double -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_hydrogenicR_1(double Z,double r); +hydrogenicR_1 :: Double -> Double -> Double +hydrogenicR_1 = gsl_sf_hydrogenicR_1 +foreign import ccall "coulomb.h gsl_sf_hydrogenicR_1" gsl_sf_hydrogenicR_1 :: Double -> Double -> Double + +-- | wrapper for int gsl_sf_hydrogenicR_e(int n,int l,double Z,double r,gsl_sf_result* result); +hydrogenicR_e :: Int -> Int -> Double -> Double -> (Double,Double) +hydrogenicR_e n l zZ r = createSFR "hydrogenicR_e" $ gsl_sf_hydrogenicR_e n l zZ r +foreign import ccall "coulomb.h gsl_sf_hydrogenicR_e" gsl_sf_hydrogenicR_e :: Int -> Int -> Double -> Double -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_hydrogenicR(int n,int l,double Z,double r); +hydrogenicR :: Int -> Int -> Double -> Double -> Double +hydrogenicR = gsl_sf_hydrogenicR +foreign import ccall "coulomb.h gsl_sf_hydrogenicR" gsl_sf_hydrogenicR :: Int -> Int -> Double -> Double -> Double + +-- | wrapper for int gsl_sf_coulomb_wave_FG_e(double eta,double x,double lam_F,int k_lam_G,gsl_sf_result* F,gsl_sf_result* Fp,gsl_sf_result* G,gsl_sf_result* Gp,double* exp_F,double* exp_G); +coulomb_wave_FG_e :: Double -> Double -> Double -> Int -> Ptr Double -> Ptr Double -> Ptr Double -> Ptr Double -> Ptr Double -> Ptr Double -> Int +coulomb_wave_FG_e = gsl_sf_coulomb_wave_FG_e +foreign import ccall "coulomb.h gsl_sf_coulomb_wave_FG_e" gsl_sf_coulomb_wave_FG_e :: Double -> Double -> Double -> Int -> Ptr Double -> Ptr Double -> Ptr Double -> Ptr Double -> Ptr Double -> Ptr Double -> Int + +-- | wrapper for int gsl_sf_coulomb_wave_F_array(double lam_min,int kmax,double eta,double x,double* fc_array,double* F_exponent); +coulomb_wave_F_array :: Double -> Int -> Double -> Double -> Ptr Double -> Ptr Double -> Int +coulomb_wave_F_array = gsl_sf_coulomb_wave_F_array +foreign import ccall "coulomb.h gsl_sf_coulomb_wave_F_array" gsl_sf_coulomb_wave_F_array :: Double -> Int -> Double -> Double -> Ptr Double -> Ptr Double -> Int + +-- | wrapper for int gsl_sf_coulomb_wave_FG_array(double lam_min,int kmax,double eta,double x,double* fc_array,double* gc_array,double* F_exponent,double* G_exponent); +coulomb_wave_FG_array :: Double -> Int -> Double -> Double -> Ptr Double -> Ptr Double -> Ptr Double -> Ptr Double -> Int +coulomb_wave_FG_array = gsl_sf_coulomb_wave_FG_array +foreign import ccall "coulomb.h gsl_sf_coulomb_wave_FG_array" gsl_sf_coulomb_wave_FG_array :: Double -> Int -> Double -> Double -> Ptr Double -> Ptr Double -> Ptr Double -> Ptr Double -> Int + +-- | wrapper for int gsl_sf_coulomb_wave_FGp_array(double lam_min,int kmax,double eta,double x,double* fc_array,double* fcp_array,double* gc_array,double* gcp_array,double* F_exponent,double* G_exponent); +coulomb_wave_FGp_array :: Double -> Int -> Double -> Double -> Ptr Double -> Ptr Double -> Ptr Double -> Ptr Double -> Ptr Double -> Ptr Double -> Int +coulomb_wave_FGp_array = gsl_sf_coulomb_wave_FGp_array +foreign import ccall "coulomb.h gsl_sf_coulomb_wave_FGp_array" gsl_sf_coulomb_wave_FGp_array :: Double -> Int -> Double -> Double -> Ptr Double -> Ptr Double -> Ptr Double -> Ptr Double -> Ptr Double -> Ptr Double -> Int + +-- | wrapper for int gsl_sf_coulomb_wave_sphF_array(double lam_min,int kmax,double eta,double x,double* fc_array,double* F_exponent); +coulomb_wave_sphF_array :: Double -> Int -> Double -> Double -> Ptr Double -> Ptr Double -> Int +coulomb_wave_sphF_array = gsl_sf_coulomb_wave_sphF_array +foreign import ccall "coulomb.h gsl_sf_coulomb_wave_sphF_array" gsl_sf_coulomb_wave_sphF_array :: Double -> Int -> Double -> Double -> Ptr Double -> Ptr Double -> Int + +-- | wrapper for int gsl_sf_coulomb_CL_e(double L,double eta,gsl_sf_result* result); +coulomb_CL_e :: Double -> Double -> (Double,Double) +coulomb_CL_e lL eta = createSFR "coulomb_CL_e" $ gsl_sf_coulomb_CL_e lL eta +foreign import ccall "coulomb.h gsl_sf_coulomb_CL_e" gsl_sf_coulomb_CL_e :: Double -> Double -> Ptr Double -> IO(Int) + +-- | wrapper for int gsl_sf_coulomb_CL_array(double Lmin,int kmax,double eta,double* cl); +coulomb_CL_array :: Double -> Int -> Double -> Ptr Double -> Int +coulomb_CL_array = gsl_sf_coulomb_CL_array +foreign import ccall "coulomb.h gsl_sf_coulomb_CL_array" gsl_sf_coulomb_CL_array :: Double -> Int -> Double -> Ptr Double -> Int diff --git a/lib/GSL/Special/Coupling.hs b/lib/GSL/Special/Coupling.hs new file mode 100644 index 0000000..e57108b --- /dev/null +++ b/lib/GSL/Special/Coupling.hs @@ -0,0 +1,79 @@ +------------------------------------------------------------ +{- | +Module : GSL.Special.Coupling +Copyright : (c) Alberto Ruiz 2006 +License : GPL-style +Maintainer : Alberto Ruiz (aruiz at um dot es) +Stability : provisional +Portability : uses ffi + + + +-} +------------------------------------------------------------ + +module GSL.Special.Coupling( + coupling_3j_e +, coupling_3j +, coupling_6j_e +, coupling_6j +, coupling_RacahW_e +, coupling_RacahW +, coupling_9j_e +, coupling_9j +-- , coupling_6j_INCORRECT_e +-- , coupling_6j_INCORRECT +) where + +import Foreign(Ptr) +import GSL.Special.Internal + +-- | wrapper for int gsl_sf_coupling_3j_e(int two_ja,int two_jb,int two_jc,int two_ma,int two_mb,int two_mc,gsl_sf_result* result); +coupling_3j_e :: Int -> Int -> Int -> Int -> Int -> Int -> (Double,Double) +coupling_3j_e two_ja two_jb two_jc two_ma two_mb two_mc = createSFR "coupling_3j_e" $ gsl_sf_coupling_3j_e two_ja two_jb two_jc two_ma two_mb two_mc +foreign import ccall "coupling.h gsl_sf_coupling_3j_e" gsl_sf_coupling_3j_e :: Int -> Int -> Int -> Int -> Int -> Int -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_coupling_3j(int two_ja,int two_jb,int two_jc,int two_ma,int two_mb,int two_mc); +coupling_3j :: Int -> Int -> Int -> Int -> Int -> Int -> Double +coupling_3j = gsl_sf_coupling_3j +foreign import ccall "coupling.h gsl_sf_coupling_3j" gsl_sf_coupling_3j :: Int -> Int -> Int -> Int -> Int -> Int -> Double + +-- | wrapper for int gsl_sf_coupling_6j_e(int two_ja,int two_jb,int two_jc,int two_jd,int two_je,int two_jf,gsl_sf_result* result); +coupling_6j_e :: Int -> Int -> Int -> Int -> Int -> Int -> (Double,Double) +coupling_6j_e two_ja two_jb two_jc two_jd two_je two_jf = createSFR "coupling_6j_e" $ gsl_sf_coupling_6j_e two_ja two_jb two_jc two_jd two_je two_jf +foreign import ccall "coupling.h gsl_sf_coupling_6j_e" gsl_sf_coupling_6j_e :: Int -> Int -> Int -> Int -> Int -> Int -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_coupling_6j(int two_ja,int two_jb,int two_jc,int two_jd,int two_je,int two_jf); +coupling_6j :: Int -> Int -> Int -> Int -> Int -> Int -> Double +coupling_6j = gsl_sf_coupling_6j +foreign import ccall "coupling.h gsl_sf_coupling_6j" gsl_sf_coupling_6j :: Int -> Int -> Int -> Int -> Int -> Int -> Double + +-- | wrapper for int gsl_sf_coupling_RacahW_e(int two_ja,int two_jb,int two_jc,int two_jd,int two_je,int two_jf,gsl_sf_result* result); +coupling_RacahW_e :: Int -> Int -> Int -> Int -> Int -> Int -> (Double,Double) +coupling_RacahW_e two_ja two_jb two_jc two_jd two_je two_jf = createSFR "coupling_RacahW_e" $ gsl_sf_coupling_RacahW_e two_ja two_jb two_jc two_jd two_je two_jf +foreign import ccall "coupling.h gsl_sf_coupling_RacahW_e" gsl_sf_coupling_RacahW_e :: Int -> Int -> Int -> Int -> Int -> Int -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_coupling_RacahW(int two_ja,int two_jb,int two_jc,int two_jd,int two_je,int two_jf); +coupling_RacahW :: Int -> Int -> Int -> Int -> Int -> Int -> Double +coupling_RacahW = gsl_sf_coupling_RacahW +foreign import ccall "coupling.h gsl_sf_coupling_RacahW" gsl_sf_coupling_RacahW :: Int -> Int -> Int -> Int -> Int -> Int -> Double + +-- | wrapper for int gsl_sf_coupling_9j_e(int two_ja,int two_jb,int two_jc,int two_jd,int two_je,int two_jf,int two_jg,int two_jh,int two_ji,gsl_sf_result* result); +coupling_9j_e :: Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> (Double,Double) +coupling_9j_e two_ja two_jb two_jc two_jd two_je two_jf two_jg two_jh two_ji = createSFR "coupling_9j_e" $ gsl_sf_coupling_9j_e two_ja two_jb two_jc two_jd two_je two_jf two_jg two_jh two_ji +foreign import ccall "coupling.h gsl_sf_coupling_9j_e" gsl_sf_coupling_9j_e :: Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_coupling_9j(int two_ja,int two_jb,int two_jc,int two_jd,int two_je,int two_jf,int two_jg,int two_jh,int two_ji); +coupling_9j :: Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Double +coupling_9j = gsl_sf_coupling_9j +foreign import ccall "coupling.h gsl_sf_coupling_9j" gsl_sf_coupling_9j :: Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Double + +-- | wrapper for int gsl_sf_coupling_6j_INCORRECT_e(int two_ja,int two_jb,int two_jc,int two_jd,int two_je,int two_jf,gsl_sf_result* result); +coupling_6j_INCORRECT_e :: Int -> Int -> Int -> Int -> Int -> Int -> (Double,Double) +coupling_6j_INCORRECT_e two_ja two_jb two_jc two_jd two_je two_jf = createSFR "coupling_6j_INCORRECT_e" $ gsl_sf_coupling_6j_INCORRECT_e two_ja two_jb two_jc two_jd two_je two_jf +foreign import ccall "coupling.h gsl_sf_coupling_6j_INCORRECT_e" gsl_sf_coupling_6j_INCORRECT_e :: Int -> Int -> Int -> Int -> Int -> Int -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_coupling_6j_INCORRECT(int two_ja,int two_jb,int two_jc,int two_jd,int two_je,int two_jf); +coupling_6j_INCORRECT :: Int -> Int -> Int -> Int -> Int -> Int -> Double +coupling_6j_INCORRECT = gsl_sf_coupling_6j_INCORRECT +foreign import ccall "coupling.h gsl_sf_coupling_6j_INCORRECT" gsl_sf_coupling_6j_INCORRECT :: Int -> Int -> Int -> Int -> Int -> Int -> Double diff --git a/lib/GSL/Special/Dawson.hs b/lib/GSL/Special/Dawson.hs new file mode 100644 index 0000000..62d0baf --- /dev/null +++ b/lib/GSL/Special/Dawson.hs @@ -0,0 +1,31 @@ +------------------------------------------------------------ +{- | +Module : GSL.Special.Dawson +Copyright : (c) Alberto Ruiz 2006 +License : GPL-style +Maintainer : Alberto Ruiz (aruiz at um dot es) +Stability : provisional +Portability : uses ffi + + + +-} +------------------------------------------------------------ + +module GSL.Special.Dawson( + dawson_e +, dawson +) where + +import Foreign(Ptr) +import GSL.Special.Internal + +-- | wrapper for int gsl_sf_dawson_e(double x,gsl_sf_result* result); +dawson_e :: Double -> (Double,Double) +dawson_e x = createSFR "dawson_e" $ gsl_sf_dawson_e x +foreign import ccall "dawson.h gsl_sf_dawson_e" gsl_sf_dawson_e :: Double -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_dawson(double x); +dawson :: Double -> Double +dawson = gsl_sf_dawson +foreign import ccall "dawson.h gsl_sf_dawson" gsl_sf_dawson :: Double -> Double diff --git a/lib/GSL/Special/Debye.hs b/lib/GSL/Special/Debye.hs new file mode 100644 index 0000000..aa0bd89 --- /dev/null +++ b/lib/GSL/Special/Debye.hs @@ -0,0 +1,67 @@ +------------------------------------------------------------ +{- | +Module : GSL.Special.Debye +Copyright : (c) Alberto Ruiz 2006 +License : GPL-style +Maintainer : Alberto Ruiz (aruiz at um dot es) +Stability : provisional +Portability : uses ffi + + + +-} +------------------------------------------------------------ + +module GSL.Special.Debye( + debye_1_e +, debye_1 +, debye_2_e +, debye_2 +, debye_3_e +, debye_3 +, debye_4_e +, debye_4 +) where + +import Foreign(Ptr) +import GSL.Special.Internal + +-- | wrapper for int gsl_sf_debye_1_e(double x,gsl_sf_result* result); +debye_1_e :: Double -> (Double,Double) +debye_1_e x = createSFR "debye_1_e" $ gsl_sf_debye_1_e x +foreign import ccall "debye.h gsl_sf_debye_1_e" gsl_sf_debye_1_e :: Double -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_debye_1(double x); +debye_1 :: Double -> Double +debye_1 = gsl_sf_debye_1 +foreign import ccall "debye.h gsl_sf_debye_1" gsl_sf_debye_1 :: Double -> Double + +-- | wrapper for int gsl_sf_debye_2_e(double x,gsl_sf_result* result); +debye_2_e :: Double -> (Double,Double) +debye_2_e x = createSFR "debye_2_e" $ gsl_sf_debye_2_e x +foreign import ccall "debye.h gsl_sf_debye_2_e" gsl_sf_debye_2_e :: Double -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_debye_2(double x); +debye_2 :: Double -> Double +debye_2 = gsl_sf_debye_2 +foreign import ccall "debye.h gsl_sf_debye_2" gsl_sf_debye_2 :: Double -> Double + +-- | wrapper for int gsl_sf_debye_3_e(double x,gsl_sf_result* result); +debye_3_e :: Double -> (Double,Double) +debye_3_e x = createSFR "debye_3_e" $ gsl_sf_debye_3_e x +foreign import ccall "debye.h gsl_sf_debye_3_e" gsl_sf_debye_3_e :: Double -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_debye_3(double x); +debye_3 :: Double -> Double +debye_3 = gsl_sf_debye_3 +foreign import ccall "debye.h gsl_sf_debye_3" gsl_sf_debye_3 :: Double -> Double + +-- | wrapper for int gsl_sf_debye_4_e(double x,gsl_sf_result* result); +debye_4_e :: Double -> (Double,Double) +debye_4_e x = createSFR "debye_4_e" $ gsl_sf_debye_4_e x +foreign import ccall "debye.h gsl_sf_debye_4_e" gsl_sf_debye_4_e :: Double -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_debye_4(double x); +debye_4 :: Double -> Double +debye_4 = gsl_sf_debye_4 +foreign import ccall "debye.h gsl_sf_debye_4" gsl_sf_debye_4 :: Double -> Double diff --git a/lib/GSL/Special/Dilog.hs b/lib/GSL/Special/Dilog.hs new file mode 100644 index 0000000..199095a --- /dev/null +++ b/lib/GSL/Special/Dilog.hs @@ -0,0 +1,46 @@ +------------------------------------------------------------ +{- | +Module : GSL.Special.Dilog +Copyright : (c) Alberto Ruiz 2006 +License : GPL-style +Maintainer : Alberto Ruiz (aruiz at um dot es) +Stability : provisional +Portability : uses ffi + + + +-} +------------------------------------------------------------ + +module GSL.Special.Dilog( + dilog_e +, dilog +) where + +import Foreign(Ptr) +import GSL.Special.Internal + +-- | wrapper for int gsl_sf_dilog_e(double x,gsl_sf_result* result); +dilog_e :: Double -> (Double,Double) +dilog_e x = createSFR "dilog_e" $ gsl_sf_dilog_e x +foreign import ccall "dilog.h gsl_sf_dilog_e" gsl_sf_dilog_e :: Double -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_dilog(double x); +dilog :: Double -> Double +dilog = gsl_sf_dilog +foreign import ccall "dilog.h gsl_sf_dilog" gsl_sf_dilog :: Double -> Double + +-- | wrapper for int gsl_sf_complex_dilog_xy_e(double x,double y,gsl_sf_result* result_re,gsl_sf_result* result_im); +complex_dilog_xy_e :: Double -> Double -> Ptr Double -> (Double,Double) +complex_dilog_xy_e x y result_re = createSFR "complex_dilog_xy_e" $ gsl_sf_complex_dilog_xy_e x y result_re +foreign import ccall "dilog.h gsl_sf_complex_dilog_xy_e" gsl_sf_complex_dilog_xy_e :: Double -> Double -> Ptr Double -> Ptr Double -> IO(Int) + +-- | wrapper for int gsl_sf_complex_dilog_e(double r,double theta,gsl_sf_result* result_re,gsl_sf_result* result_im); +complex_dilog_e :: Double -> Double -> Ptr Double -> (Double,Double) +complex_dilog_e r theta result_re = createSFR "complex_dilog_e" $ gsl_sf_complex_dilog_e r theta result_re +foreign import ccall "dilog.h gsl_sf_complex_dilog_e" gsl_sf_complex_dilog_e :: Double -> Double -> Ptr Double -> Ptr Double -> IO(Int) + +-- | wrapper for int gsl_sf_complex_spence_xy_e(double x,double y,gsl_sf_result* real_sp,gsl_sf_result* imag_sp); +complex_spence_xy_e :: Double -> Double -> Ptr Double -> (Double,Double) +complex_spence_xy_e x y real_sp = createSFR "complex_spence_xy_e" $ gsl_sf_complex_spence_xy_e x y real_sp +foreign import ccall "dilog.h gsl_sf_complex_spence_xy_e" gsl_sf_complex_spence_xy_e :: Double -> Double -> Ptr Double -> Ptr Double -> IO(Int) diff --git a/lib/GSL/Special/Elementary.hs b/lib/GSL/Special/Elementary.hs new file mode 100644 index 0000000..5da89ca --- /dev/null +++ b/lib/GSL/Special/Elementary.hs @@ -0,0 +1,37 @@ +------------------------------------------------------------ +{- | +Module : GSL.Special.Elementary +Copyright : (c) Alberto Ruiz 2006 +License : GPL-style +Maintainer : Alberto Ruiz (aruiz at um dot es) +Stability : provisional +Portability : uses ffi + + + +-} +------------------------------------------------------------ + +module GSL.Special.Elementary( + multiply_e +, multiply +, multiply_err_e +) where + +import Foreign(Ptr) +import GSL.Special.Internal + +-- | wrapper for int gsl_sf_multiply_e(double x,double y,gsl_sf_result* result); +multiply_e :: Double -> Double -> (Double,Double) +multiply_e x y = createSFR "multiply_e" $ gsl_sf_multiply_e x y +foreign import ccall "elementary.h gsl_sf_multiply_e" gsl_sf_multiply_e :: Double -> Double -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_multiply(double x,double y); +multiply :: Double -> Double -> Double +multiply = gsl_sf_multiply +foreign import ccall "elementary.h gsl_sf_multiply" gsl_sf_multiply :: Double -> Double -> Double + +-- | wrapper for int gsl_sf_multiply_err_e(double x,double dx,double y,double dy,gsl_sf_result* result); +multiply_err_e :: Double -> Double -> Double -> Double -> (Double,Double) +multiply_err_e x dx y dy = createSFR "multiply_err_e" $ gsl_sf_multiply_err_e x dx y dy +foreign import ccall "elementary.h gsl_sf_multiply_err_e" gsl_sf_multiply_err_e :: Double -> Double -> Double -> Double -> Ptr Double -> IO(Int) diff --git a/lib/GSL/Special/Ellint.hs b/lib/GSL/Special/Ellint.hs new file mode 100644 index 0000000..f79c702 --- /dev/null +++ b/lib/GSL/Special/Ellint.hs @@ -0,0 +1,139 @@ +------------------------------------------------------------ +{- | +Module : GSL.Special.Ellint +Copyright : (c) Alberto Ruiz 2006 +License : GPL-style +Maintainer : Alberto Ruiz (aruiz at um dot es) +Stability : provisional +Portability : uses ffi + + + +-} +------------------------------------------------------------ + +module GSL.Special.Ellint( + ellint_Kcomp_e +, ellint_Kcomp +, ellint_Ecomp_e +, ellint_Ecomp +, ellint_F_e +, ellint_F +, ellint_E_e +, ellint_E +, ellint_P_e +, ellint_P +, ellint_D_e +, ellint_D +, ellint_RC_e +, ellint_RC +, ellint_RD_e +, ellint_RD +, ellint_RF_e +, ellint_RF +, ellint_RJ_e +, ellint_RJ +) where + +import Foreign(Ptr) +import GSL.Special.Internal + +-- | wrapper for int gsl_sf_ellint_Kcomp_e(double k,gsl_mode_t mode,gsl_sf_result* result); +ellint_Kcomp_e :: Double -> Precision -> (Double,Double) +ellint_Kcomp_e k mode = createSFR "ellint_Kcomp_e" $ gsl_sf_ellint_Kcomp_e k (precCode mode) +foreign import ccall "ellint.h gsl_sf_ellint_Kcomp_e" gsl_sf_ellint_Kcomp_e :: Double -> Gsl_mode_t -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_ellint_Kcomp(double k,gsl_mode_t mode); +ellint_Kcomp :: Double -> Precision -> Double +ellint_Kcomp k mode = gsl_sf_ellint_Kcomp k (precCode mode) +foreign import ccall "ellint.h gsl_sf_ellint_Kcomp" gsl_sf_ellint_Kcomp :: Double -> Gsl_mode_t -> Double + +-- | wrapper for int gsl_sf_ellint_Ecomp_e(double k,gsl_mode_t mode,gsl_sf_result* result); +ellint_Ecomp_e :: Double -> Precision -> (Double,Double) +ellint_Ecomp_e k mode = createSFR "ellint_Ecomp_e" $ gsl_sf_ellint_Ecomp_e k (precCode mode) +foreign import ccall "ellint.h gsl_sf_ellint_Ecomp_e" gsl_sf_ellint_Ecomp_e :: Double -> Gsl_mode_t -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_ellint_Ecomp(double k,gsl_mode_t mode); +ellint_Ecomp :: Double -> Precision -> Double +ellint_Ecomp k mode = gsl_sf_ellint_Ecomp k (precCode mode) +foreign import ccall "ellint.h gsl_sf_ellint_Ecomp" gsl_sf_ellint_Ecomp :: Double -> Gsl_mode_t -> Double + +-- | wrapper for int gsl_sf_ellint_F_e(double phi,double k,gsl_mode_t mode,gsl_sf_result* result); +ellint_F_e :: Double -> Double -> Precision -> (Double,Double) +ellint_F_e phi k mode = createSFR "ellint_F_e" $ gsl_sf_ellint_F_e phi k (precCode mode) +foreign import ccall "ellint.h gsl_sf_ellint_F_e" gsl_sf_ellint_F_e :: Double -> Double -> Gsl_mode_t -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_ellint_F(double phi,double k,gsl_mode_t mode); +ellint_F :: Double -> Double -> Precision -> Double +ellint_F phi k mode = gsl_sf_ellint_F phi k (precCode mode) +foreign import ccall "ellint.h gsl_sf_ellint_F" gsl_sf_ellint_F :: Double -> Double -> Gsl_mode_t -> Double + +-- | wrapper for int gsl_sf_ellint_E_e(double phi,double k,gsl_mode_t mode,gsl_sf_result* result); +ellint_E_e :: Double -> Double -> Precision -> (Double,Double) +ellint_E_e phi k mode = createSFR "ellint_E_e" $ gsl_sf_ellint_E_e phi k (precCode mode) +foreign import ccall "ellint.h gsl_sf_ellint_E_e" gsl_sf_ellint_E_e :: Double -> Double -> Gsl_mode_t -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_ellint_E(double phi,double k,gsl_mode_t mode); +ellint_E :: Double -> Double -> Precision -> Double +ellint_E phi k mode = gsl_sf_ellint_E phi k (precCode mode) +foreign import ccall "ellint.h gsl_sf_ellint_E" gsl_sf_ellint_E :: Double -> Double -> Gsl_mode_t -> Double + +-- | wrapper for int gsl_sf_ellint_P_e(double phi,double k,double n,gsl_mode_t mode,gsl_sf_result* result); +ellint_P_e :: Double -> Double -> Double -> Precision -> (Double,Double) +ellint_P_e phi k n mode = createSFR "ellint_P_e" $ gsl_sf_ellint_P_e phi k n (precCode mode) +foreign import ccall "ellint.h gsl_sf_ellint_P_e" gsl_sf_ellint_P_e :: Double -> Double -> Double -> Gsl_mode_t -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_ellint_P(double phi,double k,double n,gsl_mode_t mode); +ellint_P :: Double -> Double -> Double -> Precision -> Double +ellint_P phi k n mode = gsl_sf_ellint_P phi k n (precCode mode) +foreign import ccall "ellint.h gsl_sf_ellint_P" gsl_sf_ellint_P :: Double -> Double -> Double -> Gsl_mode_t -> Double + +-- | wrapper for int gsl_sf_ellint_D_e(double phi,double k,double n,gsl_mode_t mode,gsl_sf_result* result); +ellint_D_e :: Double -> Double -> Double -> Precision -> (Double,Double) +ellint_D_e phi k n mode = createSFR "ellint_D_e" $ gsl_sf_ellint_D_e phi k n (precCode mode) +foreign import ccall "ellint.h gsl_sf_ellint_D_e" gsl_sf_ellint_D_e :: Double -> Double -> Double -> Gsl_mode_t -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_ellint_D(double phi,double k,double n,gsl_mode_t mode); +ellint_D :: Double -> Double -> Double -> Precision -> Double +ellint_D phi k n mode = gsl_sf_ellint_D phi k n (precCode mode) +foreign import ccall "ellint.h gsl_sf_ellint_D" gsl_sf_ellint_D :: Double -> Double -> Double -> Gsl_mode_t -> Double + +-- | wrapper for int gsl_sf_ellint_RC_e(double x,double y,gsl_mode_t mode,gsl_sf_result* result); +ellint_RC_e :: Double -> Double -> Precision -> (Double,Double) +ellint_RC_e x y mode = createSFR "ellint_RC_e" $ gsl_sf_ellint_RC_e x y (precCode mode) +foreign import ccall "ellint.h gsl_sf_ellint_RC_e" gsl_sf_ellint_RC_e :: Double -> Double -> Gsl_mode_t -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_ellint_RC(double x,double y,gsl_mode_t mode); +ellint_RC :: Double -> Double -> Precision -> Double +ellint_RC x y mode = gsl_sf_ellint_RC x y (precCode mode) +foreign import ccall "ellint.h gsl_sf_ellint_RC" gsl_sf_ellint_RC :: Double -> Double -> Gsl_mode_t -> Double + +-- | wrapper for int gsl_sf_ellint_RD_e(double x,double y,double z,gsl_mode_t mode,gsl_sf_result* result); +ellint_RD_e :: Double -> Double -> Double -> Precision -> (Double,Double) +ellint_RD_e x y z mode = createSFR "ellint_RD_e" $ gsl_sf_ellint_RD_e x y z (precCode mode) +foreign import ccall "ellint.h gsl_sf_ellint_RD_e" gsl_sf_ellint_RD_e :: Double -> Double -> Double -> Gsl_mode_t -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_ellint_RD(double x,double y,double z,gsl_mode_t mode); +ellint_RD :: Double -> Double -> Double -> Precision -> Double +ellint_RD x y z mode = gsl_sf_ellint_RD x y z (precCode mode) +foreign import ccall "ellint.h gsl_sf_ellint_RD" gsl_sf_ellint_RD :: Double -> Double -> Double -> Gsl_mode_t -> Double + +-- | wrapper for int gsl_sf_ellint_RF_e(double x,double y,double z,gsl_mode_t mode,gsl_sf_result* result); +ellint_RF_e :: Double -> Double -> Double -> Precision -> (Double,Double) +ellint_RF_e x y z mode = createSFR "ellint_RF_e" $ gsl_sf_ellint_RF_e x y z (precCode mode) +foreign import ccall "ellint.h gsl_sf_ellint_RF_e" gsl_sf_ellint_RF_e :: Double -> Double -> Double -> Gsl_mode_t -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_ellint_RF(double x,double y,double z,gsl_mode_t mode); +ellint_RF :: Double -> Double -> Double -> Precision -> Double +ellint_RF x y z mode = gsl_sf_ellint_RF x y z (precCode mode) +foreign import ccall "ellint.h gsl_sf_ellint_RF" gsl_sf_ellint_RF :: Double -> Double -> Double -> Gsl_mode_t -> Double + +-- | wrapper for int gsl_sf_ellint_RJ_e(double x,double y,double z,double p,gsl_mode_t mode,gsl_sf_result* result); +ellint_RJ_e :: Double -> Double -> Double -> Double -> Precision -> (Double,Double) +ellint_RJ_e x y z p mode = createSFR "ellint_RJ_e" $ gsl_sf_ellint_RJ_e x y z p (precCode mode) +foreign import ccall "ellint.h gsl_sf_ellint_RJ_e" gsl_sf_ellint_RJ_e :: Double -> Double -> Double -> Double -> Gsl_mode_t -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_ellint_RJ(double x,double y,double z,double p,gsl_mode_t mode); +ellint_RJ :: Double -> Double -> Double -> Double -> Precision -> Double +ellint_RJ x y z p mode = gsl_sf_ellint_RJ x y z p (precCode mode) +foreign import ccall "ellint.h gsl_sf_ellint_RJ" gsl_sf_ellint_RJ :: Double -> Double -> Double -> Double -> Gsl_mode_t -> Double diff --git a/lib/GSL/Special/Expint.hs b/lib/GSL/Special/Expint.hs new file mode 100644 index 0000000..f761966 --- /dev/null +++ b/lib/GSL/Special/Expint.hs @@ -0,0 +1,163 @@ +------------------------------------------------------------ +{- | +Module : GSL.Special.Expint +Copyright : (c) Alberto Ruiz 2006 +License : GPL-style +Maintainer : Alberto Ruiz (aruiz at um dot es) +Stability : provisional +Portability : uses ffi + + + +-} +------------------------------------------------------------ + +module GSL.Special.Expint( + expint_E1_e +, expint_E1 +, expint_E2_e +, expint_E2 +, expint_E1_scaled_e +, expint_E1_scaled +, expint_E2_scaled_e +, expint_E2_scaled +, expint_Ei_e +, expint_Ei +, expint_Ei_scaled_e +, expint_Ei_scaled +, shi_e +, shi +, chi_e +, chi +, expint_3_e +, expint_3 +, si_e +, si +, ci_e +, ci +, atanint_e +, atanint +) where + +import Foreign(Ptr) +import GSL.Special.Internal + +-- | wrapper for int gsl_sf_expint_E1_e(double x,gsl_sf_result* result); +expint_E1_e :: Double -> (Double,Double) +expint_E1_e x = createSFR "expint_E1_e" $ gsl_sf_expint_E1_e x +foreign import ccall "expint.h gsl_sf_expint_E1_e" gsl_sf_expint_E1_e :: Double -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_expint_E1(double x); +expint_E1 :: Double -> Double +expint_E1 = gsl_sf_expint_E1 +foreign import ccall "expint.h gsl_sf_expint_E1" gsl_sf_expint_E1 :: Double -> Double + +-- | wrapper for int gsl_sf_expint_E2_e(double x,gsl_sf_result* result); +expint_E2_e :: Double -> (Double,Double) +expint_E2_e x = createSFR "expint_E2_e" $ gsl_sf_expint_E2_e x +foreign import ccall "expint.h gsl_sf_expint_E2_e" gsl_sf_expint_E2_e :: Double -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_expint_E2(double x); +expint_E2 :: Double -> Double +expint_E2 = gsl_sf_expint_E2 +foreign import ccall "expint.h gsl_sf_expint_E2" gsl_sf_expint_E2 :: Double -> Double + +-- | wrapper for int gsl_sf_expint_E1_scaled_e(double x,gsl_sf_result* result); +expint_E1_scaled_e :: Double -> (Double,Double) +expint_E1_scaled_e x = createSFR "expint_E1_scaled_e" $ gsl_sf_expint_E1_scaled_e x +foreign import ccall "expint.h gsl_sf_expint_E1_scaled_e" gsl_sf_expint_E1_scaled_e :: Double -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_expint_E1_scaled(double x); +expint_E1_scaled :: Double -> Double +expint_E1_scaled = gsl_sf_expint_E1_scaled +foreign import ccall "expint.h gsl_sf_expint_E1_scaled" gsl_sf_expint_E1_scaled :: Double -> Double + +-- | wrapper for int gsl_sf_expint_E2_scaled_e(double x,gsl_sf_result* result); +expint_E2_scaled_e :: Double -> (Double,Double) +expint_E2_scaled_e x = createSFR "expint_E2_scaled_e" $ gsl_sf_expint_E2_scaled_e x +foreign import ccall "expint.h gsl_sf_expint_E2_scaled_e" gsl_sf_expint_E2_scaled_e :: Double -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_expint_E2_scaled(double x); +expint_E2_scaled :: Double -> Double +expint_E2_scaled = gsl_sf_expint_E2_scaled +foreign import ccall "expint.h gsl_sf_expint_E2_scaled" gsl_sf_expint_E2_scaled :: Double -> Double + +-- | wrapper for int gsl_sf_expint_Ei_e(double x,gsl_sf_result* result); +expint_Ei_e :: Double -> (Double,Double) +expint_Ei_e x = createSFR "expint_Ei_e" $ gsl_sf_expint_Ei_e x +foreign import ccall "expint.h gsl_sf_expint_Ei_e" gsl_sf_expint_Ei_e :: Double -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_expint_Ei(double x); +expint_Ei :: Double -> Double +expint_Ei = gsl_sf_expint_Ei +foreign import ccall "expint.h gsl_sf_expint_Ei" gsl_sf_expint_Ei :: Double -> Double + +-- | wrapper for int gsl_sf_expint_Ei_scaled_e(double x,gsl_sf_result* result); +expint_Ei_scaled_e :: Double -> (Double,Double) +expint_Ei_scaled_e x = createSFR "expint_Ei_scaled_e" $ gsl_sf_expint_Ei_scaled_e x +foreign import ccall "expint.h gsl_sf_expint_Ei_scaled_e" gsl_sf_expint_Ei_scaled_e :: Double -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_expint_Ei_scaled(double x); +expint_Ei_scaled :: Double -> Double +expint_Ei_scaled = gsl_sf_expint_Ei_scaled +foreign import ccall "expint.h gsl_sf_expint_Ei_scaled" gsl_sf_expint_Ei_scaled :: Double -> Double + +-- | wrapper for int gsl_sf_Shi_e(double x,gsl_sf_result* result); +shi_e :: Double -> (Double,Double) +shi_e x = createSFR "shi_e" $ gsl_sf_Shi_e x +foreign import ccall "expint.h gsl_sf_Shi_e" gsl_sf_Shi_e :: Double -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_Shi(double x); +shi :: Double -> Double +shi = gsl_sf_Shi +foreign import ccall "expint.h gsl_sf_Shi" gsl_sf_Shi :: Double -> Double + +-- | wrapper for int gsl_sf_Chi_e(double x,gsl_sf_result* result); +chi_e :: Double -> (Double,Double) +chi_e x = createSFR "chi_e" $ gsl_sf_Chi_e x +foreign import ccall "expint.h gsl_sf_Chi_e" gsl_sf_Chi_e :: Double -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_Chi(double x); +chi :: Double -> Double +chi = gsl_sf_Chi +foreign import ccall "expint.h gsl_sf_Chi" gsl_sf_Chi :: Double -> Double + +-- | wrapper for int gsl_sf_expint_3_e(double x,gsl_sf_result* result); +expint_3_e :: Double -> (Double,Double) +expint_3_e x = createSFR "expint_3_e" $ gsl_sf_expint_3_e x +foreign import ccall "expint.h gsl_sf_expint_3_e" gsl_sf_expint_3_e :: Double -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_expint_3(double x); +expint_3 :: Double -> Double +expint_3 = gsl_sf_expint_3 +foreign import ccall "expint.h gsl_sf_expint_3" gsl_sf_expint_3 :: Double -> Double + +-- | wrapper for int gsl_sf_Si_e(double x,gsl_sf_result* result); +si_e :: Double -> (Double,Double) +si_e x = createSFR "si_e" $ gsl_sf_Si_e x +foreign import ccall "expint.h gsl_sf_Si_e" gsl_sf_Si_e :: Double -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_Si(double x); +si :: Double -> Double +si = gsl_sf_Si +foreign import ccall "expint.h gsl_sf_Si" gsl_sf_Si :: Double -> Double + +-- | wrapper for int gsl_sf_Ci_e(double x,gsl_sf_result* result); +ci_e :: Double -> (Double,Double) +ci_e x = createSFR "ci_e" $ gsl_sf_Ci_e x +foreign import ccall "expint.h gsl_sf_Ci_e" gsl_sf_Ci_e :: Double -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_Ci(double x); +ci :: Double -> Double +ci = gsl_sf_Ci +foreign import ccall "expint.h gsl_sf_Ci" gsl_sf_Ci :: Double -> Double + +-- | wrapper for int gsl_sf_atanint_e(double x,gsl_sf_result* result); +atanint_e :: Double -> (Double,Double) +atanint_e x = createSFR "atanint_e" $ gsl_sf_atanint_e x +foreign import ccall "expint.h gsl_sf_atanint_e" gsl_sf_atanint_e :: Double -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_atanint(double x); +atanint :: Double -> Double +atanint = gsl_sf_atanint +foreign import ccall "expint.h gsl_sf_atanint" gsl_sf_atanint :: Double -> Double diff --git a/lib/GSL/Special/Fermi_dirac.hs b/lib/GSL/Special/Fermi_dirac.hs new file mode 100644 index 0000000..26923d2 --- /dev/null +++ b/lib/GSL/Special/Fermi_dirac.hs @@ -0,0 +1,127 @@ +------------------------------------------------------------ +{- | +Module : GSL.Special.Fermi_dirac +Copyright : (c) Alberto Ruiz 2006 +License : GPL-style +Maintainer : Alberto Ruiz (aruiz at um dot es) +Stability : provisional +Portability : uses ffi + + + +-} +------------------------------------------------------------ + +module GSL.Special.Fermi_dirac( + fermi_dirac_m1_e +, fermi_dirac_m1 +, fermi_dirac_0_e +, fermi_dirac_0 +, fermi_dirac_1_e +, fermi_dirac_1 +, fermi_dirac_2_e +, fermi_dirac_2 +, fermi_dirac_int_e +, fermi_dirac_int +, fermi_dirac_mhalf_e +, fermi_dirac_mhalf +, fermi_dirac_half_e +, fermi_dirac_half +, fermi_dirac_3half_e +, fermi_dirac_3half +, fermi_dirac_inc_0_e +, fermi_dirac_inc_0 +) where + +import Foreign(Ptr) +import GSL.Special.Internal + +-- | wrapper for int gsl_sf_fermi_dirac_m1_e(double x,gsl_sf_result* result); +fermi_dirac_m1_e :: Double -> (Double,Double) +fermi_dirac_m1_e x = createSFR "fermi_dirac_m1_e" $ gsl_sf_fermi_dirac_m1_e x +foreign import ccall "fermi_dirac.h gsl_sf_fermi_dirac_m1_e" gsl_sf_fermi_dirac_m1_e :: Double -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_fermi_dirac_m1(double x); +fermi_dirac_m1 :: Double -> Double +fermi_dirac_m1 = gsl_sf_fermi_dirac_m1 +foreign import ccall "fermi_dirac.h gsl_sf_fermi_dirac_m1" gsl_sf_fermi_dirac_m1 :: Double -> Double + +-- | wrapper for int gsl_sf_fermi_dirac_0_e(double x,gsl_sf_result* result); +fermi_dirac_0_e :: Double -> (Double,Double) +fermi_dirac_0_e x = createSFR "fermi_dirac_0_e" $ gsl_sf_fermi_dirac_0_e x +foreign import ccall "fermi_dirac.h gsl_sf_fermi_dirac_0_e" gsl_sf_fermi_dirac_0_e :: Double -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_fermi_dirac_0(double x); +fermi_dirac_0 :: Double -> Double +fermi_dirac_0 = gsl_sf_fermi_dirac_0 +foreign import ccall "fermi_dirac.h gsl_sf_fermi_dirac_0" gsl_sf_fermi_dirac_0 :: Double -> Double + +-- | wrapper for int gsl_sf_fermi_dirac_1_e(double x,gsl_sf_result* result); +fermi_dirac_1_e :: Double -> (Double,Double) +fermi_dirac_1_e x = createSFR "fermi_dirac_1_e" $ gsl_sf_fermi_dirac_1_e x +foreign import ccall "fermi_dirac.h gsl_sf_fermi_dirac_1_e" gsl_sf_fermi_dirac_1_e :: Double -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_fermi_dirac_1(double x); +fermi_dirac_1 :: Double -> Double +fermi_dirac_1 = gsl_sf_fermi_dirac_1 +foreign import ccall "fermi_dirac.h gsl_sf_fermi_dirac_1" gsl_sf_fermi_dirac_1 :: Double -> Double + +-- | wrapper for int gsl_sf_fermi_dirac_2_e(double x,gsl_sf_result* result); +fermi_dirac_2_e :: Double -> (Double,Double) +fermi_dirac_2_e x = createSFR "fermi_dirac_2_e" $ gsl_sf_fermi_dirac_2_e x +foreign import ccall "fermi_dirac.h gsl_sf_fermi_dirac_2_e" gsl_sf_fermi_dirac_2_e :: Double -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_fermi_dirac_2(double x); +fermi_dirac_2 :: Double -> Double +fermi_dirac_2 = gsl_sf_fermi_dirac_2 +foreign import ccall "fermi_dirac.h gsl_sf_fermi_dirac_2" gsl_sf_fermi_dirac_2 :: Double -> Double + +-- | wrapper for int gsl_sf_fermi_dirac_int_e(int j,double x,gsl_sf_result* result); +fermi_dirac_int_e :: Int -> Double -> (Double,Double) +fermi_dirac_int_e j x = createSFR "fermi_dirac_int_e" $ gsl_sf_fermi_dirac_int_e j x +foreign import ccall "fermi_dirac.h gsl_sf_fermi_dirac_int_e" gsl_sf_fermi_dirac_int_e :: Int -> Double -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_fermi_dirac_int(int j,double x); +fermi_dirac_int :: Int -> Double -> Double +fermi_dirac_int = gsl_sf_fermi_dirac_int +foreign import ccall "fermi_dirac.h gsl_sf_fermi_dirac_int" gsl_sf_fermi_dirac_int :: Int -> Double -> Double + +-- | wrapper for int gsl_sf_fermi_dirac_mhalf_e(double x,gsl_sf_result* result); +fermi_dirac_mhalf_e :: Double -> (Double,Double) +fermi_dirac_mhalf_e x = createSFR "fermi_dirac_mhalf_e" $ gsl_sf_fermi_dirac_mhalf_e x +foreign import ccall "fermi_dirac.h gsl_sf_fermi_dirac_mhalf_e" gsl_sf_fermi_dirac_mhalf_e :: Double -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_fermi_dirac_mhalf(double x); +fermi_dirac_mhalf :: Double -> Double +fermi_dirac_mhalf = gsl_sf_fermi_dirac_mhalf +foreign import ccall "fermi_dirac.h gsl_sf_fermi_dirac_mhalf" gsl_sf_fermi_dirac_mhalf :: Double -> Double + +-- | wrapper for int gsl_sf_fermi_dirac_half_e(double x,gsl_sf_result* result); +fermi_dirac_half_e :: Double -> (Double,Double) +fermi_dirac_half_e x = createSFR "fermi_dirac_half_e" $ gsl_sf_fermi_dirac_half_e x +foreign import ccall "fermi_dirac.h gsl_sf_fermi_dirac_half_e" gsl_sf_fermi_dirac_half_e :: Double -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_fermi_dirac_half(double x); +fermi_dirac_half :: Double -> Double +fermi_dirac_half = gsl_sf_fermi_dirac_half +foreign import ccall "fermi_dirac.h gsl_sf_fermi_dirac_half" gsl_sf_fermi_dirac_half :: Double -> Double + +-- | wrapper for int gsl_sf_fermi_dirac_3half_e(double x,gsl_sf_result* result); +fermi_dirac_3half_e :: Double -> (Double,Double) +fermi_dirac_3half_e x = createSFR "fermi_dirac_3half_e" $ gsl_sf_fermi_dirac_3half_e x +foreign import ccall "fermi_dirac.h gsl_sf_fermi_dirac_3half_e" gsl_sf_fermi_dirac_3half_e :: Double -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_fermi_dirac_3half(double x); +fermi_dirac_3half :: Double -> Double +fermi_dirac_3half = gsl_sf_fermi_dirac_3half +foreign import ccall "fermi_dirac.h gsl_sf_fermi_dirac_3half" gsl_sf_fermi_dirac_3half :: Double -> Double + +-- | wrapper for int gsl_sf_fermi_dirac_inc_0_e(double x,double b,gsl_sf_result* result); +fermi_dirac_inc_0_e :: Double -> Double -> (Double,Double) +fermi_dirac_inc_0_e x b = createSFR "fermi_dirac_inc_0_e" $ gsl_sf_fermi_dirac_inc_0_e x b +foreign import ccall "fermi_dirac.h gsl_sf_fermi_dirac_inc_0_e" gsl_sf_fermi_dirac_inc_0_e :: Double -> Double -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_fermi_dirac_inc_0(double x,double b); +fermi_dirac_inc_0 :: Double -> Double -> Double +fermi_dirac_inc_0 = gsl_sf_fermi_dirac_inc_0 +foreign import ccall "fermi_dirac.h gsl_sf_fermi_dirac_inc_0" gsl_sf_fermi_dirac_inc_0 :: Double -> Double -> Double diff --git a/lib/GSL/Special/Gegenbauer.hs b/lib/GSL/Special/Gegenbauer.hs new file mode 100644 index 0000000..06f3628 --- /dev/null +++ b/lib/GSL/Special/Gegenbauer.hs @@ -0,0 +1,72 @@ +------------------------------------------------------------ +{- | +Module : GSL.Special.Gegenbauer +Copyright : (c) Alberto Ruiz 2006 +License : GPL-style +Maintainer : Alberto Ruiz (aruiz at um dot es) +Stability : provisional +Portability : uses ffi + + + +-} +------------------------------------------------------------ + +module GSL.Special.Gegenbauer( + gegenpoly_1_e +, gegenpoly_2_e +, gegenpoly_3_e +, gegenpoly_1 +, gegenpoly_2 +, gegenpoly_3 +, gegenpoly_n_e +, gegenpoly_n +) where + +import Foreign(Ptr) +import GSL.Special.Internal + +-- | wrapper for int gsl_sf_gegenpoly_1_e(double lambda,double x,gsl_sf_result* result); +gegenpoly_1_e :: Double -> Double -> (Double,Double) +gegenpoly_1_e lambda x = createSFR "gegenpoly_1_e" $ gsl_sf_gegenpoly_1_e lambda x +foreign import ccall "gegenbauer.h gsl_sf_gegenpoly_1_e" gsl_sf_gegenpoly_1_e :: Double -> Double -> Ptr Double -> IO(Int) + +-- | wrapper for int gsl_sf_gegenpoly_2_e(double lambda,double x,gsl_sf_result* result); +gegenpoly_2_e :: Double -> Double -> (Double,Double) +gegenpoly_2_e lambda x = createSFR "gegenpoly_2_e" $ gsl_sf_gegenpoly_2_e lambda x +foreign import ccall "gegenbauer.h gsl_sf_gegenpoly_2_e" gsl_sf_gegenpoly_2_e :: Double -> Double -> Ptr Double -> IO(Int) + +-- | wrapper for int gsl_sf_gegenpoly_3_e(double lambda,double x,gsl_sf_result* result); +gegenpoly_3_e :: Double -> Double -> (Double,Double) +gegenpoly_3_e lambda x = createSFR "gegenpoly_3_e" $ gsl_sf_gegenpoly_3_e lambda x +foreign import ccall "gegenbauer.h gsl_sf_gegenpoly_3_e" gsl_sf_gegenpoly_3_e :: Double -> Double -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_gegenpoly_1(double lambda,double x); +gegenpoly_1 :: Double -> Double -> Double +gegenpoly_1 = gsl_sf_gegenpoly_1 +foreign import ccall "gegenbauer.h gsl_sf_gegenpoly_1" gsl_sf_gegenpoly_1 :: Double -> Double -> Double + +-- | wrapper for double gsl_sf_gegenpoly_2(double lambda,double x); +gegenpoly_2 :: Double -> Double -> Double +gegenpoly_2 = gsl_sf_gegenpoly_2 +foreign import ccall "gegenbauer.h gsl_sf_gegenpoly_2" gsl_sf_gegenpoly_2 :: Double -> Double -> Double + +-- | wrapper for double gsl_sf_gegenpoly_3(double lambda,double x); +gegenpoly_3 :: Double -> Double -> Double +gegenpoly_3 = gsl_sf_gegenpoly_3 +foreign import ccall "gegenbauer.h gsl_sf_gegenpoly_3" gsl_sf_gegenpoly_3 :: Double -> Double -> Double + +-- | wrapper for int gsl_sf_gegenpoly_n_e(int n,double lambda,double x,gsl_sf_result* result); +gegenpoly_n_e :: Int -> Double -> Double -> (Double,Double) +gegenpoly_n_e n lambda x = createSFR "gegenpoly_n_e" $ gsl_sf_gegenpoly_n_e n lambda x +foreign import ccall "gegenbauer.h gsl_sf_gegenpoly_n_e" gsl_sf_gegenpoly_n_e :: Int -> Double -> Double -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_gegenpoly_n(int n,double lambda,double x); +gegenpoly_n :: Int -> Double -> Double -> Double +gegenpoly_n = gsl_sf_gegenpoly_n +foreign import ccall "gegenbauer.h gsl_sf_gegenpoly_n" gsl_sf_gegenpoly_n :: Int -> Double -> Double -> Double + +-- | wrapper for int gsl_sf_gegenpoly_array(int nmax,double lambda,double x,double* result_array); +gegenpoly_array :: Int -> Double -> Double -> Ptr Double -> Int +gegenpoly_array = gsl_sf_gegenpoly_array +foreign import ccall "gegenbauer.h gsl_sf_gegenpoly_array" gsl_sf_gegenpoly_array :: Int -> Double -> Double -> Ptr Double -> Int diff --git a/lib/GSL/Special/Hyperg.hs b/lib/GSL/Special/Hyperg.hs new file mode 100644 index 0000000..c84c32c --- /dev/null +++ b/lib/GSL/Special/Hyperg.hs @@ -0,0 +1,151 @@ +------------------------------------------------------------ +{- | +Module : GSL.Special.Hyperg +Copyright : (c) Alberto Ruiz 2006 +License : GPL-style +Maintainer : Alberto Ruiz (aruiz at um dot es) +Stability : provisional +Portability : uses ffi + + + +-} +------------------------------------------------------------ + +module GSL.Special.Hyperg( + hyperg_0F1_e +, hyperg_0F1 +, hyperg_1F1_int_e +, hyperg_1F1_int +, hyperg_1F1_e +, hyperg_1F1 +, hyperg_U_int_e +, hyperg_U_int +, hyperg_U_int_e10_e +, hyperg_U_e +, hyperg_U +, hyperg_U_e10_e +, hyperg_2F1_e +, hyperg_2F1 +, hyperg_2F1_conj_e +, hyperg_2F1_conj +, hyperg_2F1_renorm_e +, hyperg_2F1_renorm +, hyperg_2F1_conj_renorm_e +, hyperg_2F1_conj_renorm +, hyperg_2F0_e +, hyperg_2F0 +) where + +import Foreign(Ptr) +import GSL.Special.Internal + +-- | wrapper for int gsl_sf_hyperg_0F1_e(double c,double x,gsl_sf_result* result); +hyperg_0F1_e :: Double -> Double -> (Double,Double) +hyperg_0F1_e c x = createSFR "hyperg_0F1_e" $ gsl_sf_hyperg_0F1_e c x +foreign import ccall "hyperg.h gsl_sf_hyperg_0F1_e" gsl_sf_hyperg_0F1_e :: Double -> Double -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_hyperg_0F1(double c,double x); +hyperg_0F1 :: Double -> Double -> Double +hyperg_0F1 = gsl_sf_hyperg_0F1 +foreign import ccall "hyperg.h gsl_sf_hyperg_0F1" gsl_sf_hyperg_0F1 :: Double -> Double -> Double + +-- | wrapper for int gsl_sf_hyperg_1F1_int_e(int m,int n,double x,gsl_sf_result* result); +hyperg_1F1_int_e :: Int -> Int -> Double -> (Double,Double) +hyperg_1F1_int_e m n x = createSFR "hyperg_1F1_int_e" $ gsl_sf_hyperg_1F1_int_e m n x +foreign import ccall "hyperg.h gsl_sf_hyperg_1F1_int_e" gsl_sf_hyperg_1F1_int_e :: Int -> Int -> Double -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_hyperg_1F1_int(int m,int n,double x); +hyperg_1F1_int :: Int -> Int -> Double -> Double +hyperg_1F1_int = gsl_sf_hyperg_1F1_int +foreign import ccall "hyperg.h gsl_sf_hyperg_1F1_int" gsl_sf_hyperg_1F1_int :: Int -> Int -> Double -> Double + +-- | wrapper for int gsl_sf_hyperg_1F1_e(double a,double b,double x,gsl_sf_result* result); +hyperg_1F1_e :: Double -> Double -> Double -> (Double,Double) +hyperg_1F1_e a b x = createSFR "hyperg_1F1_e" $ gsl_sf_hyperg_1F1_e a b x +foreign import ccall "hyperg.h gsl_sf_hyperg_1F1_e" gsl_sf_hyperg_1F1_e :: Double -> Double -> Double -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_hyperg_1F1(double a,double b,double x); +hyperg_1F1 :: Double -> Double -> Double -> Double +hyperg_1F1 = gsl_sf_hyperg_1F1 +foreign import ccall "hyperg.h gsl_sf_hyperg_1F1" gsl_sf_hyperg_1F1 :: Double -> Double -> Double -> Double + +-- | wrapper for int gsl_sf_hyperg_U_int_e(int m,int n,double x,gsl_sf_result* result); +hyperg_U_int_e :: Int -> Int -> Double -> (Double,Double) +hyperg_U_int_e m n x = createSFR "hyperg_U_int_e" $ gsl_sf_hyperg_U_int_e m n x +foreign import ccall "hyperg.h gsl_sf_hyperg_U_int_e" gsl_sf_hyperg_U_int_e :: Int -> Int -> Double -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_hyperg_U_int(int m,int n,double x); +hyperg_U_int :: Int -> Int -> Double -> Double +hyperg_U_int = gsl_sf_hyperg_U_int +foreign import ccall "hyperg.h gsl_sf_hyperg_U_int" gsl_sf_hyperg_U_int :: Int -> Int -> Double -> Double + +-- | wrapper for int gsl_sf_hyperg_U_int_e10_e(int m,int n,double x,gsl_sf_result_e10* result); +hyperg_U_int_e10_e :: Int -> Int -> Double -> (Double,Int,Double) +hyperg_U_int_e10_e m n x = createSFR_E10 "hyperg_U_int_e10_e" $ gsl_sf_hyperg_U_int_e10_e m n x +foreign import ccall "hyperg.h gsl_sf_hyperg_U_int_e10_e" gsl_sf_hyperg_U_int_e10_e :: Int -> Int -> Double -> Ptr () -> IO(Int) + +-- | wrapper for int gsl_sf_hyperg_U_e(double a,double b,double x,gsl_sf_result* result); +hyperg_U_e :: Double -> Double -> Double -> (Double,Double) +hyperg_U_e a b x = createSFR "hyperg_U_e" $ gsl_sf_hyperg_U_e a b x +foreign import ccall "hyperg.h gsl_sf_hyperg_U_e" gsl_sf_hyperg_U_e :: Double -> Double -> Double -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_hyperg_U(double a,double b,double x); +hyperg_U :: Double -> Double -> Double -> Double +hyperg_U = gsl_sf_hyperg_U +foreign import ccall "hyperg.h gsl_sf_hyperg_U" gsl_sf_hyperg_U :: Double -> Double -> Double -> Double + +-- | wrapper for int gsl_sf_hyperg_U_e10_e(double a,double b,double x,gsl_sf_result_e10* result); +hyperg_U_e10_e :: Double -> Double -> Double -> (Double,Int,Double) +hyperg_U_e10_e a b x = createSFR_E10 "hyperg_U_e10_e" $ gsl_sf_hyperg_U_e10_e a b x +foreign import ccall "hyperg.h gsl_sf_hyperg_U_e10_e" gsl_sf_hyperg_U_e10_e :: Double -> Double -> Double -> Ptr () -> IO(Int) + +-- | wrapper for int gsl_sf_hyperg_2F1_e(double a,double b,double c,double x,gsl_sf_result* result); +hyperg_2F1_e :: Double -> Double -> Double -> Double -> (Double,Double) +hyperg_2F1_e a b c x = createSFR "hyperg_2F1_e" $ gsl_sf_hyperg_2F1_e a b c x +foreign import ccall "hyperg.h gsl_sf_hyperg_2F1_e" gsl_sf_hyperg_2F1_e :: Double -> Double -> Double -> Double -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_hyperg_2F1(double a,double b,double c,double x); +hyperg_2F1 :: Double -> Double -> Double -> Double -> Double +hyperg_2F1 = gsl_sf_hyperg_2F1 +foreign import ccall "hyperg.h gsl_sf_hyperg_2F1" gsl_sf_hyperg_2F1 :: Double -> Double -> Double -> Double -> Double + +-- | wrapper for int gsl_sf_hyperg_2F1_conj_e(double aR,double aI,double c,double x,gsl_sf_result* result); +hyperg_2F1_conj_e :: Double -> Double -> Double -> Double -> (Double,Double) +hyperg_2F1_conj_e aR aI c x = createSFR "hyperg_2F1_conj_e" $ gsl_sf_hyperg_2F1_conj_e aR aI c x +foreign import ccall "hyperg.h gsl_sf_hyperg_2F1_conj_e" gsl_sf_hyperg_2F1_conj_e :: Double -> Double -> Double -> Double -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_hyperg_2F1_conj(double aR,double aI,double c,double x); +hyperg_2F1_conj :: Double -> Double -> Double -> Double -> Double +hyperg_2F1_conj = gsl_sf_hyperg_2F1_conj +foreign import ccall "hyperg.h gsl_sf_hyperg_2F1_conj" gsl_sf_hyperg_2F1_conj :: Double -> Double -> Double -> Double -> Double + +-- | wrapper for int gsl_sf_hyperg_2F1_renorm_e(double a,double b,double c,double x,gsl_sf_result* result); +hyperg_2F1_renorm_e :: Double -> Double -> Double -> Double -> (Double,Double) +hyperg_2F1_renorm_e a b c x = createSFR "hyperg_2F1_renorm_e" $ gsl_sf_hyperg_2F1_renorm_e a b c x +foreign import ccall "hyperg.h gsl_sf_hyperg_2F1_renorm_e" gsl_sf_hyperg_2F1_renorm_e :: Double -> Double -> Double -> Double -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_hyperg_2F1_renorm(double a,double b,double c,double x); +hyperg_2F1_renorm :: Double -> Double -> Double -> Double -> Double +hyperg_2F1_renorm = gsl_sf_hyperg_2F1_renorm +foreign import ccall "hyperg.h gsl_sf_hyperg_2F1_renorm" gsl_sf_hyperg_2F1_renorm :: Double -> Double -> Double -> Double -> Double + +-- | wrapper for int gsl_sf_hyperg_2F1_conj_renorm_e(double aR,double aI,double c,double x,gsl_sf_result* result); +hyperg_2F1_conj_renorm_e :: Double -> Double -> Double -> Double -> (Double,Double) +hyperg_2F1_conj_renorm_e aR aI c x = createSFR "hyperg_2F1_conj_renorm_e" $ gsl_sf_hyperg_2F1_conj_renorm_e aR aI c x +foreign import ccall "hyperg.h gsl_sf_hyperg_2F1_conj_renorm_e" gsl_sf_hyperg_2F1_conj_renorm_e :: Double -> Double -> Double -> Double -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_hyperg_2F1_conj_renorm(double aR,double aI,double c,double x); +hyperg_2F1_conj_renorm :: Double -> Double -> Double -> Double -> Double +hyperg_2F1_conj_renorm = gsl_sf_hyperg_2F1_conj_renorm +foreign import ccall "hyperg.h gsl_sf_hyperg_2F1_conj_renorm" gsl_sf_hyperg_2F1_conj_renorm :: Double -> Double -> Double -> Double -> Double + +-- | wrapper for int gsl_sf_hyperg_2F0_e(double a,double b,double x,gsl_sf_result* result); +hyperg_2F0_e :: Double -> Double -> Double -> (Double,Double) +hyperg_2F0_e a b x = createSFR "hyperg_2F0_e" $ gsl_sf_hyperg_2F0_e a b x +foreign import ccall "hyperg.h gsl_sf_hyperg_2F0_e" gsl_sf_hyperg_2F0_e :: Double -> Double -> Double -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_hyperg_2F0(double a,double b,double x); +hyperg_2F0 :: Double -> Double -> Double -> Double +hyperg_2F0 = gsl_sf_hyperg_2F0 +foreign import ccall "hyperg.h gsl_sf_hyperg_2F0" gsl_sf_hyperg_2F0 :: Double -> Double -> Double -> Double diff --git a/lib/GSL/Special/Laguerre.hs b/lib/GSL/Special/Laguerre.hs new file mode 100644 index 0000000..6fa4343 --- /dev/null +++ b/lib/GSL/Special/Laguerre.hs @@ -0,0 +1,67 @@ +------------------------------------------------------------ +{- | +Module : GSL.Special.Laguerre +Copyright : (c) Alberto Ruiz 2006 +License : GPL-style +Maintainer : Alberto Ruiz (aruiz at um dot es) +Stability : provisional +Portability : uses ffi + + + +-} +------------------------------------------------------------ + +module GSL.Special.Laguerre( + laguerre_1_e +, laguerre_2_e +, laguerre_3_e +, laguerre_1 +, laguerre_2 +, laguerre_3 +, laguerre_n_e +, laguerre_n +) where + +import Foreign(Ptr) +import GSL.Special.Internal + +-- | wrapper for int gsl_sf_laguerre_1_e(double a,double x,gsl_sf_result* result); +laguerre_1_e :: Double -> Double -> (Double,Double) +laguerre_1_e a x = createSFR "laguerre_1_e" $ gsl_sf_laguerre_1_e a x +foreign import ccall "laguerre.h gsl_sf_laguerre_1_e" gsl_sf_laguerre_1_e :: Double -> Double -> Ptr Double -> IO(Int) + +-- | wrapper for int gsl_sf_laguerre_2_e(double a,double x,gsl_sf_result* result); +laguerre_2_e :: Double -> Double -> (Double,Double) +laguerre_2_e a x = createSFR "laguerre_2_e" $ gsl_sf_laguerre_2_e a x +foreign import ccall "laguerre.h gsl_sf_laguerre_2_e" gsl_sf_laguerre_2_e :: Double -> Double -> Ptr Double -> IO(Int) + +-- | wrapper for int gsl_sf_laguerre_3_e(double a,double x,gsl_sf_result* result); +laguerre_3_e :: Double -> Double -> (Double,Double) +laguerre_3_e a x = createSFR "laguerre_3_e" $ gsl_sf_laguerre_3_e a x +foreign import ccall "laguerre.h gsl_sf_laguerre_3_e" gsl_sf_laguerre_3_e :: Double -> Double -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_laguerre_1(double a,double x); +laguerre_1 :: Double -> Double -> Double +laguerre_1 = gsl_sf_laguerre_1 +foreign import ccall "laguerre.h gsl_sf_laguerre_1" gsl_sf_laguerre_1 :: Double -> Double -> Double + +-- | wrapper for double gsl_sf_laguerre_2(double a,double x); +laguerre_2 :: Double -> Double -> Double +laguerre_2 = gsl_sf_laguerre_2 +foreign import ccall "laguerre.h gsl_sf_laguerre_2" gsl_sf_laguerre_2 :: Double -> Double -> Double + +-- | wrapper for double gsl_sf_laguerre_3(double a,double x); +laguerre_3 :: Double -> Double -> Double +laguerre_3 = gsl_sf_laguerre_3 +foreign import ccall "laguerre.h gsl_sf_laguerre_3" gsl_sf_laguerre_3 :: Double -> Double -> Double + +-- | wrapper for int gsl_sf_laguerre_n_e(int n,double a,double x,gsl_sf_result* result); +laguerre_n_e :: Int -> Double -> Double -> (Double,Double) +laguerre_n_e n a x = createSFR "laguerre_n_e" $ gsl_sf_laguerre_n_e n a x +foreign import ccall "laguerre.h gsl_sf_laguerre_n_e" gsl_sf_laguerre_n_e :: Int -> Double -> Double -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_laguerre_n(int n,double a,double x); +laguerre_n :: Int -> Double -> Double -> Double +laguerre_n = gsl_sf_laguerre_n +foreign import ccall "laguerre.h gsl_sf_laguerre_n" gsl_sf_laguerre_n :: Int -> Double -> Double -> Double 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 diff --git a/lib/GSL/Special/Log.hs b/lib/GSL/Special/Log.hs new file mode 100644 index 0000000..9fd51a8 --- /dev/null +++ b/lib/GSL/Special/Log.hs @@ -0,0 +1,72 @@ +------------------------------------------------------------ +{- | +Module : GSL.Special.Log +Copyright : (c) Alberto Ruiz 2006 +License : GPL-style +Maintainer : Alberto Ruiz (aruiz at um dot es) +Stability : provisional +Portability : uses ffi + + + +-} +------------------------------------------------------------ + +module GSL.Special.Log( + log_e +, GSL.Special.Log.log +, log_abs_e +, log_abs +, log_1plusx_e +, log_1plusx +, log_1plusx_mx_e +, log_1plusx_mx +) where + +import Foreign(Ptr) +import GSL.Special.Internal + +-- | wrapper for int gsl_sf_log_e(double x,gsl_sf_result* result); +log_e :: Double -> (Double,Double) +log_e x = createSFR "log_e" $ gsl_sf_log_e x +foreign import ccall "log.h gsl_sf_log_e" gsl_sf_log_e :: Double -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_log(double x); +log :: Double -> Double +log = gsl_sf_log +foreign import ccall "log.h gsl_sf_log" gsl_sf_log :: Double -> Double + +-- | wrapper for int gsl_sf_log_abs_e(double x,gsl_sf_result* result); +log_abs_e :: Double -> (Double,Double) +log_abs_e x = createSFR "log_abs_e" $ gsl_sf_log_abs_e x +foreign import ccall "log.h gsl_sf_log_abs_e" gsl_sf_log_abs_e :: Double -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_log_abs(double x); +log_abs :: Double -> Double +log_abs = gsl_sf_log_abs +foreign import ccall "log.h gsl_sf_log_abs" gsl_sf_log_abs :: Double -> Double + +-- | wrapper for int gsl_sf_complex_log_e(double zr,double zi,gsl_sf_result* lnr,gsl_sf_result* theta); +complex_log_e :: Double -> Double -> Ptr Double -> (Double,Double) +complex_log_e zr zi lnr = createSFR "complex_log_e" $ gsl_sf_complex_log_e zr zi lnr +foreign import ccall "log.h gsl_sf_complex_log_e" gsl_sf_complex_log_e :: Double -> Double -> Ptr Double -> Ptr Double -> IO(Int) + +-- | wrapper for int gsl_sf_log_1plusx_e(double x,gsl_sf_result* result); +log_1plusx_e :: Double -> (Double,Double) +log_1plusx_e x = createSFR "log_1plusx_e" $ gsl_sf_log_1plusx_e x +foreign import ccall "log.h gsl_sf_log_1plusx_e" gsl_sf_log_1plusx_e :: Double -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_log_1plusx(double x); +log_1plusx :: Double -> Double +log_1plusx = gsl_sf_log_1plusx +foreign import ccall "log.h gsl_sf_log_1plusx" gsl_sf_log_1plusx :: Double -> Double + +-- | wrapper for int gsl_sf_log_1plusx_mx_e(double x,gsl_sf_result* result); +log_1plusx_mx_e :: Double -> (Double,Double) +log_1plusx_mx_e x = createSFR "log_1plusx_mx_e" $ gsl_sf_log_1plusx_mx_e x +foreign import ccall "log.h gsl_sf_log_1plusx_mx_e" gsl_sf_log_1plusx_mx_e :: Double -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_log_1plusx_mx(double x); +log_1plusx_mx :: Double -> Double +log_1plusx_mx = gsl_sf_log_1plusx_mx +foreign import ccall "log.h gsl_sf_log_1plusx_mx" gsl_sf_log_1plusx_mx :: Double -> Double 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 @@ +------------------------------------------------------------ +{- | +Module : GSL.Special.Pow_int +Copyright : (c) Alberto Ruiz 2006 +License : GPL-style +Maintainer : Alberto Ruiz (aruiz at um dot es) +Stability : provisional +Portability : uses ffi + + + +-} +------------------------------------------------------------ + +module GSL.Special.Pow_int( + pow_int_e +, pow_int +) where + +import Foreign(Ptr) +import GSL.Special.Internal + +-- | wrapper for int gsl_sf_pow_int_e(double x,int n,gsl_sf_result* result); +pow_int_e :: Double -> Int -> (Double,Double) +pow_int_e x n = createSFR "pow_int_e" $ gsl_sf_pow_int_e x n +foreign import ccall "pow_int.h gsl_sf_pow_int_e" gsl_sf_pow_int_e :: Double -> Int -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_pow_int(double x,int n); +pow_int :: Double -> Int -> Double +pow_int = gsl_sf_pow_int +foreign import ccall "pow_int.h gsl_sf_pow_int" gsl_sf_pow_int :: Double -> Int -> Double diff --git a/lib/GSL/Special/Psi.hs b/lib/GSL/Special/Psi.hs new file mode 100644 index 0000000..59c9495 --- /dev/null +++ b/lib/GSL/Special/Psi.hs @@ -0,0 +1,91 @@ +------------------------------------------------------------ +{- | +Module : GSL.Special.Psi +Copyright : (c) Alberto Ruiz 2006 +License : GPL-style +Maintainer : Alberto Ruiz (aruiz at um dot es) +Stability : provisional +Portability : uses ffi + + + +-} +------------------------------------------------------------ + +module GSL.Special.Psi( + psi_int_e +, psi_int +, psi_e +, psi +, psi_1piy_e +, psi_1piy +, psi_1_int_e +, psi_1_int +, psi_1_e +, psi_1 +, psi_n_e +, psi_n +) where + +import Foreign(Ptr) +import GSL.Special.Internal + +-- | wrapper for int gsl_sf_psi_int_e(int n,gsl_sf_result* result); +psi_int_e :: Int -> (Double,Double) +psi_int_e n = createSFR "psi_int_e" $ gsl_sf_psi_int_e n +foreign import ccall "psi.h gsl_sf_psi_int_e" gsl_sf_psi_int_e :: Int -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_psi_int(int n); +psi_int :: Int -> Double +psi_int = gsl_sf_psi_int +foreign import ccall "psi.h gsl_sf_psi_int" gsl_sf_psi_int :: Int -> Double + +-- | wrapper for int gsl_sf_psi_e(double x,gsl_sf_result* result); +psi_e :: Double -> (Double,Double) +psi_e x = createSFR "psi_e" $ gsl_sf_psi_e x +foreign import ccall "psi.h gsl_sf_psi_e" gsl_sf_psi_e :: Double -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_psi(double x); +psi :: Double -> Double +psi = gsl_sf_psi +foreign import ccall "psi.h gsl_sf_psi" gsl_sf_psi :: Double -> Double + +-- | wrapper for int gsl_sf_psi_1piy_e(double y,gsl_sf_result* result); +psi_1piy_e :: Double -> (Double,Double) +psi_1piy_e y = createSFR "psi_1piy_e" $ gsl_sf_psi_1piy_e y +foreign import ccall "psi.h gsl_sf_psi_1piy_e" gsl_sf_psi_1piy_e :: Double -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_psi_1piy(double y); +psi_1piy :: Double -> Double +psi_1piy = gsl_sf_psi_1piy +foreign import ccall "psi.h gsl_sf_psi_1piy" gsl_sf_psi_1piy :: Double -> Double + +-- | wrapper for int gsl_sf_psi_1_int_e(int n,gsl_sf_result* result); +psi_1_int_e :: Int -> (Double,Double) +psi_1_int_e n = createSFR "psi_1_int_e" $ gsl_sf_psi_1_int_e n +foreign import ccall "psi.h gsl_sf_psi_1_int_e" gsl_sf_psi_1_int_e :: Int -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_psi_1_int(int n); +psi_1_int :: Int -> Double +psi_1_int = gsl_sf_psi_1_int +foreign import ccall "psi.h gsl_sf_psi_1_int" gsl_sf_psi_1_int :: Int -> Double + +-- | wrapper for int gsl_sf_psi_1_e(double x,gsl_sf_result* result); +psi_1_e :: Double -> (Double,Double) +psi_1_e x = createSFR "psi_1_e" $ gsl_sf_psi_1_e x +foreign import ccall "psi.h gsl_sf_psi_1_e" gsl_sf_psi_1_e :: Double -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_psi_1(double x); +psi_1 :: Double -> Double +psi_1 = gsl_sf_psi_1 +foreign import ccall "psi.h gsl_sf_psi_1" gsl_sf_psi_1 :: Double -> Double + +-- | wrapper for int gsl_sf_psi_n_e(int n,double x,gsl_sf_result* result); +psi_n_e :: Int -> Double -> (Double,Double) +psi_n_e n x = createSFR "psi_n_e" $ gsl_sf_psi_n_e n x +foreign import ccall "psi.h gsl_sf_psi_n_e" gsl_sf_psi_n_e :: Int -> Double -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_psi_n(int n,double x); +psi_n :: Int -> Double -> Double +psi_n = gsl_sf_psi_n +foreign import ccall "psi.h gsl_sf_psi_n" gsl_sf_psi_n :: Int -> Double -> Double diff --git a/lib/GSL/Special/Synchrotron.hs b/lib/GSL/Special/Synchrotron.hs new file mode 100644 index 0000000..da49c34 --- /dev/null +++ b/lib/GSL/Special/Synchrotron.hs @@ -0,0 +1,43 @@ +------------------------------------------------------------ +{- | +Module : GSL.Special.Synchrotron +Copyright : (c) Alberto Ruiz 2006 +License : GPL-style +Maintainer : Alberto Ruiz (aruiz at um dot es) +Stability : provisional +Portability : uses ffi + + + +-} +------------------------------------------------------------ + +module GSL.Special.Synchrotron( + synchrotron_1_e +, synchrotron_1 +, synchrotron_2_e +, synchrotron_2 +) where + +import Foreign(Ptr) +import GSL.Special.Internal + +-- | wrapper for int gsl_sf_synchrotron_1_e(double x,gsl_sf_result* result); +synchrotron_1_e :: Double -> (Double,Double) +synchrotron_1_e x = createSFR "synchrotron_1_e" $ gsl_sf_synchrotron_1_e x +foreign import ccall "synchrotron.h gsl_sf_synchrotron_1_e" gsl_sf_synchrotron_1_e :: Double -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_synchrotron_1(double x); +synchrotron_1 :: Double -> Double +synchrotron_1 = gsl_sf_synchrotron_1 +foreign import ccall "synchrotron.h gsl_sf_synchrotron_1" gsl_sf_synchrotron_1 :: Double -> Double + +-- | wrapper for int gsl_sf_synchrotron_2_e(double x,gsl_sf_result* result); +synchrotron_2_e :: Double -> (Double,Double) +synchrotron_2_e x = createSFR "synchrotron_2_e" $ gsl_sf_synchrotron_2_e x +foreign import ccall "synchrotron.h gsl_sf_synchrotron_2_e" gsl_sf_synchrotron_2_e :: Double -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_synchrotron_2(double x); +synchrotron_2 :: Double -> Double +synchrotron_2 = gsl_sf_synchrotron_2 +foreign import ccall "synchrotron.h gsl_sf_synchrotron_2" gsl_sf_synchrotron_2 :: Double -> Double diff --git a/lib/GSL/Special/Trig.hs b/lib/GSL/Special/Trig.hs new file mode 100644 index 0000000..56d3933 --- /dev/null +++ b/lib/GSL/Special/Trig.hs @@ -0,0 +1,162 @@ +------------------------------------------------------------ +{- | +Module : GSL.Special.Trig +Copyright : (c) Alberto Ruiz 2006 +License : GPL-style +Maintainer : Alberto Ruiz (aruiz at um dot es) +Stability : provisional +Portability : uses ffi + + + +-} +------------------------------------------------------------ + +module GSL.Special.Trig( + sin_e +, GSL.Special.Trig.sin +, cos_e +, GSL.Special.Trig.cos +, hypot_e +, hypot +, sinc_e +, sinc +, lnsinh_e +, lnsinh +, lncosh_e +, lncosh +, sin_err_e +, cos_err_e +, angle_restrict_symm +, angle_restrict_pos +, angle_restrict_symm_err_e +, angle_restrict_pos_err_e +) where + +import Foreign(Ptr) +import GSL.Special.Internal + +-- | wrapper for int gsl_sf_sin_e(double x,gsl_sf_result* result); +sin_e :: Double -> (Double,Double) +sin_e x = createSFR "sin_e" $ gsl_sf_sin_e x +foreign import ccall "trig.h gsl_sf_sin_e" gsl_sf_sin_e :: Double -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_sin(double x); +sin :: Double -> Double +sin = gsl_sf_sin +foreign import ccall "trig.h gsl_sf_sin" gsl_sf_sin :: Double -> Double + +-- | wrapper for int gsl_sf_cos_e(double x,gsl_sf_result* result); +cos_e :: Double -> (Double,Double) +cos_e x = createSFR "cos_e" $ gsl_sf_cos_e x +foreign import ccall "trig.h gsl_sf_cos_e" gsl_sf_cos_e :: Double -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_cos(double x); +cos :: Double -> Double +cos = gsl_sf_cos +foreign import ccall "trig.h gsl_sf_cos" gsl_sf_cos :: Double -> Double + +-- | wrapper for int gsl_sf_hypot_e(double x,double y,gsl_sf_result* result); +hypot_e :: Double -> Double -> (Double,Double) +hypot_e x y = createSFR "hypot_e" $ gsl_sf_hypot_e x y +foreign import ccall "trig.h gsl_sf_hypot_e" gsl_sf_hypot_e :: Double -> Double -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_hypot(double x,double y); +hypot :: Double -> Double -> Double +hypot = gsl_sf_hypot +foreign import ccall "trig.h gsl_sf_hypot" gsl_sf_hypot :: Double -> Double -> Double + +-- | wrapper for int gsl_sf_complex_sin_e(double zr,double zi,gsl_sf_result* szr,gsl_sf_result* szi); +complex_sin_e :: Double -> Double -> Ptr Double -> (Double,Double) +complex_sin_e zr zi szr = createSFR "complex_sin_e" $ gsl_sf_complex_sin_e zr zi szr +foreign import ccall "trig.h gsl_sf_complex_sin_e" gsl_sf_complex_sin_e :: Double -> Double -> Ptr Double -> Ptr Double -> IO(Int) + +-- | wrapper for int gsl_sf_complex_cos_e(double zr,double zi,gsl_sf_result* czr,gsl_sf_result* czi); +complex_cos_e :: Double -> Double -> Ptr Double -> (Double,Double) +complex_cos_e zr zi czr = createSFR "complex_cos_e" $ gsl_sf_complex_cos_e zr zi czr +foreign import ccall "trig.h gsl_sf_complex_cos_e" gsl_sf_complex_cos_e :: Double -> Double -> Ptr Double -> Ptr Double -> IO(Int) + +-- | wrapper for int gsl_sf_complex_logsin_e(double zr,double zi,gsl_sf_result* lszr,gsl_sf_result* lszi); +complex_logsin_e :: Double -> Double -> Ptr Double -> (Double,Double) +complex_logsin_e zr zi lszr = createSFR "complex_logsin_e" $ gsl_sf_complex_logsin_e zr zi lszr +foreign import ccall "trig.h gsl_sf_complex_logsin_e" gsl_sf_complex_logsin_e :: Double -> Double -> Ptr Double -> Ptr Double -> IO(Int) + +-- | wrapper for int gsl_sf_sinc_e(double x,gsl_sf_result* result); +sinc_e :: Double -> (Double,Double) +sinc_e x = createSFR "sinc_e" $ gsl_sf_sinc_e x +foreign import ccall "trig.h gsl_sf_sinc_e" gsl_sf_sinc_e :: Double -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_sinc(double x); +sinc :: Double -> Double +sinc = gsl_sf_sinc +foreign import ccall "trig.h gsl_sf_sinc" gsl_sf_sinc :: Double -> Double + +-- | wrapper for int gsl_sf_lnsinh_e(double x,gsl_sf_result* result); +lnsinh_e :: Double -> (Double,Double) +lnsinh_e x = createSFR "lnsinh_e" $ gsl_sf_lnsinh_e x +foreign import ccall "trig.h gsl_sf_lnsinh_e" gsl_sf_lnsinh_e :: Double -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_lnsinh(double x); +lnsinh :: Double -> Double +lnsinh = gsl_sf_lnsinh +foreign import ccall "trig.h gsl_sf_lnsinh" gsl_sf_lnsinh :: Double -> Double + +-- | wrapper for int gsl_sf_lncosh_e(double x,gsl_sf_result* result); +lncosh_e :: Double -> (Double,Double) +lncosh_e x = createSFR "lncosh_e" $ gsl_sf_lncosh_e x +foreign import ccall "trig.h gsl_sf_lncosh_e" gsl_sf_lncosh_e :: Double -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_lncosh(double x); +lncosh :: Double -> Double +lncosh = gsl_sf_lncosh +foreign import ccall "trig.h gsl_sf_lncosh" gsl_sf_lncosh :: Double -> Double + +-- | wrapper for int gsl_sf_polar_to_rect(double r,double theta,gsl_sf_result* x,gsl_sf_result* y); +polar_to_rect :: Double -> Double -> Ptr Double -> (Double,Double) +polar_to_rect r theta x = createSFR "polar_to_rect" $ gsl_sf_polar_to_rect r theta x +foreign import ccall "trig.h gsl_sf_polar_to_rect" gsl_sf_polar_to_rect :: Double -> Double -> Ptr Double -> Ptr Double -> IO(Int) + +-- | wrapper for int gsl_sf_rect_to_polar(double x,double y,gsl_sf_result* r,gsl_sf_result* theta); +rect_to_polar :: Double -> Double -> Ptr Double -> (Double,Double) +rect_to_polar x y r = createSFR "rect_to_polar" $ gsl_sf_rect_to_polar x y r +foreign import ccall "trig.h gsl_sf_rect_to_polar" gsl_sf_rect_to_polar :: Double -> Double -> Ptr Double -> Ptr Double -> IO(Int) + +-- | wrapper for int gsl_sf_sin_err_e(double x,double dx,gsl_sf_result* result); +sin_err_e :: Double -> Double -> (Double,Double) +sin_err_e x dx = createSFR "sin_err_e" $ gsl_sf_sin_err_e x dx +foreign import ccall "trig.h gsl_sf_sin_err_e" gsl_sf_sin_err_e :: Double -> Double -> Ptr Double -> IO(Int) + +-- | wrapper for int gsl_sf_cos_err_e(double x,double dx,gsl_sf_result* result); +cos_err_e :: Double -> Double -> (Double,Double) +cos_err_e x dx = createSFR "cos_err_e" $ gsl_sf_cos_err_e x dx +foreign import ccall "trig.h gsl_sf_cos_err_e" gsl_sf_cos_err_e :: Double -> Double -> Ptr Double -> IO(Int) + +-- | wrapper for int gsl_sf_angle_restrict_symm_e(double* theta); +angle_restrict_symm_e :: Ptr Double -> Int +angle_restrict_symm_e = gsl_sf_angle_restrict_symm_e +foreign import ccall "trig.h gsl_sf_angle_restrict_symm_e" gsl_sf_angle_restrict_symm_e :: Ptr Double -> Int + +-- | wrapper for double gsl_sf_angle_restrict_symm(double theta); +angle_restrict_symm :: Double -> Double +angle_restrict_symm = gsl_sf_angle_restrict_symm +foreign import ccall "trig.h gsl_sf_angle_restrict_symm" gsl_sf_angle_restrict_symm :: Double -> Double + +-- | wrapper for int gsl_sf_angle_restrict_pos_e(double* theta); +angle_restrict_pos_e :: Ptr Double -> Int +angle_restrict_pos_e = gsl_sf_angle_restrict_pos_e +foreign import ccall "trig.h gsl_sf_angle_restrict_pos_e" gsl_sf_angle_restrict_pos_e :: Ptr Double -> Int + +-- | wrapper for double gsl_sf_angle_restrict_pos(double theta); +angle_restrict_pos :: Double -> Double +angle_restrict_pos = gsl_sf_angle_restrict_pos +foreign import ccall "trig.h gsl_sf_angle_restrict_pos" gsl_sf_angle_restrict_pos :: Double -> Double + +-- | wrapper for int gsl_sf_angle_restrict_symm_err_e(double theta,gsl_sf_result* result); +angle_restrict_symm_err_e :: Double -> (Double,Double) +angle_restrict_symm_err_e theta = createSFR "angle_restrict_symm_err_e" $ gsl_sf_angle_restrict_symm_err_e theta +foreign import ccall "trig.h gsl_sf_angle_restrict_symm_err_e" gsl_sf_angle_restrict_symm_err_e :: Double -> Ptr Double -> IO(Int) + +-- | wrapper for int gsl_sf_angle_restrict_pos_err_e(double theta,gsl_sf_result* result); +angle_restrict_pos_err_e :: Double -> (Double,Double) +angle_restrict_pos_err_e theta = createSFR "angle_restrict_pos_err_e" $ gsl_sf_angle_restrict_pos_err_e theta +foreign import ccall "trig.h gsl_sf_angle_restrict_pos_err_e" gsl_sf_angle_restrict_pos_err_e :: Double -> Ptr Double -> IO(Int) diff --git a/lib/GSL/Special/Zeta.hs b/lib/GSL/Special/Zeta.hs new file mode 100644 index 0000000..ae514c0 --- /dev/null +++ b/lib/GSL/Special/Zeta.hs @@ -0,0 +1,103 @@ +------------------------------------------------------------ +{- | +Module : GSL.Special.Zeta +Copyright : (c) Alberto Ruiz 2006 +License : GPL-style +Maintainer : Alberto Ruiz (aruiz at um dot es) +Stability : provisional +Portability : uses ffi + + + +-} +------------------------------------------------------------ + +module GSL.Special.Zeta( + zeta_int_e +, zeta_int +, zeta_e +, zeta +, zetam1_e +, zetam1 +, zetam1_int_e +, zetam1_int +, hzeta_e +, hzeta +, eta_int_e +, eta_int +, eta_e +, eta +) where + +import Foreign(Ptr) +import GSL.Special.Internal + +-- | wrapper for int gsl_sf_zeta_int_e(int n,gsl_sf_result* result); +zeta_int_e :: Int -> (Double,Double) +zeta_int_e n = createSFR "zeta_int_e" $ gsl_sf_zeta_int_e n +foreign import ccall "zeta.h gsl_sf_zeta_int_e" gsl_sf_zeta_int_e :: Int -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_zeta_int(int n); +zeta_int :: Int -> Double +zeta_int = gsl_sf_zeta_int +foreign import ccall "zeta.h gsl_sf_zeta_int" gsl_sf_zeta_int :: Int -> Double + +-- | wrapper for int gsl_sf_zeta_e(double s,gsl_sf_result* result); +zeta_e :: Double -> (Double,Double) +zeta_e s = createSFR "zeta_e" $ gsl_sf_zeta_e s +foreign import ccall "zeta.h gsl_sf_zeta_e" gsl_sf_zeta_e :: Double -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_zeta(double s); +zeta :: Double -> Double +zeta = gsl_sf_zeta +foreign import ccall "zeta.h gsl_sf_zeta" gsl_sf_zeta :: Double -> Double + +-- | wrapper for int gsl_sf_zetam1_e(double s,gsl_sf_result* result); +zetam1_e :: Double -> (Double,Double) +zetam1_e s = createSFR "zetam1_e" $ gsl_sf_zetam1_e s +foreign import ccall "zeta.h gsl_sf_zetam1_e" gsl_sf_zetam1_e :: Double -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_zetam1(double s); +zetam1 :: Double -> Double +zetam1 = gsl_sf_zetam1 +foreign import ccall "zeta.h gsl_sf_zetam1" gsl_sf_zetam1 :: Double -> Double + +-- | wrapper for int gsl_sf_zetam1_int_e(int s,gsl_sf_result* result); +zetam1_int_e :: Int -> (Double,Double) +zetam1_int_e s = createSFR "zetam1_int_e" $ gsl_sf_zetam1_int_e s +foreign import ccall "zeta.h gsl_sf_zetam1_int_e" gsl_sf_zetam1_int_e :: Int -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_zetam1_int(int s); +zetam1_int :: Int -> Double +zetam1_int = gsl_sf_zetam1_int +foreign import ccall "zeta.h gsl_sf_zetam1_int" gsl_sf_zetam1_int :: Int -> Double + +-- | wrapper for int gsl_sf_hzeta_e(double s,double q,gsl_sf_result* result); +hzeta_e :: Double -> Double -> (Double,Double) +hzeta_e s q = createSFR "hzeta_e" $ gsl_sf_hzeta_e s q +foreign import ccall "zeta.h gsl_sf_hzeta_e" gsl_sf_hzeta_e :: Double -> Double -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_hzeta(double s,double q); +hzeta :: Double -> Double -> Double +hzeta = gsl_sf_hzeta +foreign import ccall "zeta.h gsl_sf_hzeta" gsl_sf_hzeta :: Double -> Double -> Double + +-- | wrapper for int gsl_sf_eta_int_e(int n,gsl_sf_result* result); +eta_int_e :: Int -> (Double,Double) +eta_int_e n = createSFR "eta_int_e" $ gsl_sf_eta_int_e n +foreign import ccall "zeta.h gsl_sf_eta_int_e" gsl_sf_eta_int_e :: Int -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_eta_int(int n); +eta_int :: Int -> Double +eta_int = gsl_sf_eta_int +foreign import ccall "zeta.h gsl_sf_eta_int" gsl_sf_eta_int :: Int -> Double + +-- | wrapper for int gsl_sf_eta_e(double s,gsl_sf_result* result); +eta_e :: Double -> (Double,Double) +eta_e s = createSFR "eta_e" $ gsl_sf_eta_e s +foreign import ccall "zeta.h gsl_sf_eta_e" gsl_sf_eta_e :: Double -> Ptr Double -> IO(Int) + +-- | wrapper for double gsl_sf_eta(double s); +eta :: Double -> Double +eta = gsl_sf_eta +foreign import ccall "zeta.h gsl_sf_eta" gsl_sf_eta :: Double -> Double diff --git a/lib/GSL/Special/auto.hs b/lib/GSL/Special/auto.hs index 42829bb..a6a0f9a 100644 --- a/lib/GSL/Special/auto.hs +++ b/lib/GSL/Special/auto.hs @@ -3,7 +3,7 @@ import Text.ParserCombinators.Parsec import System import Data.List(intersperse, isPrefixOf) -import Data.Char(toUpper) +import Data.Char(toUpper,isUpper,toLower) data Type = Normal Ident | Pointer Ident deriving (Eq, Show) @@ -53,7 +53,7 @@ main = do --mapM (\(Header _ n _) -> putStrLn (drop 7 n ++",")) parsed --putStrLn "" --mapM_ (putStrLn.showFull (name ++".h")) parsed - let exports = rep (")",") where") $ rep ("(\n","(\n ") $ rep (",\n",", ") $ unlines $ ["("]++intersperse "," (map (\(Header _ n _) -> drop 7 n) (filter safe parsed))++[")"] + let exports = rep (")",") where") $ rep ("(\n","(\n ") $ rep (",\n",", ") $ unlines $ ["("]++intersperse "," (map (\(Header _ n _) -> hName n) (filter safe parsed))++[")"] let defs = unlines $ map (showFull (name ++".h")) parsed let imports = "\nimport Foreign(Ptr)\nimport GSL.Special.Internal\n" let mod = modhead name ++ "module GSL.Special."++ upperFirst name++exports++imports++defs @@ -189,22 +189,31 @@ boiler h@(Header t n args) | fst (last args) == Pointer "gsl_sf_result" = boiler isMode (Normal "gsl_mode_t",_) = True isMode _ = False +hName n = f $ drop 7 n + where f (s:ss) = toLower s : ss + boilerResult h@(Header t n args) = - drop 7 n++" :: "++ (fixmd1 $ concat $ intersperse" -> "$ map showHa (init args)) ++" -> " ++ "(Double,Double)\n" ++ - drop 7 n ++ " "++(unwords (map snd (init args)))++ - " = createSFR \""++ drop 7 n ++"\" $ " ++ n ++ " "++(fixmd2 $ unwords (map snd (init args))) + hName n++" :: "++ (fixmd1 $ concat $ intersperse" -> "$ map showHa (init args)) ++" -> " ++ "(Double,Double)\n" ++ + hName n ++ " "++ initArgs args ++ + " = createSFR \""++ hName n ++"\" $ " ++ n ++ " "++ (fixmd2 $ initArgs args) boilerResultE10 h@(Header t n args) = - drop 7 n++" :: "++ (fixmd1 $ concat $ intersperse" -> "$ map showHa (init args)) ++" -> " ++ "(Double,Int,Double)\n" ++ - drop 7 n ++ " "++(unwords (map snd (init args)))++ - " = createSFR_E10 \""++ drop 7 n ++"\" $ " ++ n ++ " "++(fixmd2 $ unwords (map snd (init args))) + hName n++" :: "++ (fixmd1 $ concat $ intersperse" -> "$ map showHa (init args)) ++" -> " ++ "(Double,Int,Double)\n" ++ + hName n ++ " "++ initArgs args ++ + " = createSFR_E10 \""++ hName n ++"\" $ " ++ n ++ " "++ (fixmd2 $ initArgs args) boilerBasic h@(Header t n args) = - drop 7 n++" :: "++ (fixmd1 $ concat $ intersperse" -> "$map showHa args) ++" -> " ++showHt t ++ "\n" ++ - drop 7 n ++ " = " ++fixmd2 n + hName n++" :: "++ (fixmd1 $ concat $ intersperse" -> "$map showHa args) ++" -> " ++showHt t ++ "\n" ++ + hName n ++ " = " ++fixmd2 n boilerMode h@(Header t n args) = - drop 7 n++" :: "++ (fixmd1 $ concat $ intersperse" -> "$ map showHa args) ++" -> " ++ showHt t++"\n" ++ - drop 7 n ++ " "++(unwords (map snd args))++ - " = " ++ n ++ " "++(fixmd2 $ unwords (map snd args)) + hName n++" :: "++ (fixmd1 $ concat $ intersperse" -> "$ map showHa args) ++" -> " ++ showHt t++"\n" ++ + hName n ++ " "++ allArgs args ++ + " = " ++ n ++ " "++ (fixmd2 $ allArgs args) + +cVar (v:vs) | isUpper v = toLower v : v : vs + | otherwise = v:vs + +allArgs args = unwords (map (cVar.snd) args) +initArgs args = unwords (map (cVar.snd) (init args)) \ No newline at end of file diff --git a/lib/GSL/Special/clausen.h b/lib/GSL/Special/clausen.h new file mode 100644 index 0000000..9f0225b --- /dev/null +++ b/lib/GSL/Special/clausen.h @@ -0,0 +1,2 @@ +int gsl_sf_clausen_e(double x,double* result); +double gsl_sf_clausen(double x); diff --git a/lib/GSL/Special/coulomb.h b/lib/GSL/Special/coulomb.h new file mode 100644 index 0000000..2551081 --- /dev/null +++ b/lib/GSL/Special/coulomb.h @@ -0,0 +1,11 @@ +int gsl_sf_hydrogenicR_1_e(double Z,double r,double* result); +double gsl_sf_hydrogenicR_1(double Z,double r); +int gsl_sf_hydrogenicR_e(int n,int l,double Z,double r,double* result); +double gsl_sf_hydrogenicR(int n,int l,double Z,double r); +int gsl_sf_coulomb_wave_FG_e(double eta,double x,double lam_F,int k_lam_G,double* F,double* Fp,double* G,double* Gp,double* exp_F,double* exp_G); +int gsl_sf_coulomb_wave_F_array(double lam_min,int kmax,double eta,double x,double* fc_array,double* F_exponent); +int gsl_sf_coulomb_wave_FG_array(double lam_min,int kmax,double eta,double x,double* fc_array,double* gc_array,double* F_exponent,double* G_exponent); +int gsl_sf_coulomb_wave_FGp_array(double lam_min,int kmax,double eta,double x,double* fc_array,double* fcp_array,double* gc_array,double* gcp_array,double* F_exponent,double* G_exponent); +int gsl_sf_coulomb_wave_sphF_array(double lam_min,int kmax,double eta,double x,double* fc_array,double* F_exponent); +int gsl_sf_coulomb_CL_e(double L,double eta,double* result); +int gsl_sf_coulomb_CL_array(double Lmin,int kmax,double eta,double* cl); diff --git a/lib/GSL/Special/coupling.h b/lib/GSL/Special/coupling.h new file mode 100644 index 0000000..17de964 --- /dev/null +++ b/lib/GSL/Special/coupling.h @@ -0,0 +1,10 @@ +int gsl_sf_coupling_3j_e(int two_ja,int two_jb,int two_jc,int two_ma,int two_mb,int two_mc,double* result); +double gsl_sf_coupling_3j(int two_ja,int two_jb,int two_jc,int two_ma,int two_mb,int two_mc); +int gsl_sf_coupling_6j_e(int two_ja,int two_jb,int two_jc,int two_jd,int two_je,int two_jf,double* result); +double gsl_sf_coupling_6j(int two_ja,int two_jb,int two_jc,int two_jd,int two_je,int two_jf); +int gsl_sf_coupling_RacahW_e(int two_ja,int two_jb,int two_jc,int two_jd,int two_je,int two_jf,double* result); +double gsl_sf_coupling_RacahW(int two_ja,int two_jb,int two_jc,int two_jd,int two_je,int two_jf); +int gsl_sf_coupling_9j_e(int two_ja,int two_jb,int two_jc,int two_jd,int two_je,int two_jf,int two_jg,int two_jh,int two_ji,double* result); +double gsl_sf_coupling_9j(int two_ja,int two_jb,int two_jc,int two_jd,int two_je,int two_jf,int two_jg,int two_jh,int two_ji); +int gsl_sf_coupling_6j_INCORRECT_e(int two_ja,int two_jb,int two_jc,int two_jd,int two_je,int two_jf,double* result); +double gsl_sf_coupling_6j_INCORRECT(int two_ja,int two_jb,int two_jc,int two_jd,int two_je,int two_jf); diff --git a/lib/GSL/Special/dawson.h b/lib/GSL/Special/dawson.h new file mode 100644 index 0000000..5f878b5 --- /dev/null +++ b/lib/GSL/Special/dawson.h @@ -0,0 +1,2 @@ +int gsl_sf_dawson_e(double x,double* result); +double gsl_sf_dawson(double x); diff --git a/lib/GSL/Special/debye.h b/lib/GSL/Special/debye.h new file mode 100644 index 0000000..2424b63 --- /dev/null +++ b/lib/GSL/Special/debye.h @@ -0,0 +1,8 @@ +int gsl_sf_debye_1_e(double x,double* result); +double gsl_sf_debye_1(double x); +int gsl_sf_debye_2_e(double x,double* result); +double gsl_sf_debye_2(double x); +int gsl_sf_debye_3_e(double x,double* result); +double gsl_sf_debye_3(double x); +int gsl_sf_debye_4_e(double x,double* result); +double gsl_sf_debye_4(double x); diff --git a/lib/GSL/Special/dilog.h b/lib/GSL/Special/dilog.h new file mode 100644 index 0000000..ce1599e --- /dev/null +++ b/lib/GSL/Special/dilog.h @@ -0,0 +1,5 @@ +int gsl_sf_dilog_e(double x,double* result); +double gsl_sf_dilog(double x); +int gsl_sf_complex_dilog_xy_e(double x,double y,double* result_re,double* result_im); +int gsl_sf_complex_dilog_e(double r,double theta,double* result_re,double* result_im); +int gsl_sf_complex_spence_xy_e(double x,double y,double* real_sp,double* imag_sp); diff --git a/lib/GSL/Special/elementary.h b/lib/GSL/Special/elementary.h new file mode 100644 index 0000000..bf5adf8 --- /dev/null +++ b/lib/GSL/Special/elementary.h @@ -0,0 +1,3 @@ +int gsl_sf_multiply_e(double x,double y,double* result); +double gsl_sf_multiply(double x,double y); +int gsl_sf_multiply_err_e(double x,double dx,double y,double dy,double* result); diff --git a/lib/GSL/Special/ellint.h b/lib/GSL/Special/ellint.h new file mode 100644 index 0000000..5329c6c --- /dev/null +++ b/lib/GSL/Special/ellint.h @@ -0,0 +1,20 @@ +int gsl_sf_ellint_Kcomp_e(double k,int mode,double* result); +double gsl_sf_ellint_Kcomp(double k,int mode); +int gsl_sf_ellint_Ecomp_e(double k,int mode,double* result); +double gsl_sf_ellint_Ecomp(double k,int mode); +int gsl_sf_ellint_F_e(double phi,double k,int mode,double* result); +double gsl_sf_ellint_F(double phi,double k,int mode); +int gsl_sf_ellint_E_e(double phi,double k,int mode,double* result); +double gsl_sf_ellint_E(double phi,double k,int mode); +int gsl_sf_ellint_P_e(double phi,double k,double n,int mode,double* result); +double gsl_sf_ellint_P(double phi,double k,double n,int mode); +int gsl_sf_ellint_D_e(double phi,double k,double n,int mode,double* result); +double gsl_sf_ellint_D(double phi,double k,double n,int mode); +int gsl_sf_ellint_RC_e(double x,double y,int mode,double* result); +double gsl_sf_ellint_RC(double x,double y,int mode); +int gsl_sf_ellint_RD_e(double x,double y,double z,int mode,double* result); +double gsl_sf_ellint_RD(double x,double y,double z,int mode); +int gsl_sf_ellint_RF_e(double x,double y,double z,int mode,double* result); +double gsl_sf_ellint_RF(double x,double y,double z,int mode); +int gsl_sf_ellint_RJ_e(double x,double y,double z,double p,int mode,double* result); +double gsl_sf_ellint_RJ(double x,double y,double z,double p,int mode); diff --git a/lib/GSL/Special/expint.h b/lib/GSL/Special/expint.h new file mode 100644 index 0000000..1dd469f --- /dev/null +++ b/lib/GSL/Special/expint.h @@ -0,0 +1,24 @@ +int gsl_sf_expint_E1_e(double x,double* result); +double gsl_sf_expint_E1(double x); +int gsl_sf_expint_E2_e(double x,double* result); +double gsl_sf_expint_E2(double x); +int gsl_sf_expint_E1_scaled_e(double x,double* result); +double gsl_sf_expint_E1_scaled(double x); +int gsl_sf_expint_E2_scaled_e(double x,double* result); +double gsl_sf_expint_E2_scaled(double x); +int gsl_sf_expint_Ei_e(double x,double* result); +double gsl_sf_expint_Ei(double x); +int gsl_sf_expint_Ei_scaled_e(double x,double* result); +double gsl_sf_expint_Ei_scaled(double x); +int gsl_sf_Shi_e(double x,double* result); +double gsl_sf_Shi(double x); +int gsl_sf_Chi_e(double x,double* result); +double gsl_sf_Chi(double x); +int gsl_sf_expint_3_e(double x,double* result); +double gsl_sf_expint_3(double x); +int gsl_sf_Si_e(double x,double* result); +double gsl_sf_Si(double x); +int gsl_sf_Ci_e(double x,double* result); +double gsl_sf_Ci(double x); +int gsl_sf_atanint_e(double x,double* result); +double gsl_sf_atanint(double x); diff --git a/lib/GSL/Special/fermi_dirac.h b/lib/GSL/Special/fermi_dirac.h new file mode 100644 index 0000000..7a4c757 --- /dev/null +++ b/lib/GSL/Special/fermi_dirac.h @@ -0,0 +1,18 @@ +int gsl_sf_fermi_dirac_m1_e(double x,double* result); +double gsl_sf_fermi_dirac_m1(double x); +int gsl_sf_fermi_dirac_0_e(double x,double* result); +double gsl_sf_fermi_dirac_0(double x); +int gsl_sf_fermi_dirac_1_e(double x,double* result); +double gsl_sf_fermi_dirac_1(double x); +int gsl_sf_fermi_dirac_2_e(double x,double* result); +double gsl_sf_fermi_dirac_2(double x); +int gsl_sf_fermi_dirac_int_e(int j,double x,double* result); +double gsl_sf_fermi_dirac_int(int j,double x); +int gsl_sf_fermi_dirac_mhalf_e(double x,double* result); +double gsl_sf_fermi_dirac_mhalf(double x); +int gsl_sf_fermi_dirac_half_e(double x,double* result); +double gsl_sf_fermi_dirac_half(double x); +int gsl_sf_fermi_dirac_3half_e(double x,double* result); +double gsl_sf_fermi_dirac_3half(double x); +int gsl_sf_fermi_dirac_inc_0_e(double x,double b,double* result); +double gsl_sf_fermi_dirac_inc_0(double x,double b); diff --git a/lib/GSL/Special/gegenbauer.h b/lib/GSL/Special/gegenbauer.h new file mode 100644 index 0000000..228cbd3 --- /dev/null +++ b/lib/GSL/Special/gegenbauer.h @@ -0,0 +1,9 @@ +int gsl_sf_gegenpoly_1_e(double lambda,double x,double* result); +int gsl_sf_gegenpoly_2_e(double lambda,double x,double* result); +int gsl_sf_gegenpoly_3_e(double lambda,double x,double* result); +double gsl_sf_gegenpoly_1(double lambda,double x); +double gsl_sf_gegenpoly_2(double lambda,double x); +double gsl_sf_gegenpoly_3(double lambda,double x); +int gsl_sf_gegenpoly_n_e(int n,double lambda,double x,double* result); +double gsl_sf_gegenpoly_n(int n,double lambda,double x); +int gsl_sf_gegenpoly_array(int nmax,double lambda,double x,double* result_array); diff --git a/lib/GSL/Special/gsl_sf_exp.h b/lib/GSL/Special/gsl_sf_exp.h new file mode 100644 index 0000000..b1f0d89 --- /dev/null +++ b/lib/GSL/Special/gsl_sf_exp.h @@ -0,0 +1,146 @@ +/* specfunc/gsl_sf_exp.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2004 Gerard Jungman + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* Author: G. Jungman */ + +#ifndef __GSL_SF_EXP_H__ +#define __GSL_SF_EXP_H__ + +#include +#include + +#undef __BEGIN_DECLS +#undef __END_DECLS +#ifdef __cplusplus +# define __BEGIN_DECLS extern "C" { +# define __END_DECLS } +#else +# define __BEGIN_DECLS /* empty */ +# define __END_DECLS /* empty */ +#endif + +__BEGIN_DECLS + +/* Provide an exp() function with GSL semantics, + * i.e. with proper error checking, etc. + * + * exceptions: GSL_EOVRFLW, GSL_EUNDRFLW + */ +int gsl_sf_exp_e(const double x, gsl_sf_result * result); +double gsl_sf_exp(const double x); + + +/* Exp(x) + * + * exceptions: GSL_EOVRFLW, GSL_EUNDRFLW + */ +int gsl_sf_exp_e10_e(const double x, gsl_sf_result_e10 * result); + + +/* Exponentiate and multiply by a given factor: y * Exp(x) + * + * exceptions: GSL_EOVRFLW, GSL_EUNDRFLW + */ +int gsl_sf_exp_mult_e(const double x, const double y, gsl_sf_result * result); +double gsl_sf_exp_mult(const double x, const double y); + + +/* Exponentiate and multiply by a given factor: y * Exp(x) + * + * exceptions: GSL_EOVRFLW, GSL_EUNDRFLW + */ +int gsl_sf_exp_mult_e10_e(const double x, const double y, gsl_sf_result_e10 * result); + + +/* exp(x)-1 + * + * exceptions: GSL_EOVRFLW + */ +int gsl_sf_expm1_e(const double x, gsl_sf_result * result); +double gsl_sf_expm1(const double x); + + +/* (exp(x)-1)/x = 1 + x/2 + x^2/(2*3) + x^3/(2*3*4) + ... + * + * exceptions: GSL_EOVRFLW + */ +int gsl_sf_exprel_e(const double x, gsl_sf_result * result); +double gsl_sf_exprel(const double x); + + +/* 2(exp(x)-1-x)/x^2 = 1 + x/3 + x^2/(3*4) + x^3/(3*4*5) + ... + * + * exceptions: GSL_EOVRFLW + */ +int gsl_sf_exprel_2_e(double x, gsl_sf_result * result); +double gsl_sf_exprel_2(const double x); + + +/* Similarly for the N-th generalization of + * the above. The so-called N-relative exponential + * + * exprel_N(x) = N!/x^N (exp(x) - Sum[x^k/k!, {k,0,N-1}]) + * = 1 + x/(N+1) + x^2/((N+1)(N+2)) + ... + * = 1F1(1,1+N,x) + */ +int gsl_sf_exprel_n_e(const int n, const double x, gsl_sf_result * result); +double gsl_sf_exprel_n(const int n, const double x); + + +/* Exponentiate a quantity with an associated error. + */ +int gsl_sf_exp_err_e(const double x, const double dx, gsl_sf_result * result); + +/* Exponentiate a quantity with an associated error. + */ +int gsl_sf_exp_err_e10_e(const double x, const double dx, gsl_sf_result_e10 * result); + + +/* Exponentiate and multiply by a given factor: y * Exp(x), + * for quantities with associated errors. + * + * exceptions: GSL_EOVRFLW, GSL_EUNDRFLW + */ +int gsl_sf_exp_mult_err_e(const double x, const double dx, const double y, const double dy, gsl_sf_result * result); + + +/* Exponentiate and multiply by a given factor: y * Exp(x), + * for quantities with associated errors. + * + * exceptions: GSL_EOVRFLW, GSL_EUNDRFLW + */ +int gsl_sf_exp_mult_err_e10_e(const double x, const double dx, const double y, const double dy, gsl_sf_result_e10 * result); + +__END_DECLS + + +#ifdef HAVE_INLINE +#include +#include + +__BEGIN_DECLS + + + +__END_DECLS + +#endif /* HAVE_INLINE */ + + +#endif /* __GSL_SF_EXP_H__ */ diff --git a/lib/GSL/Special/gsl_sf_log.h b/lib/GSL/Special/gsl_sf_log.h new file mode 100644 index 0000000..5225d05 --- /dev/null +++ b/lib/GSL/Special/gsl_sf_log.h @@ -0,0 +1,90 @@ +/* specfunc/gsl_sf_log.h + * + * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2004 Gerard Jungman + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* Author: G. Jungman */ + +#ifndef __GSL_SF_LOG_H__ +#define __GSL_SF_LOG_H__ + +#include + +#undef __BEGIN_DECLS +#undef __END_DECLS +#ifdef __cplusplus +# define __BEGIN_DECLS extern "C" { +# define __END_DECLS } +#else +# define __BEGIN_DECLS /* empty */ +# define __END_DECLS /* empty */ +#endif + +__BEGIN_DECLS + + +/* Provide a logarithm function with GSL semantics. + * + * exceptions: GSL_EDOM + */ +int gsl_sf_log_e(const double x, gsl_sf_result * result); +double gsl_sf_log(const double x); + + +/* Log(|x|) + * + * exceptions: GSL_EDOM + */ +int gsl_sf_log_abs_e(const double x, gsl_sf_result * result); +double gsl_sf_log_abs(const double x); + + +/* Complex Logarithm + * exp(lnr + I theta) = zr + I zi + * Returns argument in [-pi,pi]. + * + * exceptions: GSL_EDOM + */ +int gsl_sf_complex_log_e(const double zr, const double zi, gsl_sf_result * lnr, gsl_sf_result * theta); + + +/* Log(1 + x) + * + * exceptions: GSL_EDOM + */ +int gsl_sf_log_1plusx_e(const double x, gsl_sf_result * result); +double gsl_sf_log_1plusx(const double x); + + +/* Log(1 + x) - x + * + * exceptions: GSL_EDOM + */ +int gsl_sf_log_1plusx_mx_e(const double x, gsl_sf_result * result); +double gsl_sf_log_1plusx_mx(const double x); + + +#ifdef HAVE_INLINE +#include +#include + +#endif /* HAVE_INLINE */ + + +__END_DECLS + +#endif /* __GSL_SF_LOG_H__ */ diff --git a/lib/GSL/Special/hyperg.h b/lib/GSL/Special/hyperg.h new file mode 100644 index 0000000..aa59106 --- /dev/null +++ b/lib/GSL/Special/hyperg.h @@ -0,0 +1,22 @@ +int gsl_sf_hyperg_0F1_e(double c,double x,double* result); +double gsl_sf_hyperg_0F1(double c,double x); +int gsl_sf_hyperg_1F1_int_e(int m,int n,double x,double* result); +double gsl_sf_hyperg_1F1_int(int m,int n,double x); +int gsl_sf_hyperg_1F1_e(double a,double b,double x,double* result); +double gsl_sf_hyperg_1F1(double a,double b,double x); +int gsl_sf_hyperg_U_int_e(int m,int n,double x,double* result); +double gsl_sf_hyperg_U_int(int m,int n,double x); +int gsl_sf_hyperg_U_int_e10_e(int m,int n,double x,double* result); +int gsl_sf_hyperg_U_e(double a,double b,double x,double* result); +double gsl_sf_hyperg_U(double a,double b,double x); +int gsl_sf_hyperg_U_e10_e(double a,double b,double x,double* result); +int gsl_sf_hyperg_2F1_e(double a,double b,double c,double x,double* result); +double gsl_sf_hyperg_2F1(double a,double b,double c,double x); +int gsl_sf_hyperg_2F1_conj_e(double aR,double aI,double c,double x,double* result); +double gsl_sf_hyperg_2F1_conj(double aR,double aI,double c,double x); +int gsl_sf_hyperg_2F1_renorm_e(double a,double b,double c,double x,double* result); +double gsl_sf_hyperg_2F1_renorm(double a,double b,double c,double x); +int gsl_sf_hyperg_2F1_conj_renorm_e(double aR,double aI,double c,double x,double* result); +double gsl_sf_hyperg_2F1_conj_renorm(double aR,double aI,double c,double x); +int gsl_sf_hyperg_2F0_e(double a,double b,double x,double* result); +double gsl_sf_hyperg_2F0(double a,double b,double x); diff --git a/lib/GSL/Special/laguerre.h b/lib/GSL/Special/laguerre.h new file mode 100644 index 0000000..6275a05 --- /dev/null +++ b/lib/GSL/Special/laguerre.h @@ -0,0 +1,8 @@ +int gsl_sf_laguerre_1_e(double a,double x,double* result); +int gsl_sf_laguerre_2_e(double a,double x,double* result); +int gsl_sf_laguerre_3_e(double a,double x,double* result); +double gsl_sf_laguerre_1(double a,double x); +double gsl_sf_laguerre_2(double a,double x); +double gsl_sf_laguerre_3(double a,double x); +int gsl_sf_laguerre_n_e(int n,double a,double x,double* result); +double gsl_sf_laguerre_n(int n,double a,double x); diff --git a/lib/GSL/Special/lambert.h b/lib/GSL/Special/lambert.h new file mode 100644 index 0000000..df90d11 --- /dev/null +++ b/lib/GSL/Special/lambert.h @@ -0,0 +1,4 @@ +int gsl_sf_lambert_W0_e(double x,double* result); +double gsl_sf_lambert_W0(double x); +int gsl_sf_lambert_Wm1_e(double x,double* result); +double gsl_sf_lambert_Wm1(double x); diff --git a/lib/GSL/Special/log.h b/lib/GSL/Special/log.h new file mode 100644 index 0000000..5713845 --- /dev/null +++ b/lib/GSL/Special/log.h @@ -0,0 +1,9 @@ +int gsl_sf_log_e(double x,double* result); +double gsl_sf_log(double x); +int gsl_sf_log_abs_e(double x,double* result); +double gsl_sf_log_abs(double x); +int gsl_sf_complex_log_e(double zr,double zi,double* lnr,double* theta); +int gsl_sf_log_1plusx_e(double x,double* result); +double gsl_sf_log_1plusx(double x); +int gsl_sf_log_1plusx_mx_e(double x,double* result); +double gsl_sf_log_1plusx_mx(double x); diff --git a/lib/GSL/Special/manual.txt b/lib/GSL/Special/manual.txt new file mode 100644 index 0000000..a95823d --- /dev/null +++ b/lib/GSL/Special/manual.txt @@ -0,0 +1,10 @@ +Airy.hs + include Precision (..) in the export list +Exp.hs + remove extern inline definition, qualify name +Coupling + remove deprecated INCORRECT +Trig.hs + qualify names +Log.hs + remove extern inline, qualify name diff --git a/lib/GSL/Special/pow_int.h b/lib/GSL/Special/pow_int.h new file mode 100644 index 0000000..aba8bc9 --- /dev/null +++ b/lib/GSL/Special/pow_int.h @@ -0,0 +1,2 @@ +int gsl_sf_pow_int_e(double x,int n,double* result); +double gsl_sf_pow_int(double x,int n); diff --git a/lib/GSL/Special/psi.h b/lib/GSL/Special/psi.h new file mode 100644 index 0000000..589eb34 --- /dev/null +++ b/lib/GSL/Special/psi.h @@ -0,0 +1,12 @@ +int gsl_sf_psi_int_e(int n,double* result); +double gsl_sf_psi_int(int n); +int gsl_sf_psi_e(double x,double* result); +double gsl_sf_psi(double x); +int gsl_sf_psi_1piy_e(double y,double* result); +double gsl_sf_psi_1piy(double y); +int gsl_sf_psi_1_int_e(int n,double* result); +double gsl_sf_psi_1_int(int n); +int gsl_sf_psi_1_e(double x,double* result); +double gsl_sf_psi_1(double x); +int gsl_sf_psi_n_e(int n,double x,double* result); +double gsl_sf_psi_n(int n,double x); diff --git a/lib/GSL/Special/synchrotron.h b/lib/GSL/Special/synchrotron.h new file mode 100644 index 0000000..786401c --- /dev/null +++ b/lib/GSL/Special/synchrotron.h @@ -0,0 +1,4 @@ +int gsl_sf_synchrotron_1_e(double x,double* result); +double gsl_sf_synchrotron_1(double x); +int gsl_sf_synchrotron_2_e(double x,double* result); +double gsl_sf_synchrotron_2(double x); diff --git a/lib/GSL/Special/trig.h b/lib/GSL/Special/trig.h new file mode 100644 index 0000000..50677f2 --- /dev/null +++ b/lib/GSL/Special/trig.h @@ -0,0 +1,25 @@ +int gsl_sf_sin_e(double x,double* result); +double gsl_sf_sin(double x); +int gsl_sf_cos_e(double x,double* result); +double gsl_sf_cos(double x); +int gsl_sf_hypot_e(double x,double y,double* result); +double gsl_sf_hypot(double x,double y); +int gsl_sf_complex_sin_e(double zr,double zi,double* szr,double* szi); +int gsl_sf_complex_cos_e(double zr,double zi,double* czr,double* czi); +int gsl_sf_complex_logsin_e(double zr,double zi,double* lszr,double* lszi); +int gsl_sf_sinc_e(double x,double* result); +double gsl_sf_sinc(double x); +int gsl_sf_lnsinh_e(double x,double* result); +double gsl_sf_lnsinh(double x); +int gsl_sf_lncosh_e(double x,double* result); +double gsl_sf_lncosh(double x); +int gsl_sf_polar_to_rect(double r,double theta,double* x,double* y); +int gsl_sf_rect_to_polar(double x,double y,double* r,double* theta); +int gsl_sf_sin_err_e(double x,double dx,double* result); +int gsl_sf_cos_err_e(double x,double dx,double* result); +int gsl_sf_angle_restrict_symm_e(double* theta); +double gsl_sf_angle_restrict_symm(double theta); +int gsl_sf_angle_restrict_pos_e(double* theta); +double gsl_sf_angle_restrict_pos(double theta); +int gsl_sf_angle_restrict_symm_err_e(double theta,double* result); +int gsl_sf_angle_restrict_pos_err_e(double theta,double* result); diff --git a/lib/GSL/Special/zeta.h b/lib/GSL/Special/zeta.h new file mode 100644 index 0000000..b961ece --- /dev/null +++ b/lib/GSL/Special/zeta.h @@ -0,0 +1,14 @@ +int gsl_sf_zeta_int_e(int n,double* result); +double gsl_sf_zeta_int(int n); +int gsl_sf_zeta_e(double s,double* result); +double gsl_sf_zeta(double s); +int gsl_sf_zetam1_e(double s,double* result); +double gsl_sf_zetam1(double s); +int gsl_sf_zetam1_int_e(int s,double* result); +double gsl_sf_zetam1_int(int s); +int gsl_sf_hzeta_e(double s,double q,double* result); +double gsl_sf_hzeta(double s,double q); +int gsl_sf_eta_int_e(int n,double* result); +double gsl_sf_eta_int(int n); +int gsl_sf_eta_e(double s,double* result); +double gsl_sf_eta(double s); -- cgit v1.2.3