summaryrefslogtreecommitdiff
path: root/lib/GSL/Special/Trig.hs
diff options
context:
space:
mode:
authorAlberto Ruiz <aruiz@um.es>2007-07-29 15:43:21 +0000
committerAlberto Ruiz <aruiz@um.es>2007-07-29 15:43:21 +0000
commitb9db4d25d87cd4ab0f493413db92fb41b7eacda9 (patch)
treea447fe6f7e16b3768e912064a033ce257040720e /lib/GSL/Special/Trig.hs
parentb1b908c10ad7a393200651b4b23fc0b26efbc1b9 (diff)
more automatic wrappers for simple special functions
Diffstat (limited to 'lib/GSL/Special/Trig.hs')
-rw-r--r--lib/GSL/Special/Trig.hs162
1 files changed, 162 insertions, 0 deletions
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 @@
1------------------------------------------------------------
2{- |
3Module : GSL.Special.Trig
4Copyright : (c) Alberto Ruiz 2006
5License : GPL-style
6Maintainer : Alberto Ruiz (aruiz at um dot es)
7Stability : provisional
8Portability : uses ffi
9
10
11
12-}
13------------------------------------------------------------
14
15module GSL.Special.Trig(
16 sin_e
17, GSL.Special.Trig.sin
18, cos_e
19, GSL.Special.Trig.cos
20, hypot_e
21, hypot
22, sinc_e
23, sinc
24, lnsinh_e
25, lnsinh
26, lncosh_e
27, lncosh
28, sin_err_e
29, cos_err_e
30, angle_restrict_symm
31, angle_restrict_pos
32, angle_restrict_symm_err_e
33, angle_restrict_pos_err_e
34) where
35
36import Foreign(Ptr)
37import GSL.Special.Internal
38
39-- | wrapper for int gsl_sf_sin_e(double x,gsl_sf_result* result);
40sin_e :: Double -> (Double,Double)
41sin_e x = createSFR "sin_e" $ gsl_sf_sin_e x
42foreign import ccall "trig.h gsl_sf_sin_e" gsl_sf_sin_e :: Double -> Ptr Double -> IO(Int)
43
44-- | wrapper for double gsl_sf_sin(double x);
45sin :: Double -> Double
46sin = gsl_sf_sin
47foreign import ccall "trig.h gsl_sf_sin" gsl_sf_sin :: Double -> Double
48
49-- | wrapper for int gsl_sf_cos_e(double x,gsl_sf_result* result);
50cos_e :: Double -> (Double,Double)
51cos_e x = createSFR "cos_e" $ gsl_sf_cos_e x
52foreign import ccall "trig.h gsl_sf_cos_e" gsl_sf_cos_e :: Double -> Ptr Double -> IO(Int)
53
54-- | wrapper for double gsl_sf_cos(double x);
55cos :: Double -> Double
56cos = gsl_sf_cos
57foreign import ccall "trig.h gsl_sf_cos" gsl_sf_cos :: Double -> Double
58
59-- | wrapper for int gsl_sf_hypot_e(double x,double y,gsl_sf_result* result);
60hypot_e :: Double -> Double -> (Double,Double)
61hypot_e x y = createSFR "hypot_e" $ gsl_sf_hypot_e x y
62foreign import ccall "trig.h gsl_sf_hypot_e" gsl_sf_hypot_e :: Double -> Double -> Ptr Double -> IO(Int)
63
64-- | wrapper for double gsl_sf_hypot(double x,double y);
65hypot :: Double -> Double -> Double
66hypot = gsl_sf_hypot
67foreign import ccall "trig.h gsl_sf_hypot" gsl_sf_hypot :: Double -> Double -> Double
68
69-- | wrapper for int gsl_sf_complex_sin_e(double zr,double zi,gsl_sf_result* szr,gsl_sf_result* szi);
70complex_sin_e :: Double -> Double -> Ptr Double -> (Double,Double)
71complex_sin_e zr zi szr = createSFR "complex_sin_e" $ gsl_sf_complex_sin_e zr zi szr
72foreign import ccall "trig.h gsl_sf_complex_sin_e" gsl_sf_complex_sin_e :: Double -> Double -> Ptr Double -> Ptr Double -> IO(Int)
73
74-- | wrapper for int gsl_sf_complex_cos_e(double zr,double zi,gsl_sf_result* czr,gsl_sf_result* czi);
75complex_cos_e :: Double -> Double -> Ptr Double -> (Double,Double)
76complex_cos_e zr zi czr = createSFR "complex_cos_e" $ gsl_sf_complex_cos_e zr zi czr
77foreign import ccall "trig.h gsl_sf_complex_cos_e" gsl_sf_complex_cos_e :: Double -> Double -> Ptr Double -> Ptr Double -> IO(Int)
78
79-- | wrapper for int gsl_sf_complex_logsin_e(double zr,double zi,gsl_sf_result* lszr,gsl_sf_result* lszi);
80complex_logsin_e :: Double -> Double -> Ptr Double -> (Double,Double)
81complex_logsin_e zr zi lszr = createSFR "complex_logsin_e" $ gsl_sf_complex_logsin_e zr zi lszr
82foreign import ccall "trig.h gsl_sf_complex_logsin_e" gsl_sf_complex_logsin_e :: Double -> Double -> Ptr Double -> Ptr Double -> IO(Int)
83
84-- | wrapper for int gsl_sf_sinc_e(double x,gsl_sf_result* result);
85sinc_e :: Double -> (Double,Double)
86sinc_e x = createSFR "sinc_e" $ gsl_sf_sinc_e x
87foreign import ccall "trig.h gsl_sf_sinc_e" gsl_sf_sinc_e :: Double -> Ptr Double -> IO(Int)
88
89-- | wrapper for double gsl_sf_sinc(double x);
90sinc :: Double -> Double
91sinc = gsl_sf_sinc
92foreign import ccall "trig.h gsl_sf_sinc" gsl_sf_sinc :: Double -> Double
93
94-- | wrapper for int gsl_sf_lnsinh_e(double x,gsl_sf_result* result);
95lnsinh_e :: Double -> (Double,Double)
96lnsinh_e x = createSFR "lnsinh_e" $ gsl_sf_lnsinh_e x
97foreign import ccall "trig.h gsl_sf_lnsinh_e" gsl_sf_lnsinh_e :: Double -> Ptr Double -> IO(Int)
98
99-- | wrapper for double gsl_sf_lnsinh(double x);
100lnsinh :: Double -> Double
101lnsinh = gsl_sf_lnsinh
102foreign import ccall "trig.h gsl_sf_lnsinh" gsl_sf_lnsinh :: Double -> Double
103
104-- | wrapper for int gsl_sf_lncosh_e(double x,gsl_sf_result* result);
105lncosh_e :: Double -> (Double,Double)
106lncosh_e x = createSFR "lncosh_e" $ gsl_sf_lncosh_e x
107foreign import ccall "trig.h gsl_sf_lncosh_e" gsl_sf_lncosh_e :: Double -> Ptr Double -> IO(Int)
108
109-- | wrapper for double gsl_sf_lncosh(double x);
110lncosh :: Double -> Double
111lncosh = gsl_sf_lncosh
112foreign import ccall "trig.h gsl_sf_lncosh" gsl_sf_lncosh :: Double -> Double
113
114-- | wrapper for int gsl_sf_polar_to_rect(double r,double theta,gsl_sf_result* x,gsl_sf_result* y);
115polar_to_rect :: Double -> Double -> Ptr Double -> (Double,Double)
116polar_to_rect r theta x = createSFR "polar_to_rect" $ gsl_sf_polar_to_rect r theta x
117foreign import ccall "trig.h gsl_sf_polar_to_rect" gsl_sf_polar_to_rect :: Double -> Double -> Ptr Double -> Ptr Double -> IO(Int)
118
119-- | wrapper for int gsl_sf_rect_to_polar(double x,double y,gsl_sf_result* r,gsl_sf_result* theta);
120rect_to_polar :: Double -> Double -> Ptr Double -> (Double,Double)
121rect_to_polar x y r = createSFR "rect_to_polar" $ gsl_sf_rect_to_polar x y r
122foreign import ccall "trig.h gsl_sf_rect_to_polar" gsl_sf_rect_to_polar :: Double -> Double -> Ptr Double -> Ptr Double -> IO(Int)
123
124-- | wrapper for int gsl_sf_sin_err_e(double x,double dx,gsl_sf_result* result);
125sin_err_e :: Double -> Double -> (Double,Double)
126sin_err_e x dx = createSFR "sin_err_e" $ gsl_sf_sin_err_e x dx
127foreign import ccall "trig.h gsl_sf_sin_err_e" gsl_sf_sin_err_e :: Double -> Double -> Ptr Double -> IO(Int)
128
129-- | wrapper for int gsl_sf_cos_err_e(double x,double dx,gsl_sf_result* result);
130cos_err_e :: Double -> Double -> (Double,Double)
131cos_err_e x dx = createSFR "cos_err_e" $ gsl_sf_cos_err_e x dx
132foreign import ccall "trig.h gsl_sf_cos_err_e" gsl_sf_cos_err_e :: Double -> Double -> Ptr Double -> IO(Int)
133
134-- | wrapper for int gsl_sf_angle_restrict_symm_e(double* theta);
135angle_restrict_symm_e :: Ptr Double -> Int
136angle_restrict_symm_e = gsl_sf_angle_restrict_symm_e
137foreign import ccall "trig.h gsl_sf_angle_restrict_symm_e" gsl_sf_angle_restrict_symm_e :: Ptr Double -> Int
138
139-- | wrapper for double gsl_sf_angle_restrict_symm(double theta);
140angle_restrict_symm :: Double -> Double
141angle_restrict_symm = gsl_sf_angle_restrict_symm
142foreign import ccall "trig.h gsl_sf_angle_restrict_symm" gsl_sf_angle_restrict_symm :: Double -> Double
143
144-- | wrapper for int gsl_sf_angle_restrict_pos_e(double* theta);
145angle_restrict_pos_e :: Ptr Double -> Int
146angle_restrict_pos_e = gsl_sf_angle_restrict_pos_e
147foreign import ccall "trig.h gsl_sf_angle_restrict_pos_e" gsl_sf_angle_restrict_pos_e :: Ptr Double -> Int
148
149-- | wrapper for double gsl_sf_angle_restrict_pos(double theta);
150angle_restrict_pos :: Double -> Double
151angle_restrict_pos = gsl_sf_angle_restrict_pos
152foreign import ccall "trig.h gsl_sf_angle_restrict_pos" gsl_sf_angle_restrict_pos :: Double -> Double
153
154-- | wrapper for int gsl_sf_angle_restrict_symm_err_e(double theta,gsl_sf_result* result);
155angle_restrict_symm_err_e :: Double -> (Double,Double)
156angle_restrict_symm_err_e theta = createSFR "angle_restrict_symm_err_e" $ gsl_sf_angle_restrict_symm_err_e theta
157foreign import ccall "trig.h gsl_sf_angle_restrict_symm_err_e" gsl_sf_angle_restrict_symm_err_e :: Double -> Ptr Double -> IO(Int)
158
159-- | wrapper for int gsl_sf_angle_restrict_pos_err_e(double theta,gsl_sf_result* result);
160angle_restrict_pos_err_e :: Double -> (Double,Double)
161angle_restrict_pos_err_e theta = createSFR "angle_restrict_pos_err_e" $ gsl_sf_angle_restrict_pos_err_e theta
162foreign import ccall "trig.h gsl_sf_angle_restrict_pos_err_e" gsl_sf_angle_restrict_pos_err_e :: Double -> Ptr Double -> IO(Int)