gsl4r 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/INSTALL +22 -0
- data/LICENSE +19 -0
- data/LICENSE.LGPLv3 +165 -0
- data/README +55 -0
- data/Rakefile +97 -0
- data/TODO +1 -0
- data/lib/gsl4r.rb +18 -0
- data/lib/gsl4r/complex.rb +434 -0
- data/lib/gsl4r/f +174 -0
- data/lib/gsl4r/harness.rb +58 -0
- data/lib/gsl4r/platform.rb +8 -0
- data/lib/gsl4r/util.rb +85 -0
- data/lib/gsl4r/vector.rb +29 -0
- data/test/complex_test.rb +490 -0
- data/test/complex_tests.rb +28 -0
- data/test/gsl_complex_tests_gen +0 -0
- data/test/gsl_complex_tests_gen.c +791 -0
- metadata +73 -0
@@ -0,0 +1,28 @@
|
|
1
|
+
$: << File.join('..','lib')
|
2
|
+
|
3
|
+
require 'test/unit'
|
4
|
+
require 'test/unit/autorunner'
|
5
|
+
|
6
|
+
require 'gsl4r/complex'
|
7
|
+
|
8
|
+
include GSL4r::Complex
|
9
|
+
|
10
|
+
# note, these tests are here to figure out if
|
11
|
+
# the binding between the wrapper calls and the
|
12
|
+
# answers back from GSL look correct. They are
|
13
|
+
# not to test the correctness of the GSL library
|
14
|
+
# itself.
|
15
|
+
class ComplexTests < Test::Unit::TestCase
|
16
|
+
|
17
|
+
# For the purposes of these tests, epsilon is
|
18
|
+
# set to a much better precision that the existing
|
19
|
+
# answer derived from
|
20
|
+
EPSILON = 5.0e-15
|
21
|
+
|
22
|
+
def test_gsl_complex_abs()
|
23
|
+
a = GSL_Complex.create(1,1).abs
|
24
|
+
assert_in_delta a, 1.4142135623731, EPSILON
|
25
|
+
end
|
26
|
+
end
|
27
|
+
|
28
|
+
|
Binary file
|
@@ -0,0 +1,791 @@
|
|
1
|
+
/* Auto generated by GSL4r::Complex::Harness */
|
2
|
+
#include <stdio.h>
|
3
|
+
#include "gsl/gsl_complex.h"
|
4
|
+
#include "gsl/gsl_complex_math.h"
|
5
|
+
int main( int argc, char **argv )
|
6
|
+
{
|
7
|
+
puts("$: << File.join('..','lib')\nrequire 'test/unit'\nrequire 'test/unit/autorunner'\nrequire 'gsl4r/complex'\ninclude GSL4r::Complex\nclass ComplexTests < Test::Unit::TestCase\n EPSILON = 5.0e-15");
|
8
|
+
/* c_test_gsl_complex_tanh */
|
9
|
+
gsl_complex v64;
|
10
|
+
GSL_SET_COMPLEX(&v64, 2.0, 2.0);
|
11
|
+
gsl_complex c_r63;
|
12
|
+
c_r63 = gsl_complex_tanh(v64);
|
13
|
+
puts("def test_gsl_complex_tanh()");
|
14
|
+
puts(" v64 = GSL_Complex.create");
|
15
|
+
puts(" v64.set(2.0,2.0)");
|
16
|
+
puts(" r_r1 = ::GSL4r::Complex::Methods::gsl_complex_tanh(v64)");
|
17
|
+
puts(" r_r2 = GSL_Complex.new");
|
18
|
+
printf(" r_r2.set(%.15g,%.15g)\n",GSL_REAL(c_r63),GSL_IMAG(c_r63));
|
19
|
+
printf(" assert r_r1.equals(r_r2)\n");
|
20
|
+
puts("end");
|
21
|
+
/* c_test_gsl_complex_pow_real */
|
22
|
+
gsl_complex v37;
|
23
|
+
GSL_SET_COMPLEX(&v37, 2.0, 2.0);
|
24
|
+
double v38 = (double)2.0;
|
25
|
+
gsl_complex c_r36;
|
26
|
+
c_r36 = gsl_complex_pow_real(v37,v38);
|
27
|
+
puts("def test_gsl_complex_pow_real()");
|
28
|
+
puts(" v37 = GSL_Complex.create");
|
29
|
+
puts(" v37.set(2.0,2.0)");
|
30
|
+
puts("");
|
31
|
+
puts(" v38 = 2.0");
|
32
|
+
puts(" r_r1 = ::GSL4r::Complex::Methods::gsl_complex_pow_real(v37,v38)");
|
33
|
+
puts(" r_r2 = GSL_Complex.new");
|
34
|
+
printf(" r_r2.set(%.15g,%.15g)\n",GSL_REAL(c_r36),GSL_IMAG(c_r36));
|
35
|
+
printf(" assert r_r1.equals(r_r2)\n");
|
36
|
+
puts("end");
|
37
|
+
/* c_test_gsl_complex_sinh */
|
38
|
+
gsl_complex v60;
|
39
|
+
GSL_SET_COMPLEX(&v60, 2.0, 2.0);
|
40
|
+
gsl_complex c_r59;
|
41
|
+
c_r59 = gsl_complex_sinh(v60);
|
42
|
+
puts("def test_gsl_complex_sinh()");
|
43
|
+
puts(" v60 = GSL_Complex.create");
|
44
|
+
puts(" v60.set(2.0,2.0)");
|
45
|
+
puts(" r_r1 = ::GSL4r::Complex::Methods::gsl_complex_sinh(v60)");
|
46
|
+
puts(" r_r2 = GSL_Complex.new");
|
47
|
+
printf(" r_r2.set(%.15g,%.15g)\n",GSL_REAL(c_r59),GSL_IMAG(c_r59));
|
48
|
+
printf(" assert r_r1.equals(r_r2)\n");
|
49
|
+
puts("end");
|
50
|
+
/* c_test_gsl_complex_sqrt */
|
51
|
+
gsl_complex v31;
|
52
|
+
GSL_SET_COMPLEX(&v31, 2.0, 2.0);
|
53
|
+
gsl_complex c_r30;
|
54
|
+
c_r30 = gsl_complex_sqrt(v31);
|
55
|
+
puts("def test_gsl_complex_sqrt()");
|
56
|
+
puts(" v31 = GSL_Complex.create");
|
57
|
+
puts(" v31.set(2.0,2.0)");
|
58
|
+
puts(" r_r1 = ::GSL4r::Complex::Methods::gsl_complex_sqrt(v31)");
|
59
|
+
puts(" r_r2 = GSL_Complex.new");
|
60
|
+
printf(" r_r2.set(%.15g,%.15g)\n",GSL_REAL(c_r30),GSL_IMAG(c_r30));
|
61
|
+
printf(" assert r_r1.equals(r_r2)\n");
|
62
|
+
puts("end");
|
63
|
+
/* c_test_gsl_complex_arccsc */
|
64
|
+
gsl_complex v56;
|
65
|
+
GSL_SET_COMPLEX(&v56, 2.0, 2.0);
|
66
|
+
gsl_complex c_r55;
|
67
|
+
c_r55 = gsl_complex_arccsc(v56);
|
68
|
+
puts("def test_gsl_complex_arccsc()");
|
69
|
+
puts(" v56 = GSL_Complex.create");
|
70
|
+
puts(" v56.set(2.0,2.0)");
|
71
|
+
puts(" r_r1 = ::GSL4r::Complex::Methods::gsl_complex_arccsc(v56)");
|
72
|
+
puts(" r_r2 = GSL_Complex.new");
|
73
|
+
printf(" r_r2.set(%.15g,%.15g)\n",GSL_REAL(c_r55),GSL_IMAG(c_r55));
|
74
|
+
printf(" assert r_r1.equals(r_r2)\n");
|
75
|
+
puts("end");
|
76
|
+
/* c_test_gsl_complex_div_imag */
|
77
|
+
gsl_complex v26;
|
78
|
+
GSL_SET_COMPLEX(&v26, 2.0, 2.0);
|
79
|
+
double v27 = (double)2.0;
|
80
|
+
gsl_complex c_r25;
|
81
|
+
c_r25 = gsl_complex_div_imag(v26,v27);
|
82
|
+
puts("def test_gsl_complex_div_imag()");
|
83
|
+
puts(" v26 = GSL_Complex.create");
|
84
|
+
puts(" v26.set(2.0,2.0)");
|
85
|
+
puts("");
|
86
|
+
puts(" v27 = 2.0");
|
87
|
+
puts(" r_r1 = ::GSL4r::Complex::Methods::gsl_complex_div_imag(v26,v27)");
|
88
|
+
puts(" r_r2 = GSL_Complex.new");
|
89
|
+
printf(" r_r2.set(%.15g,%.15g)\n",GSL_REAL(c_r25),GSL_IMAG(c_r25));
|
90
|
+
printf(" assert r_r1.equals(r_r2)\n");
|
91
|
+
puts("end");
|
92
|
+
/* c_test_gsl_complex_abs2 */
|
93
|
+
gsl_complex v3;
|
94
|
+
GSL_SET_COMPLEX(&v3, 2.0, 2.0);
|
95
|
+
double c_r2;
|
96
|
+
c_r2 = gsl_complex_abs2(v3);
|
97
|
+
puts("def test_gsl_complex_abs2()");
|
98
|
+
puts(" v3 = GSL_Complex.create");
|
99
|
+
puts(" v3.set(2.0,2.0)");
|
100
|
+
puts(" r_r1 = ::GSL4r::Complex::Methods::gsl_complex_abs2(v3)");
|
101
|
+
printf(" assert_in_delta r_r1, %.15g, EPSILON\n", c_r2);
|
102
|
+
puts("end");
|
103
|
+
/* c_test_gsl_complex_arccos */
|
104
|
+
gsl_complex v52;
|
105
|
+
GSL_SET_COMPLEX(&v52, 2.0, 2.0);
|
106
|
+
gsl_complex c_r51;
|
107
|
+
c_r51 = gsl_complex_arccos(v52);
|
108
|
+
puts("def test_gsl_complex_arccos()");
|
109
|
+
puts(" v52 = GSL_Complex.create");
|
110
|
+
puts(" v52.set(2.0,2.0)");
|
111
|
+
puts(" r_r1 = ::GSL4r::Complex::Methods::gsl_complex_arccos(v52)");
|
112
|
+
puts(" r_r2 = GSL_Complex.new");
|
113
|
+
printf(" r_r2.set(%.15g,%.15g)\n",GSL_REAL(c_r51),GSL_IMAG(c_r51));
|
114
|
+
printf(" assert r_r1.equals(r_r2)\n");
|
115
|
+
puts("end");
|
116
|
+
/* c_test_gsl_complex_arccoth */
|
117
|
+
gsl_complex v73;
|
118
|
+
GSL_SET_COMPLEX(&v73, 2.0, 2.0);
|
119
|
+
gsl_complex c_r72;
|
120
|
+
c_r72 = gsl_complex_arccoth(v73);
|
121
|
+
puts("def test_gsl_complex_arccoth()");
|
122
|
+
puts(" v73 = GSL_Complex.create");
|
123
|
+
puts(" v73.set(2.0,2.0)");
|
124
|
+
puts(" r_r1 = ::GSL4r::Complex::Methods::gsl_complex_arccoth(v73)");
|
125
|
+
puts(" r_r2 = GSL_Complex.new");
|
126
|
+
printf(" r_r2.set(%.15g,%.15g)\n",GSL_REAL(c_r72),GSL_IMAG(c_r72));
|
127
|
+
printf(" assert r_r1.equals(r_r2)\n");
|
128
|
+
puts("end");
|
129
|
+
/* c_test_gsl_complex_div_real */
|
130
|
+
gsl_complex v18;
|
131
|
+
GSL_SET_COMPLEX(&v18, 2.0, 2.0);
|
132
|
+
double v19 = (double)2.0;
|
133
|
+
gsl_complex c_r17;
|
134
|
+
c_r17 = gsl_complex_div_real(v18,v19);
|
135
|
+
puts("def test_gsl_complex_div_real()");
|
136
|
+
puts(" v18 = GSL_Complex.create");
|
137
|
+
puts(" v18.set(2.0,2.0)");
|
138
|
+
puts("");
|
139
|
+
puts(" v19 = 2.0");
|
140
|
+
puts(" r_r1 = ::GSL4r::Complex::Methods::gsl_complex_div_real(v18,v19)");
|
141
|
+
puts(" r_r2 = GSL_Complex.new");
|
142
|
+
printf(" r_r2.set(%.15g,%.15g)\n",GSL_REAL(c_r17),GSL_IMAG(c_r17));
|
143
|
+
printf(" assert r_r1.equals(r_r2)\n");
|
144
|
+
puts("end");
|
145
|
+
/* c_test_gsl_complex_tan */
|
146
|
+
gsl_complex v48;
|
147
|
+
GSL_SET_COMPLEX(&v48, 2.0, 2.0);
|
148
|
+
gsl_complex c_r47;
|
149
|
+
c_r47 = gsl_complex_tan(v48);
|
150
|
+
puts("def test_gsl_complex_tan()");
|
151
|
+
puts(" v48 = GSL_Complex.create");
|
152
|
+
puts(" v48.set(2.0,2.0)");
|
153
|
+
puts(" r_r1 = ::GSL4r::Complex::Methods::gsl_complex_tan(v48)");
|
154
|
+
puts(" r_r2 = GSL_Complex.new");
|
155
|
+
printf(" r_r2.set(%.15g,%.15g)\n",GSL_REAL(c_r47),GSL_IMAG(c_r47));
|
156
|
+
printf(" assert r_r1.equals(r_r2)\n");
|
157
|
+
puts("end");
|
158
|
+
/* c_test_gsl_complex_arcsech */
|
159
|
+
gsl_complex v69;
|
160
|
+
GSL_SET_COMPLEX(&v69, 2.0, 2.0);
|
161
|
+
gsl_complex c_r68;
|
162
|
+
c_r68 = gsl_complex_arcsech(v69);
|
163
|
+
puts("def test_gsl_complex_arcsech()");
|
164
|
+
puts(" v69 = GSL_Complex.create");
|
165
|
+
puts(" v69.set(2.0,2.0)");
|
166
|
+
puts(" r_r1 = ::GSL4r::Complex::Methods::gsl_complex_arcsech(v69)");
|
167
|
+
puts(" r_r2 = GSL_Complex.new");
|
168
|
+
printf(" r_r2.set(%.15g,%.15g)\n",GSL_REAL(c_r68),GSL_IMAG(c_r68));
|
169
|
+
printf(" assert r_r1.equals(r_r2)\n");
|
170
|
+
puts("end");
|
171
|
+
/* c_test_gsl_complex_div */
|
172
|
+
gsl_complex v10;
|
173
|
+
GSL_SET_COMPLEX(&v10, 2.0, 2.0);
|
174
|
+
gsl_complex v11;
|
175
|
+
GSL_SET_COMPLEX(&v11, 2.0, 2.0);
|
176
|
+
gsl_complex c_r9;
|
177
|
+
c_r9 = gsl_complex_div(v10,v11);
|
178
|
+
puts("def test_gsl_complex_div()");
|
179
|
+
puts(" v10 = GSL_Complex.create");
|
180
|
+
puts(" v10.set(2.0,2.0)");
|
181
|
+
puts(" v11 = GSL_Complex.create");
|
182
|
+
puts(" v11.set(2.0,2.0)");
|
183
|
+
puts(" r_r1 = ::GSL4r::Complex::Methods::gsl_complex_div(v10,v11)");
|
184
|
+
puts(" r_r2 = GSL_Complex.new");
|
185
|
+
printf(" r_r2.set(%.15g,%.15g)\n",GSL_REAL(c_r9),GSL_IMAG(c_r9));
|
186
|
+
printf(" assert r_r1.equals(r_r2)\n");
|
187
|
+
puts("end");
|
188
|
+
/* c_test_gsl_complex_sin */
|
189
|
+
gsl_complex v44;
|
190
|
+
GSL_SET_COMPLEX(&v44, 2.0, 2.0);
|
191
|
+
gsl_complex c_r43;
|
192
|
+
c_r43 = gsl_complex_sin(v44);
|
193
|
+
puts("def test_gsl_complex_sin()");
|
194
|
+
puts(" v44 = GSL_Complex.create");
|
195
|
+
puts(" v44.set(2.0,2.0)");
|
196
|
+
puts(" r_r1 = ::GSL4r::Complex::Methods::gsl_complex_sin(v44)");
|
197
|
+
puts(" r_r2 = GSL_Complex.new");
|
198
|
+
printf(" r_r2.set(%.15g,%.15g)\n",GSL_REAL(c_r43),GSL_IMAG(c_r43));
|
199
|
+
printf(" assert r_r1.equals(r_r2)\n");
|
200
|
+
puts("end");
|
201
|
+
/* c_test_gsl_complex_coth */
|
202
|
+
gsl_complex v65;
|
203
|
+
GSL_SET_COMPLEX(&v65, 2.0, 2.0);
|
204
|
+
gsl_complex c_r64;
|
205
|
+
c_r64 = gsl_complex_coth(v65);
|
206
|
+
puts("def test_gsl_complex_coth()");
|
207
|
+
puts(" v65 = GSL_Complex.create");
|
208
|
+
puts(" v65.set(2.0,2.0)");
|
209
|
+
puts(" r_r1 = ::GSL4r::Complex::Methods::gsl_complex_coth(v65)");
|
210
|
+
puts(" r_r2 = GSL_Complex.new");
|
211
|
+
printf(" r_r2.set(%.15g,%.15g)\n",GSL_REAL(c_r64),GSL_IMAG(c_r64));
|
212
|
+
printf(" assert r_r1.equals(r_r2)\n");
|
213
|
+
puts("end");
|
214
|
+
/* c_test_gsl_complex_exp */
|
215
|
+
gsl_complex v39;
|
216
|
+
GSL_SET_COMPLEX(&v39, 2.0, 2.0);
|
217
|
+
gsl_complex c_r38;
|
218
|
+
c_r38 = gsl_complex_exp(v39);
|
219
|
+
puts("def test_gsl_complex_exp()");
|
220
|
+
puts(" v39 = GSL_Complex.create");
|
221
|
+
puts(" v39.set(2.0,2.0)");
|
222
|
+
puts(" r_r1 = ::GSL4r::Complex::Methods::gsl_complex_exp(v39)");
|
223
|
+
puts(" r_r2 = GSL_Complex.new");
|
224
|
+
printf(" r_r2.set(%.15g,%.15g)\n",GSL_REAL(c_r38),GSL_IMAG(c_r38));
|
225
|
+
printf(" assert r_r1.equals(r_r2)\n");
|
226
|
+
puts("end");
|
227
|
+
/* c_test_gsl_complex_cosh */
|
228
|
+
gsl_complex v61;
|
229
|
+
GSL_SET_COMPLEX(&v61, 2.0, 2.0);
|
230
|
+
gsl_complex c_r60;
|
231
|
+
c_r60 = gsl_complex_cosh(v61);
|
232
|
+
puts("def test_gsl_complex_cosh()");
|
233
|
+
puts(" v61 = GSL_Complex.create");
|
234
|
+
puts(" v61.set(2.0,2.0)");
|
235
|
+
puts(" r_r1 = ::GSL4r::Complex::Methods::gsl_complex_cosh(v61)");
|
236
|
+
puts(" r_r2 = GSL_Complex.new");
|
237
|
+
printf(" r_r2.set(%.15g,%.15g)\n",GSL_REAL(c_r60),GSL_IMAG(c_r60));
|
238
|
+
printf(" assert r_r1.equals(r_r2)\n");
|
239
|
+
puts("end");
|
240
|
+
/* c_test_gsl_complex_sqrt_real */
|
241
|
+
double v32 = (double)2.0;
|
242
|
+
gsl_complex c_r31;
|
243
|
+
c_r31 = gsl_complex_sqrt_real(v32);
|
244
|
+
puts("def test_gsl_complex_sqrt_real()");
|
245
|
+
puts("");
|
246
|
+
puts(" v32 = 2.0");
|
247
|
+
puts(" r_r1 = ::GSL4r::Complex::Methods::gsl_complex_sqrt_real(v32)");
|
248
|
+
puts(" r_r2 = GSL_Complex.new");
|
249
|
+
printf(" r_r2.set(%.15g,%.15g)\n",GSL_REAL(c_r31),GSL_IMAG(c_r31));
|
250
|
+
printf(" assert r_r1.equals(r_r2)\n");
|
251
|
+
puts("end");
|
252
|
+
/* c_test_gsl_complex_arccsc_real */
|
253
|
+
double v57 = (double)2.0;
|
254
|
+
gsl_complex c_r56;
|
255
|
+
c_r56 = gsl_complex_arccsc_real(v57);
|
256
|
+
puts("def test_gsl_complex_arccsc_real()");
|
257
|
+
puts("");
|
258
|
+
puts(" v57 = 2.0");
|
259
|
+
puts(" r_r1 = ::GSL4r::Complex::Methods::gsl_complex_arccsc_real(v57)");
|
260
|
+
puts(" r_r2 = GSL_Complex.new");
|
261
|
+
printf(" r_r2.set(%.15g,%.15g)\n",GSL_REAL(c_r56),GSL_IMAG(c_r56));
|
262
|
+
printf(" assert r_r1.equals(r_r2)\n");
|
263
|
+
puts("end");
|
264
|
+
/* c_test_gsl_complex_conjugate */
|
265
|
+
gsl_complex v28;
|
266
|
+
GSL_SET_COMPLEX(&v28, 2.0, 2.0);
|
267
|
+
gsl_complex c_r27;
|
268
|
+
c_r27 = gsl_complex_conjugate(v28);
|
269
|
+
puts("def test_gsl_complex_conjugate()");
|
270
|
+
puts(" v28 = GSL_Complex.create");
|
271
|
+
puts(" v28.set(2.0,2.0)");
|
272
|
+
puts(" r_r1 = ::GSL4r::Complex::Methods::gsl_complex_conjugate(v28)");
|
273
|
+
puts(" r_r2 = GSL_Complex.new");
|
274
|
+
printf(" r_r2.set(%.15g,%.15g)\n",GSL_REAL(c_r27),GSL_IMAG(c_r27));
|
275
|
+
printf(" assert r_r1.equals(r_r2)\n");
|
276
|
+
puts("end");
|
277
|
+
/* c_test_gsl_complex_arccos_real */
|
278
|
+
double v53 = (double)2.0;
|
279
|
+
gsl_complex c_r52;
|
280
|
+
c_r52 = gsl_complex_arccos_real(v53);
|
281
|
+
puts("def test_gsl_complex_arccos_real()");
|
282
|
+
puts("");
|
283
|
+
puts(" v53 = 2.0");
|
284
|
+
puts(" r_r1 = ::GSL4r::Complex::Methods::gsl_complex_arccos_real(v53)");
|
285
|
+
puts(" r_r2 = GSL_Complex.new");
|
286
|
+
printf(" r_r2.set(%.15g,%.15g)\n",GSL_REAL(c_r52),GSL_IMAG(c_r52));
|
287
|
+
printf(" assert r_r1.equals(r_r2)\n");
|
288
|
+
puts("end");
|
289
|
+
/* c_test_gsl_complex_add_imag */
|
290
|
+
gsl_complex v20;
|
291
|
+
GSL_SET_COMPLEX(&v20, 2.0, 2.0);
|
292
|
+
double v21 = (double)2.0;
|
293
|
+
gsl_complex c_r19;
|
294
|
+
c_r19 = gsl_complex_add_imag(v20,v21);
|
295
|
+
puts("def test_gsl_complex_add_imag()");
|
296
|
+
puts(" v20 = GSL_Complex.create");
|
297
|
+
puts(" v20.set(2.0,2.0)");
|
298
|
+
puts("");
|
299
|
+
puts(" v21 = 2.0");
|
300
|
+
puts(" r_r1 = ::GSL4r::Complex::Methods::gsl_complex_add_imag(v20,v21)");
|
301
|
+
puts(" r_r2 = GSL_Complex.new");
|
302
|
+
printf(" r_r2.set(%.15g,%.15g)\n",GSL_REAL(c_r19),GSL_IMAG(c_r19));
|
303
|
+
printf(" assert r_r1.equals(r_r2)\n");
|
304
|
+
puts("end");
|
305
|
+
/* c_test_gsl_complex_cot */
|
306
|
+
gsl_complex v49;
|
307
|
+
GSL_SET_COMPLEX(&v49, 2.0, 2.0);
|
308
|
+
gsl_complex c_r48;
|
309
|
+
c_r48 = gsl_complex_cot(v49);
|
310
|
+
puts("def test_gsl_complex_cot()");
|
311
|
+
puts(" v49 = GSL_Complex.create");
|
312
|
+
puts(" v49.set(2.0,2.0)");
|
313
|
+
puts(" r_r1 = ::GSL4r::Complex::Methods::gsl_complex_cot(v49)");
|
314
|
+
puts(" r_r2 = GSL_Complex.new");
|
315
|
+
printf(" r_r2.set(%.15g,%.15g)\n",GSL_REAL(c_r48),GSL_IMAG(c_r48));
|
316
|
+
printf(" assert r_r1.equals(r_r2)\n");
|
317
|
+
puts("end");
|
318
|
+
/* c_test_gsl_complex_arccsch */
|
319
|
+
gsl_complex v70;
|
320
|
+
GSL_SET_COMPLEX(&v70, 2.0, 2.0);
|
321
|
+
gsl_complex c_r69;
|
322
|
+
c_r69 = gsl_complex_arccsch(v70);
|
323
|
+
puts("def test_gsl_complex_arccsch()");
|
324
|
+
puts(" v70 = GSL_Complex.create");
|
325
|
+
puts(" v70.set(2.0,2.0)");
|
326
|
+
puts(" r_r1 = ::GSL4r::Complex::Methods::gsl_complex_arccsch(v70)");
|
327
|
+
puts(" r_r2 = GSL_Complex.new");
|
328
|
+
printf(" r_r2.set(%.15g,%.15g)\n",GSL_REAL(c_r69),GSL_IMAG(c_r69));
|
329
|
+
printf(" assert r_r1.equals(r_r2)\n");
|
330
|
+
puts("end");
|
331
|
+
/* c_test_gsl_complex_add_real */
|
332
|
+
gsl_complex v12;
|
333
|
+
GSL_SET_COMPLEX(&v12, 2.0, 2.0);
|
334
|
+
double v13 = (double)2.0;
|
335
|
+
gsl_complex c_r11;
|
336
|
+
c_r11 = gsl_complex_add_real(v12,v13);
|
337
|
+
puts("def test_gsl_complex_add_real()");
|
338
|
+
puts(" v12 = GSL_Complex.create");
|
339
|
+
puts(" v12.set(2.0,2.0)");
|
340
|
+
puts("");
|
341
|
+
puts(" v13 = 2.0");
|
342
|
+
puts(" r_r1 = ::GSL4r::Complex::Methods::gsl_complex_add_real(v12,v13)");
|
343
|
+
puts(" r_r2 = GSL_Complex.new");
|
344
|
+
printf(" r_r2.set(%.15g,%.15g)\n",GSL_REAL(c_r11),GSL_IMAG(c_r11));
|
345
|
+
printf(" assert r_r1.equals(r_r2)\n");
|
346
|
+
puts("end");
|
347
|
+
/* c_test_gsl_complex_cos */
|
348
|
+
gsl_complex v45;
|
349
|
+
GSL_SET_COMPLEX(&v45, 2.0, 2.0);
|
350
|
+
gsl_complex c_r44;
|
351
|
+
c_r44 = gsl_complex_cos(v45);
|
352
|
+
puts("def test_gsl_complex_cos()");
|
353
|
+
puts(" v45 = GSL_Complex.create");
|
354
|
+
puts(" v45.set(2.0,2.0)");
|
355
|
+
puts(" r_r1 = ::GSL4r::Complex::Methods::gsl_complex_cos(v45)");
|
356
|
+
puts(" r_r2 = GSL_Complex.new");
|
357
|
+
printf(" r_r2.set(%.15g,%.15g)\n",GSL_REAL(c_r44),GSL_IMAG(c_r44));
|
358
|
+
printf(" assert r_r1.equals(r_r2)\n");
|
359
|
+
puts("end");
|
360
|
+
/* c_test_gsl_complex_arcsinh */
|
361
|
+
gsl_complex v66;
|
362
|
+
GSL_SET_COMPLEX(&v66, 2.0, 2.0);
|
363
|
+
gsl_complex c_r65;
|
364
|
+
c_r65 = gsl_complex_arcsinh(v66);
|
365
|
+
puts("def test_gsl_complex_arcsinh()");
|
366
|
+
puts(" v66 = GSL_Complex.create");
|
367
|
+
puts(" v66.set(2.0,2.0)");
|
368
|
+
puts(" r_r1 = ::GSL4r::Complex::Methods::gsl_complex_arcsinh(v66)");
|
369
|
+
puts(" r_r2 = GSL_Complex.new");
|
370
|
+
printf(" r_r2.set(%.15g,%.15g)\n",GSL_REAL(c_r65),GSL_IMAG(c_r65));
|
371
|
+
printf(" assert r_r1.equals(r_r2)\n");
|
372
|
+
puts("end");
|
373
|
+
/* c_test_gsl_complex_add */
|
374
|
+
gsl_complex v4;
|
375
|
+
GSL_SET_COMPLEX(&v4, 2.0, 2.0);
|
376
|
+
gsl_complex v5;
|
377
|
+
GSL_SET_COMPLEX(&v5, 2.0, 2.0);
|
378
|
+
gsl_complex c_r3;
|
379
|
+
c_r3 = gsl_complex_add(v4,v5);
|
380
|
+
puts("def test_gsl_complex_add()");
|
381
|
+
puts(" v4 = GSL_Complex.create");
|
382
|
+
puts(" v4.set(2.0,2.0)");
|
383
|
+
puts(" v5 = GSL_Complex.create");
|
384
|
+
puts(" v5.set(2.0,2.0)");
|
385
|
+
puts(" r_r1 = ::GSL4r::Complex::Methods::gsl_complex_add(v4,v5)");
|
386
|
+
puts(" r_r2 = GSL_Complex.new");
|
387
|
+
printf(" r_r2.set(%.15g,%.15g)\n",GSL_REAL(c_r3),GSL_IMAG(c_r3));
|
388
|
+
printf(" assert r_r1.equals(r_r2)\n");
|
389
|
+
puts("end");
|
390
|
+
/* c_test_gsl_complex_log */
|
391
|
+
gsl_complex v40;
|
392
|
+
GSL_SET_COMPLEX(&v40, 2.0, 2.0);
|
393
|
+
gsl_complex c_r39;
|
394
|
+
c_r39 = gsl_complex_log(v40);
|
395
|
+
puts("def test_gsl_complex_log()");
|
396
|
+
puts(" v40 = GSL_Complex.create");
|
397
|
+
puts(" v40.set(2.0,2.0)");
|
398
|
+
puts(" r_r1 = ::GSL4r::Complex::Methods::gsl_complex_log(v40)");
|
399
|
+
puts(" r_r2 = GSL_Complex.new");
|
400
|
+
printf(" r_r2.set(%.15g,%.15g)\n",GSL_REAL(c_r39),GSL_IMAG(c_r39));
|
401
|
+
printf(" assert r_r1.equals(r_r2)\n");
|
402
|
+
puts("end");
|
403
|
+
/* c_test_gsl_complex_sech */
|
404
|
+
gsl_complex v62;
|
405
|
+
GSL_SET_COMPLEX(&v62, 2.0, 2.0);
|
406
|
+
gsl_complex c_r61;
|
407
|
+
c_r61 = gsl_complex_sech(v62);
|
408
|
+
puts("def test_gsl_complex_sech()");
|
409
|
+
puts(" v62 = GSL_Complex.create");
|
410
|
+
puts(" v62.set(2.0,2.0)");
|
411
|
+
puts(" r_r1 = ::GSL4r::Complex::Methods::gsl_complex_sech(v62)");
|
412
|
+
puts(" r_r2 = GSL_Complex.new");
|
413
|
+
printf(" r_r2.set(%.15g,%.15g)\n",GSL_REAL(c_r61),GSL_IMAG(c_r61));
|
414
|
+
printf(" assert r_r1.equals(r_r2)\n");
|
415
|
+
puts("end");
|
416
|
+
/* c_test_gsl_complex_polar */
|
417
|
+
double v33 = (double)2.0;
|
418
|
+
double v34 = (double)2.0;
|
419
|
+
gsl_complex c_r32;
|
420
|
+
c_r32 = gsl_complex_polar(v33,v34);
|
421
|
+
puts("def test_gsl_complex_polar()");
|
422
|
+
puts("");
|
423
|
+
puts(" v33 = 2.0");
|
424
|
+
puts("");
|
425
|
+
puts(" v34 = 2.0");
|
426
|
+
puts(" r_r1 = ::GSL4r::Complex::Methods::gsl_complex_polar(v33,v34)");
|
427
|
+
puts(" r_r2 = GSL_Complex.new");
|
428
|
+
printf(" r_r2.set(%.15g,%.15g)\n",GSL_REAL(c_r32),GSL_IMAG(c_r32));
|
429
|
+
printf(" assert r_r1.equals(r_r2)\n");
|
430
|
+
puts("end");
|
431
|
+
/* c_test_gsl_complex_arctan */
|
432
|
+
gsl_complex v58;
|
433
|
+
GSL_SET_COMPLEX(&v58, 2.0, 2.0);
|
434
|
+
gsl_complex c_r57;
|
435
|
+
c_r57 = gsl_complex_arctan(v58);
|
436
|
+
puts("def test_gsl_complex_arctan()");
|
437
|
+
puts(" v58 = GSL_Complex.create");
|
438
|
+
puts(" v58.set(2.0,2.0)");
|
439
|
+
puts(" r_r1 = ::GSL4r::Complex::Methods::gsl_complex_arctan(v58)");
|
440
|
+
puts(" r_r2 = GSL_Complex.new");
|
441
|
+
printf(" r_r2.set(%.15g,%.15g)\n",GSL_REAL(c_r57),GSL_IMAG(c_r57));
|
442
|
+
printf(" assert r_r1.equals(r_r2)\n");
|
443
|
+
puts("end");
|
444
|
+
/* c_test_gsl_complex_inverse */
|
445
|
+
gsl_complex v29;
|
446
|
+
GSL_SET_COMPLEX(&v29, 2.0, 2.0);
|
447
|
+
gsl_complex c_r28;
|
448
|
+
c_r28 = gsl_complex_inverse(v29);
|
449
|
+
puts("def test_gsl_complex_inverse()");
|
450
|
+
puts(" v29 = GSL_Complex.create");
|
451
|
+
puts(" v29.set(2.0,2.0)");
|
452
|
+
puts(" r_r1 = ::GSL4r::Complex::Methods::gsl_complex_inverse(v29)");
|
453
|
+
puts(" r_r2 = GSL_Complex.new");
|
454
|
+
printf(" r_r2.set(%.15g,%.15g)\n",GSL_REAL(c_r28),GSL_IMAG(c_r28));
|
455
|
+
printf(" assert r_r1.equals(r_r2)\n");
|
456
|
+
puts("end");
|
457
|
+
/* c_test_gsl_complex_arcsec */
|
458
|
+
gsl_complex v54;
|
459
|
+
GSL_SET_COMPLEX(&v54, 2.0, 2.0);
|
460
|
+
gsl_complex c_r53;
|
461
|
+
c_r53 = gsl_complex_arcsec(v54);
|
462
|
+
puts("def test_gsl_complex_arcsec()");
|
463
|
+
puts(" v54 = GSL_Complex.create");
|
464
|
+
puts(" v54.set(2.0,2.0)");
|
465
|
+
puts(" r_r1 = ::GSL4r::Complex::Methods::gsl_complex_arcsec(v54)");
|
466
|
+
puts(" r_r2 = GSL_Complex.new");
|
467
|
+
printf(" r_r2.set(%.15g,%.15g)\n",GSL_REAL(c_r53),GSL_IMAG(c_r53));
|
468
|
+
printf(" assert r_r1.equals(r_r2)\n");
|
469
|
+
puts("end");
|
470
|
+
/* c_test_gsl_complex_sub_imag */
|
471
|
+
gsl_complex v22;
|
472
|
+
GSL_SET_COMPLEX(&v22, 2.0, 2.0);
|
473
|
+
double v23 = (double)2.0;
|
474
|
+
gsl_complex c_r21;
|
475
|
+
c_r21 = gsl_complex_sub_imag(v22,v23);
|
476
|
+
puts("def test_gsl_complex_sub_imag()");
|
477
|
+
puts(" v22 = GSL_Complex.create");
|
478
|
+
puts(" v22.set(2.0,2.0)");
|
479
|
+
puts("");
|
480
|
+
puts(" v23 = 2.0");
|
481
|
+
puts(" r_r1 = ::GSL4r::Complex::Methods::gsl_complex_sub_imag(v22,v23)");
|
482
|
+
puts(" r_r2 = GSL_Complex.new");
|
483
|
+
printf(" r_r2.set(%.15g,%.15g)\n",GSL_REAL(c_r21),GSL_IMAG(c_r21));
|
484
|
+
printf(" assert r_r1.equals(r_r2)\n");
|
485
|
+
puts("end");
|
486
|
+
/* c_test_gsl_complex_arcsin */
|
487
|
+
gsl_complex v50;
|
488
|
+
GSL_SET_COMPLEX(&v50, 2.0, 2.0);
|
489
|
+
gsl_complex c_r49;
|
490
|
+
c_r49 = gsl_complex_arcsin(v50);
|
491
|
+
puts("def test_gsl_complex_arcsin()");
|
492
|
+
puts(" v50 = GSL_Complex.create");
|
493
|
+
puts(" v50.set(2.0,2.0)");
|
494
|
+
puts(" r_r1 = ::GSL4r::Complex::Methods::gsl_complex_arcsin(v50)");
|
495
|
+
puts(" r_r2 = GSL_Complex.new");
|
496
|
+
printf(" r_r2.set(%.15g,%.15g)\n",GSL_REAL(c_r49),GSL_IMAG(c_r49));
|
497
|
+
printf(" assert r_r1.equals(r_r2)\n");
|
498
|
+
puts("end");
|
499
|
+
/* c_test_gsl_complex_arg */
|
500
|
+
gsl_complex v1;
|
501
|
+
GSL_SET_COMPLEX(&v1, 2.0, 2.0);
|
502
|
+
double c_r0;
|
503
|
+
c_r0 = gsl_complex_arg(v1);
|
504
|
+
puts("def test_gsl_complex_arg()");
|
505
|
+
puts(" v1 = GSL_Complex.create");
|
506
|
+
puts(" v1.set(2.0,2.0)");
|
507
|
+
puts(" r_r1 = ::GSL4r::Complex::Methods::gsl_complex_arg(v1)");
|
508
|
+
printf(" assert_in_delta r_r1, %.15g, EPSILON\n", c_r0);
|
509
|
+
puts("end");
|
510
|
+
/* c_test_gsl_complex_arctanh */
|
511
|
+
gsl_complex v71;
|
512
|
+
GSL_SET_COMPLEX(&v71, 2.0, 2.0);
|
513
|
+
gsl_complex c_r70;
|
514
|
+
c_r70 = gsl_complex_arctanh(v71);
|
515
|
+
puts("def test_gsl_complex_arctanh()");
|
516
|
+
puts(" v71 = GSL_Complex.create");
|
517
|
+
puts(" v71.set(2.0,2.0)");
|
518
|
+
puts(" r_r1 = ::GSL4r::Complex::Methods::gsl_complex_arctanh(v71)");
|
519
|
+
puts(" r_r2 = GSL_Complex.new");
|
520
|
+
printf(" r_r2.set(%.15g,%.15g)\n",GSL_REAL(c_r70),GSL_IMAG(c_r70));
|
521
|
+
printf(" assert r_r1.equals(r_r2)\n");
|
522
|
+
puts("end");
|
523
|
+
/* c_test_gsl_complex_sub_real */
|
524
|
+
gsl_complex v14;
|
525
|
+
GSL_SET_COMPLEX(&v14, 2.0, 2.0);
|
526
|
+
double v15 = (double)2.0;
|
527
|
+
gsl_complex c_r13;
|
528
|
+
c_r13 = gsl_complex_sub_real(v14,v15);
|
529
|
+
puts("def test_gsl_complex_sub_real()");
|
530
|
+
puts(" v14 = GSL_Complex.create");
|
531
|
+
puts(" v14.set(2.0,2.0)");
|
532
|
+
puts("");
|
533
|
+
puts(" v15 = 2.0");
|
534
|
+
puts(" r_r1 = ::GSL4r::Complex::Methods::gsl_complex_sub_real(v14,v15)");
|
535
|
+
puts(" r_r2 = GSL_Complex.new");
|
536
|
+
printf(" r_r2.set(%.15g,%.15g)\n",GSL_REAL(c_r13),GSL_IMAG(c_r13));
|
537
|
+
printf(" assert r_r1.equals(r_r2)\n");
|
538
|
+
puts("end");
|
539
|
+
/* c_test_gsl_complex_sec */
|
540
|
+
gsl_complex v46;
|
541
|
+
GSL_SET_COMPLEX(&v46, 2.0, 2.0);
|
542
|
+
gsl_complex c_r45;
|
543
|
+
c_r45 = gsl_complex_sec(v46);
|
544
|
+
puts("def test_gsl_complex_sec()");
|
545
|
+
puts(" v46 = GSL_Complex.create");
|
546
|
+
puts(" v46.set(2.0,2.0)");
|
547
|
+
puts(" r_r1 = ::GSL4r::Complex::Methods::gsl_complex_sec(v46)");
|
548
|
+
puts(" r_r2 = GSL_Complex.new");
|
549
|
+
printf(" r_r2.set(%.15g,%.15g)\n",GSL_REAL(c_r45),GSL_IMAG(c_r45));
|
550
|
+
printf(" assert r_r1.equals(r_r2)\n");
|
551
|
+
puts("end");
|
552
|
+
/* c_test_gsl_complex_arccosh */
|
553
|
+
gsl_complex v67;
|
554
|
+
GSL_SET_COMPLEX(&v67, 2.0, 2.0);
|
555
|
+
gsl_complex c_r66;
|
556
|
+
c_r66 = gsl_complex_arccosh(v67);
|
557
|
+
puts("def test_gsl_complex_arccosh()");
|
558
|
+
puts(" v67 = GSL_Complex.create");
|
559
|
+
puts(" v67.set(2.0,2.0)");
|
560
|
+
puts(" r_r1 = ::GSL4r::Complex::Methods::gsl_complex_arccosh(v67)");
|
561
|
+
puts(" r_r2 = GSL_Complex.new");
|
562
|
+
printf(" r_r2.set(%.15g,%.15g)\n",GSL_REAL(c_r66),GSL_IMAG(c_r66));
|
563
|
+
printf(" assert r_r1.equals(r_r2)\n");
|
564
|
+
puts("end");
|
565
|
+
/* c_test_gsl_complex_sub */
|
566
|
+
gsl_complex v6;
|
567
|
+
GSL_SET_COMPLEX(&v6, 2.0, 2.0);
|
568
|
+
gsl_complex v7;
|
569
|
+
GSL_SET_COMPLEX(&v7, 2.0, 2.0);
|
570
|
+
gsl_complex c_r5;
|
571
|
+
c_r5 = gsl_complex_sub(v6,v7);
|
572
|
+
puts("def test_gsl_complex_sub()");
|
573
|
+
puts(" v6 = GSL_Complex.create");
|
574
|
+
puts(" v6.set(2.0,2.0)");
|
575
|
+
puts(" v7 = GSL_Complex.create");
|
576
|
+
puts(" v7.set(2.0,2.0)");
|
577
|
+
puts(" r_r1 = ::GSL4r::Complex::Methods::gsl_complex_sub(v6,v7)");
|
578
|
+
puts(" r_r2 = GSL_Complex.new");
|
579
|
+
printf(" r_r2.set(%.15g,%.15g)\n",GSL_REAL(c_r5),GSL_IMAG(c_r5));
|
580
|
+
printf(" assert r_r1.equals(r_r2)\n");
|
581
|
+
puts("end");
|
582
|
+
/* c_test_gsl_complex_log10 */
|
583
|
+
gsl_complex v41;
|
584
|
+
GSL_SET_COMPLEX(&v41, 2.0, 2.0);
|
585
|
+
gsl_complex c_r40;
|
586
|
+
c_r40 = gsl_complex_log10(v41);
|
587
|
+
puts("def test_gsl_complex_log10()");
|
588
|
+
puts(" v41 = GSL_Complex.create");
|
589
|
+
puts(" v41.set(2.0,2.0)");
|
590
|
+
puts(" r_r1 = ::GSL4r::Complex::Methods::gsl_complex_log10(v41)");
|
591
|
+
puts(" r_r2 = GSL_Complex.new");
|
592
|
+
printf(" r_r2.set(%.15g,%.15g)\n",GSL_REAL(c_r40),GSL_IMAG(c_r40));
|
593
|
+
printf(" assert r_r1.equals(r_r2)\n");
|
594
|
+
puts("end");
|
595
|
+
/* c_test_gsl_complex_csch */
|
596
|
+
gsl_complex v63;
|
597
|
+
GSL_SET_COMPLEX(&v63, 2.0, 2.0);
|
598
|
+
gsl_complex c_r62;
|
599
|
+
c_r62 = gsl_complex_csch(v63);
|
600
|
+
puts("def test_gsl_complex_csch()");
|
601
|
+
puts(" v63 = GSL_Complex.create");
|
602
|
+
puts(" v63.set(2.0,2.0)");
|
603
|
+
puts(" r_r1 = ::GSL4r::Complex::Methods::gsl_complex_csch(v63)");
|
604
|
+
puts(" r_r2 = GSL_Complex.new");
|
605
|
+
printf(" r_r2.set(%.15g,%.15g)\n",GSL_REAL(c_r62),GSL_IMAG(c_r62));
|
606
|
+
printf(" assert r_r1.equals(r_r2)\n");
|
607
|
+
puts("end");
|
608
|
+
/* c_test_gsl_complex_pow */
|
609
|
+
gsl_complex v35;
|
610
|
+
GSL_SET_COMPLEX(&v35, 2.0, 2.0);
|
611
|
+
gsl_complex v36;
|
612
|
+
GSL_SET_COMPLEX(&v36, 2.0, 2.0);
|
613
|
+
gsl_complex c_r34;
|
614
|
+
c_r34 = gsl_complex_pow(v35,v36);
|
615
|
+
puts("def test_gsl_complex_pow()");
|
616
|
+
puts(" v35 = GSL_Complex.create");
|
617
|
+
puts(" v35.set(2.0,2.0)");
|
618
|
+
puts(" v36 = GSL_Complex.create");
|
619
|
+
puts(" v36.set(2.0,2.0)");
|
620
|
+
puts(" r_r1 = ::GSL4r::Complex::Methods::gsl_complex_pow(v35,v36)");
|
621
|
+
puts(" r_r2 = GSL_Complex.new");
|
622
|
+
printf(" r_r2.set(%.15g,%.15g)\n",GSL_REAL(c_r34),GSL_IMAG(c_r34));
|
623
|
+
printf(" assert r_r1.equals(r_r2)\n");
|
624
|
+
puts("end");
|
625
|
+
/* c_test_gsl_complex_arccot */
|
626
|
+
gsl_complex v59;
|
627
|
+
GSL_SET_COMPLEX(&v59, 2.0, 2.0);
|
628
|
+
gsl_complex c_r58;
|
629
|
+
c_r58 = gsl_complex_arccot(v59);
|
630
|
+
puts("def test_gsl_complex_arccot()");
|
631
|
+
puts(" v59 = GSL_Complex.create");
|
632
|
+
puts(" v59.set(2.0,2.0)");
|
633
|
+
puts(" r_r1 = ::GSL4r::Complex::Methods::gsl_complex_arccot(v59)");
|
634
|
+
puts(" r_r2 = GSL_Complex.new");
|
635
|
+
printf(" r_r2.set(%.15g,%.15g)\n",GSL_REAL(c_r58),GSL_IMAG(c_r58));
|
636
|
+
printf(" assert r_r1.equals(r_r2)\n");
|
637
|
+
puts("end");
|
638
|
+
/* c_test_gsl_complex_negative */
|
639
|
+
gsl_complex v30;
|
640
|
+
GSL_SET_COMPLEX(&v30, 2.0, 2.0);
|
641
|
+
gsl_complex c_r29;
|
642
|
+
c_r29 = gsl_complex_negative(v30);
|
643
|
+
puts("def test_gsl_complex_negative()");
|
644
|
+
puts(" v30 = GSL_Complex.create");
|
645
|
+
puts(" v30.set(2.0,2.0)");
|
646
|
+
puts(" r_r1 = ::GSL4r::Complex::Methods::gsl_complex_negative(v30)");
|
647
|
+
puts(" r_r2 = GSL_Complex.new");
|
648
|
+
printf(" r_r2.set(%.15g,%.15g)\n",GSL_REAL(c_r29),GSL_IMAG(c_r29));
|
649
|
+
printf(" assert r_r1.equals(r_r2)\n");
|
650
|
+
puts("end");
|
651
|
+
/* c_test_gsl_complex_arcsec_real */
|
652
|
+
double v55 = (double)2.0;
|
653
|
+
gsl_complex c_r54;
|
654
|
+
c_r54 = gsl_complex_arcsec_real(v55);
|
655
|
+
puts("def test_gsl_complex_arcsec_real()");
|
656
|
+
puts("");
|
657
|
+
puts(" v55 = 2.0");
|
658
|
+
puts(" r_r1 = ::GSL4r::Complex::Methods::gsl_complex_arcsec_real(v55)");
|
659
|
+
puts(" r_r2 = GSL_Complex.new");
|
660
|
+
printf(" r_r2.set(%.15g,%.15g)\n",GSL_REAL(c_r54),GSL_IMAG(c_r54));
|
661
|
+
printf(" assert r_r1.equals(r_r2)\n");
|
662
|
+
puts("end");
|
663
|
+
/* c_test_gsl_complex_mul_imag */
|
664
|
+
gsl_complex v24;
|
665
|
+
GSL_SET_COMPLEX(&v24, 2.0, 2.0);
|
666
|
+
double v25 = (double)2.0;
|
667
|
+
gsl_complex c_r23;
|
668
|
+
c_r23 = gsl_complex_mul_imag(v24,v25);
|
669
|
+
puts("def test_gsl_complex_mul_imag()");
|
670
|
+
puts(" v24 = GSL_Complex.create");
|
671
|
+
puts(" v24.set(2.0,2.0)");
|
672
|
+
puts("");
|
673
|
+
puts(" v25 = 2.0");
|
674
|
+
puts(" r_r1 = ::GSL4r::Complex::Methods::gsl_complex_mul_imag(v24,v25)");
|
675
|
+
puts(" r_r2 = GSL_Complex.new");
|
676
|
+
printf(" r_r2.set(%.15g,%.15g)\n",GSL_REAL(c_r23),GSL_IMAG(c_r23));
|
677
|
+
printf(" assert r_r1.equals(r_r2)\n");
|
678
|
+
puts("end");
|
679
|
+
/* c_test_gsl_complex_arcsin_real */
|
680
|
+
double v51 = (double)2.0;
|
681
|
+
gsl_complex c_r50;
|
682
|
+
c_r50 = gsl_complex_arcsin_real(v51);
|
683
|
+
puts("def test_gsl_complex_arcsin_real()");
|
684
|
+
puts("");
|
685
|
+
puts(" v51 = 2.0");
|
686
|
+
puts(" r_r1 = ::GSL4r::Complex::Methods::gsl_complex_arcsin_real(v51)");
|
687
|
+
puts(" r_r2 = GSL_Complex.new");
|
688
|
+
printf(" r_r2.set(%.15g,%.15g)\n",GSL_REAL(c_r50),GSL_IMAG(c_r50));
|
689
|
+
printf(" assert r_r1.equals(r_r2)\n");
|
690
|
+
puts("end");
|
691
|
+
/* c_test_gsl_complex_abs */
|
692
|
+
gsl_complex v2;
|
693
|
+
GSL_SET_COMPLEX(&v2, 2.0, 2.0);
|
694
|
+
double c_r1;
|
695
|
+
c_r1 = gsl_complex_abs(v2);
|
696
|
+
puts("def test_gsl_complex_abs()");
|
697
|
+
puts(" v2 = GSL_Complex.create");
|
698
|
+
puts(" v2.set(2.0,2.0)");
|
699
|
+
puts(" r_r1 = ::GSL4r::Complex::Methods::gsl_complex_abs(v2)");
|
700
|
+
printf(" assert_in_delta r_r1, %.15g, EPSILON\n", c_r1);
|
701
|
+
puts("end");
|
702
|
+
/* c_test_gsl_complex_arctanh_real */
|
703
|
+
double v72 = (double)2.0;
|
704
|
+
gsl_complex c_r71;
|
705
|
+
c_r71 = gsl_complex_arctanh_real(v72);
|
706
|
+
puts("def test_gsl_complex_arctanh_real()");
|
707
|
+
puts("");
|
708
|
+
puts(" v72 = 2.0");
|
709
|
+
puts(" r_r1 = ::GSL4r::Complex::Methods::gsl_complex_arctanh_real(v72)");
|
710
|
+
puts(" r_r2 = GSL_Complex.new");
|
711
|
+
printf(" r_r2.set(%.15g,%.15g)\n",GSL_REAL(c_r71),GSL_IMAG(c_r71));
|
712
|
+
printf(" assert r_r1.equals(r_r2)\n");
|
713
|
+
puts("end");
|
714
|
+
/* c_test_gsl_complex_mul_real */
|
715
|
+
gsl_complex v16;
|
716
|
+
GSL_SET_COMPLEX(&v16, 2.0, 2.0);
|
717
|
+
double v17 = (double)2.0;
|
718
|
+
gsl_complex c_r15;
|
719
|
+
c_r15 = gsl_complex_mul_real(v16,v17);
|
720
|
+
puts("def test_gsl_complex_mul_real()");
|
721
|
+
puts(" v16 = GSL_Complex.create");
|
722
|
+
puts(" v16.set(2.0,2.0)");
|
723
|
+
puts("");
|
724
|
+
puts(" v17 = 2.0");
|
725
|
+
puts(" r_r1 = ::GSL4r::Complex::Methods::gsl_complex_mul_real(v16,v17)");
|
726
|
+
puts(" r_r2 = GSL_Complex.new");
|
727
|
+
printf(" r_r2.set(%.15g,%.15g)\n",GSL_REAL(c_r15),GSL_IMAG(c_r15));
|
728
|
+
printf(" assert r_r1.equals(r_r2)\n");
|
729
|
+
puts("end");
|
730
|
+
/* c_test_gsl_complex_csc */
|
731
|
+
gsl_complex v47;
|
732
|
+
GSL_SET_COMPLEX(&v47, 2.0, 2.0);
|
733
|
+
gsl_complex c_r46;
|
734
|
+
c_r46 = gsl_complex_csc(v47);
|
735
|
+
puts("def test_gsl_complex_csc()");
|
736
|
+
puts(" v47 = GSL_Complex.create");
|
737
|
+
puts(" v47.set(2.0,2.0)");
|
738
|
+
puts(" r_r1 = ::GSL4r::Complex::Methods::gsl_complex_csc(v47)");
|
739
|
+
puts(" r_r2 = GSL_Complex.new");
|
740
|
+
printf(" r_r2.set(%.15g,%.15g)\n",GSL_REAL(c_r46),GSL_IMAG(c_r46));
|
741
|
+
printf(" assert r_r1.equals(r_r2)\n");
|
742
|
+
puts("end");
|
743
|
+
/* c_test_gsl_complex_arccosh_real */
|
744
|
+
double v68 = (double)2.0;
|
745
|
+
gsl_complex c_r67;
|
746
|
+
c_r67 = gsl_complex_arccosh_real(v68);
|
747
|
+
puts("def test_gsl_complex_arccosh_real()");
|
748
|
+
puts("");
|
749
|
+
puts(" v68 = 2.0");
|
750
|
+
puts(" r_r1 = ::GSL4r::Complex::Methods::gsl_complex_arccosh_real(v68)");
|
751
|
+
puts(" r_r2 = GSL_Complex.new");
|
752
|
+
printf(" r_r2.set(%.15g,%.15g)\n",GSL_REAL(c_r67),GSL_IMAG(c_r67));
|
753
|
+
printf(" assert r_r1.equals(r_r2)\n");
|
754
|
+
puts("end");
|
755
|
+
/* c_test_gsl_complex_mul */
|
756
|
+
gsl_complex v8;
|
757
|
+
GSL_SET_COMPLEX(&v8, 2.0, 2.0);
|
758
|
+
gsl_complex v9;
|
759
|
+
GSL_SET_COMPLEX(&v9, 2.0, 2.0);
|
760
|
+
gsl_complex c_r7;
|
761
|
+
c_r7 = gsl_complex_mul(v8,v9);
|
762
|
+
puts("def test_gsl_complex_mul()");
|
763
|
+
puts(" v8 = GSL_Complex.create");
|
764
|
+
puts(" v8.set(2.0,2.0)");
|
765
|
+
puts(" v9 = GSL_Complex.create");
|
766
|
+
puts(" v9.set(2.0,2.0)");
|
767
|
+
puts(" r_r1 = ::GSL4r::Complex::Methods::gsl_complex_mul(v8,v9)");
|
768
|
+
puts(" r_r2 = GSL_Complex.new");
|
769
|
+
printf(" r_r2.set(%.15g,%.15g)\n",GSL_REAL(c_r7),GSL_IMAG(c_r7));
|
770
|
+
printf(" assert r_r1.equals(r_r2)\n");
|
771
|
+
puts("end");
|
772
|
+
/* c_test_gsl_complex_log_b */
|
773
|
+
gsl_complex v42;
|
774
|
+
GSL_SET_COMPLEX(&v42, 2.0, 2.0);
|
775
|
+
gsl_complex v43;
|
776
|
+
GSL_SET_COMPLEX(&v43, 2.0, 2.0);
|
777
|
+
gsl_complex c_r41;
|
778
|
+
c_r41 = gsl_complex_log_b(v42,v43);
|
779
|
+
puts("def test_gsl_complex_log_b()");
|
780
|
+
puts(" v42 = GSL_Complex.create");
|
781
|
+
puts(" v42.set(2.0,2.0)");
|
782
|
+
puts(" v43 = GSL_Complex.create");
|
783
|
+
puts(" v43.set(2.0,2.0)");
|
784
|
+
puts(" r_r1 = ::GSL4r::Complex::Methods::gsl_complex_log_b(v42,v43)");
|
785
|
+
puts(" r_r2 = GSL_Complex.new");
|
786
|
+
printf(" r_r2.set(%.15g,%.15g)\n",GSL_REAL(c_r41),GSL_IMAG(c_r41));
|
787
|
+
printf(" assert r_r1.equals(r_r2)\n");
|
788
|
+
puts("end");
|
789
|
+
puts("end");
|
790
|
+
return(0);
|
791
|
+
}
|