summaryrefslogtreecommitdiff
path: root/lib/GSL/Special/Dilog.hs
blob: c7412ddce55cc786325bdd187ba2756c026dcd19 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
------------------------------------------------------------
{- |
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

Wrappers for selected functions described at:

<http://www.gnu.org/software/gsl/manual/html_node/Dilogarithm.html>

-}
------------------------------------------------------------

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)