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