diff options
Diffstat (limited to 'lib/GSL/Special/Erf.hs')
-rw-r--r-- | lib/GSL/Special/Erf.hs | 93 |
1 files changed, 93 insertions, 0 deletions
diff --git a/lib/GSL/Special/Erf.hs b/lib/GSL/Special/Erf.hs new file mode 100644 index 0000000..30b7817 --- /dev/null +++ b/lib/GSL/Special/Erf.hs | |||
@@ -0,0 +1,93 @@ | |||
1 | ------------------------------------------------------------ | ||
2 | {- | | ||
3 | Module : GSL.Special.Erf | ||
4 | Copyright : (c) Alberto Ruiz 2006 | ||
5 | License : GPL-style | ||
6 | Maintainer : Alberto Ruiz (aruiz at um dot es) | ||
7 | Stability : provisional | ||
8 | Portability : uses ffi | ||
9 | |||
10 | Wrappers for selected functions described at: | ||
11 | |||
12 | <http://www.gnu.org/software/gsl/manual/html_node/Error-Functions.html> | ||
13 | |||
14 | -} | ||
15 | ------------------------------------------------------------ | ||
16 | |||
17 | module GSL.Special.Erf( | ||
18 | erfc_e | ||
19 | , erfc | ||
20 | , log_erfc_e | ||
21 | , log_erfc | ||
22 | , erf_e | ||
23 | , erf | ||
24 | , erf_Z_e | ||
25 | , erf_Q_e | ||
26 | , erf_Z | ||
27 | , erf_Q | ||
28 | , hazard_e | ||
29 | , hazard | ||
30 | ) where | ||
31 | |||
32 | import Foreign(Ptr) | ||
33 | import GSL.Special.Internal | ||
34 | |||
35 | -- | wrapper for int gsl_sf_erfc_e(double x,gsl_sf_result* result); | ||
36 | erfc_e :: Double -> (Double,Double) | ||
37 | erfc_e x = createSFR "erfc_e" $ gsl_sf_erfc_e x | ||
38 | foreign import ccall "erf.h gsl_sf_erfc_e" gsl_sf_erfc_e :: Double -> Ptr Double -> IO(Int) | ||
39 | |||
40 | -- | wrapper for double gsl_sf_erfc(double x); | ||
41 | erfc :: Double -> Double | ||
42 | erfc = gsl_sf_erfc | ||
43 | foreign import ccall "erf.h gsl_sf_erfc" gsl_sf_erfc :: Double -> Double | ||
44 | |||
45 | -- | wrapper for int gsl_sf_log_erfc_e(double x,gsl_sf_result* result); | ||
46 | log_erfc_e :: Double -> (Double,Double) | ||
47 | log_erfc_e x = createSFR "log_erfc_e" $ gsl_sf_log_erfc_e x | ||
48 | foreign import ccall "erf.h gsl_sf_log_erfc_e" gsl_sf_log_erfc_e :: Double -> Ptr Double -> IO(Int) | ||
49 | |||
50 | -- | wrapper for double gsl_sf_log_erfc(double x); | ||
51 | log_erfc :: Double -> Double | ||
52 | log_erfc = gsl_sf_log_erfc | ||
53 | foreign import ccall "erf.h gsl_sf_log_erfc" gsl_sf_log_erfc :: Double -> Double | ||
54 | |||
55 | -- | wrapper for int gsl_sf_erf_e(double x,gsl_sf_result* result); | ||
56 | erf_e :: Double -> (Double,Double) | ||
57 | erf_e x = createSFR "erf_e" $ gsl_sf_erf_e x | ||
58 | foreign import ccall "erf.h gsl_sf_erf_e" gsl_sf_erf_e :: Double -> Ptr Double -> IO(Int) | ||
59 | |||
60 | -- | wrapper for double gsl_sf_erf(double x); | ||
61 | erf :: Double -> Double | ||
62 | erf = gsl_sf_erf | ||
63 | foreign import ccall "erf.h gsl_sf_erf" gsl_sf_erf :: Double -> Double | ||
64 | |||
65 | -- | wrapper for int gsl_sf_erf_Z_e(double x,gsl_sf_result* result); | ||
66 | erf_Z_e :: Double -> (Double,Double) | ||
67 | erf_Z_e x = createSFR "erf_Z_e" $ gsl_sf_erf_Z_e x | ||
68 | foreign import ccall "erf.h gsl_sf_erf_Z_e" gsl_sf_erf_Z_e :: Double -> Ptr Double -> IO(Int) | ||
69 | |||
70 | -- | wrapper for int gsl_sf_erf_Q_e(double x,gsl_sf_result* result); | ||
71 | erf_Q_e :: Double -> (Double,Double) | ||
72 | erf_Q_e x = createSFR "erf_Q_e" $ gsl_sf_erf_Q_e x | ||
73 | foreign import ccall "erf.h gsl_sf_erf_Q_e" gsl_sf_erf_Q_e :: Double -> Ptr Double -> IO(Int) | ||
74 | |||
75 | -- | wrapper for double gsl_sf_erf_Z(double x); | ||
76 | erf_Z :: Double -> Double | ||
77 | erf_Z = gsl_sf_erf_Z | ||
78 | foreign import ccall "erf.h gsl_sf_erf_Z" gsl_sf_erf_Z :: Double -> Double | ||
79 | |||
80 | -- | wrapper for double gsl_sf_erf_Q(double x); | ||
81 | erf_Q :: Double -> Double | ||
82 | erf_Q = gsl_sf_erf_Q | ||
83 | foreign import ccall "erf.h gsl_sf_erf_Q" gsl_sf_erf_Q :: Double -> Double | ||
84 | |||
85 | -- | wrapper for int gsl_sf_hazard_e(double x,gsl_sf_result* result); | ||
86 | hazard_e :: Double -> (Double,Double) | ||
87 | hazard_e x = createSFR "hazard_e" $ gsl_sf_hazard_e x | ||
88 | foreign import ccall "erf.h gsl_sf_hazard_e" gsl_sf_hazard_e :: Double -> Ptr Double -> IO(Int) | ||
89 | |||
90 | -- | wrapper for double gsl_sf_hazard(double x); | ||
91 | hazard :: Double -> Double | ||
92 | hazard = gsl_sf_hazard | ||
93 | foreign import ccall "erf.h gsl_sf_hazard" gsl_sf_hazard :: Double -> Double | ||