rb-gsl 1.16.0.4 → 1.16.0.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (307) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +12 -0
  3. data/.travis.yml +24 -0
  4. data/AUTHORS +6 -0
  5. data/COPYING +341 -339
  6. data/ChangeLog +608 -587
  7. data/Gemfile +4 -0
  8. data/README.md +77 -0
  9. data/Rakefile +14 -33
  10. data/THANKS +1 -1
  11. data/examples/blas/blas.rb +1 -1
  12. data/examples/bspline.rb +3 -3
  13. data/examples/complex/functions.rb +4 -4
  14. data/examples/complex/mul.rb +1 -1
  15. data/examples/const/physconst.rb +4 -4
  16. data/examples/const/travel.rb +4 -4
  17. data/examples/eigen/nonsymmv.rb +1 -1
  18. data/examples/eigen/qhoscillator.rb +3 -3
  19. data/examples/fft/radix2.rb +1 -1
  20. data/examples/fft/real-halfcomplex.rb +3 -3
  21. data/examples/fft/real-halfcomplex2.rb +3 -3
  22. data/examples/fit/expfit.rb +1 -1
  23. data/examples/fit/multifit.rb +1 -1
  24. data/examples/fit/ndlinear.rb +44 -44
  25. data/examples/fit/nonlinearfit.rb +1 -1
  26. data/examples/fit/wlinear.rb +3 -3
  27. data/examples/function/function.rb +1 -1
  28. data/examples/function/min.rb +1 -1
  29. data/examples/function/synchrotron.rb +2 -2
  30. data/examples/gallery/koch.rb +1 -1
  31. data/examples/histogram/cauchy.rb +2 -2
  32. data/examples/histogram/exponential.rb +1 -1
  33. data/examples/histogram/histo3d.rb +1 -1
  34. data/examples/histogram/histogram-pdf.rb +2 -2
  35. data/examples/histogram/xexp.rb +1 -1
  36. data/examples/integration/ahmed.rb +2 -2
  37. data/examples/integration/cosmology.rb +7 -7
  38. data/examples/integration/friedmann.rb +4 -4
  39. data/examples/integration/qng.rb +1 -1
  40. data/examples/interp/demo.rb +2 -2
  41. data/examples/linalg/LQ_solve.rb +1 -1
  42. data/examples/linalg/LU.rb +1 -1
  43. data/examples/linalg/LU2.rb +1 -1
  44. data/examples/linalg/LU_narray.rb +1 -1
  45. data/examples/linalg/PTLQ.rb +1 -1
  46. data/examples/linalg/QRPT.rb +1 -1
  47. data/examples/linalg/chol.rb +1 -1
  48. data/examples/linalg/chol_narray.rb +1 -1
  49. data/examples/linalg/complex.rb +1 -1
  50. data/examples/math/elementary.rb +1 -1
  51. data/examples/math/functions.rb +1 -1
  52. data/examples/math/inf_nan.rb +1 -1
  53. data/examples/math/minmax.rb +1 -1
  54. data/examples/math/power.rb +1 -1
  55. data/examples/math/test.rb +1 -1
  56. data/examples/min.rb +1 -1
  57. data/examples/multimin/bundle.rb +1 -1
  58. data/examples/multimin/cqp.rb +17 -17
  59. data/examples/multiroot/fsolver3.rb +1 -1
  60. data/examples/odeiv/binarysystem.rb +12 -12
  61. data/examples/odeiv/demo.rb +3 -3
  62. data/examples/odeiv/frei1.rb +7 -7
  63. data/examples/odeiv/frei2.rb +4 -4
  64. data/examples/odeiv/oscillator.rb +1 -1
  65. data/examples/odeiv/sedov.rb +3 -3
  66. data/examples/odeiv/whitedwarf.rb +11 -11
  67. data/examples/permutation/ex1.rb +2 -2
  68. data/examples/permutation/permutation.rb +1 -1
  69. data/examples/poly/demo.rb +1 -1
  70. data/examples/random/diffusion.rb +1 -1
  71. data/examples/random/generator.rb +2 -2
  72. data/examples/random/randomwalk.rb +3 -3
  73. data/examples/random/rng.rb +1 -1
  74. data/examples/roots/bisection.rb +1 -1
  75. data/examples/roots/brent.rb +1 -1
  76. data/examples/roots/demo.rb +1 -1
  77. data/examples/roots/newton.rb +2 -2
  78. data/examples/roots/recombination.gp +0 -1
  79. data/examples/sf/hyperg.rb +1 -1
  80. data/examples/sf/sphbessel.rb +1 -1
  81. data/examples/sort/sort.rb +1 -1
  82. data/examples/tamu_anova.rb +4 -4
  83. data/examples/vector/add.rb +1 -1
  84. data/examples/vector/decimate.rb +1 -1
  85. data/examples/vector/gnuplot.rb +8 -8
  86. data/examples/vector/vector.rb +2 -2
  87. data/examples/wavelet/wavelet1.rb +1 -1
  88. data/ext/{gsl → gsl_native}/alf.c +9 -9
  89. data/ext/{gsl → gsl_native}/array.c +64 -151
  90. data/ext/{gsl → gsl_native}/array_complex.c +61 -63
  91. data/ext/{gsl → gsl_native}/blas.c +0 -0
  92. data/ext/{gsl → gsl_native}/blas1.c +32 -32
  93. data/ext/{gsl → gsl_native}/blas2.c +54 -58
  94. data/ext/{gsl → gsl_native}/blas3.c +54 -54
  95. data/ext/{gsl → gsl_native}/block.c +3 -6
  96. data/ext/{gsl/block_source.c → gsl_native/block_source.h} +109 -111
  97. data/ext/gsl_native/bspline.c +122 -0
  98. data/ext/{gsl → gsl_native}/bundle.c +0 -0
  99. data/ext/{gsl → gsl_native}/cdf.c +76 -88
  100. data/ext/{gsl → gsl_native}/cheb.c +74 -85
  101. data/ext/{gsl → gsl_native}/combination.c +9 -16
  102. data/ext/{gsl → gsl_native}/common.c +7 -37
  103. data/ext/{gsl → gsl_native}/complex.c +113 -115
  104. data/ext/gsl_native/const.c +331 -0
  105. data/ext/{gsl → gsl_native}/const_additional.c +12 -33
  106. data/ext/gsl_native/cqp.c +283 -0
  107. data/ext/{gsl → gsl_native}/deriv.c +22 -30
  108. data/ext/{gsl → gsl_native}/dht.c +20 -28
  109. data/ext/{gsl → gsl_native}/diff.c +23 -25
  110. data/ext/{gsl → gsl_native}/dirac.c +44 -45
  111. data/ext/{gsl → gsl_native}/eigen.c +1031 -1082
  112. data/ext/{gsl → gsl_native}/error.c +13 -13
  113. data/ext/{gsl → gsl_native}/extconf.rb +5 -13
  114. data/ext/{gsl → gsl_native}/fft.c +192 -198
  115. data/ext/{gsl → gsl_native}/fit.c +16 -16
  116. data/ext/gsl_native/fresnel.c +312 -0
  117. data/ext/{gsl → gsl_native}/function.c +29 -35
  118. data/ext/{gsl → gsl_native}/geometry.c +15 -15
  119. data/ext/{gsl → gsl_native}/graph.c +37 -87
  120. data/ext/{gsl → gsl_native}/gsl.c +10 -23
  121. data/ext/{gsl → gsl_native}/gsl_narray.c +15 -24
  122. data/ext/{gsl → gsl_native}/histogram.c +123 -150
  123. data/ext/{gsl → gsl_native}/histogram2d.c +71 -96
  124. data/ext/{gsl → gsl_native}/histogram3d.c +72 -72
  125. data/ext/{gsl → gsl_native}/histogram3d_source.c +195 -196
  126. data/ext/{gsl → gsl_native}/histogram_find.c +31 -33
  127. data/ext/{gsl → gsl_native}/histogram_oper.c +43 -52
  128. data/ext/{gsl → gsl_native}/ieee.c +7 -15
  129. data/ext/{gsl → gsl_native}/include/rb_gsl.h +0 -7
  130. data/ext/{gsl → gsl_native}/include/rb_gsl_array.h +15 -25
  131. data/ext/{gsl → gsl_native}/include/rb_gsl_cheb.h +0 -0
  132. data/ext/{gsl → gsl_native}/include/rb_gsl_common.h +44 -52
  133. data/ext/{gsl → gsl_native}/include/rb_gsl_complex.h +0 -0
  134. data/ext/{gsl → gsl_native}/include/rb_gsl_const.h +0 -5
  135. data/ext/{gsl → gsl_native}/include/rb_gsl_dirac.h +0 -0
  136. data/ext/{gsl → gsl_native}/include/rb_gsl_eigen.h +0 -0
  137. data/ext/{gsl → gsl_native}/include/rb_gsl_fft.h +0 -3
  138. data/ext/{gsl → gsl_native}/include/rb_gsl_fit.h +0 -0
  139. data/ext/{gsl → gsl_native}/include/rb_gsl_function.h +0 -0
  140. data/ext/{gsl → gsl_native}/include/rb_gsl_graph.h +2 -2
  141. data/ext/{gsl → gsl_native}/include/rb_gsl_histogram.h +8 -8
  142. data/ext/{gsl → gsl_native}/include/rb_gsl_histogram3d.h +50 -50
  143. data/ext/{gsl → gsl_native}/include/rb_gsl_integration.h +0 -0
  144. data/ext/{gsl → gsl_native}/include/rb_gsl_interp.h +0 -0
  145. data/ext/{gsl → gsl_native}/include/rb_gsl_linalg.h +0 -1
  146. data/ext/{gsl → gsl_native}/include/rb_gsl_math.h +0 -4
  147. data/ext/{gsl → gsl_native}/include/rb_gsl_odeiv.h +0 -0
  148. data/ext/{gsl → gsl_native}/include/rb_gsl_poly.h +3 -3
  149. data/ext/{gsl → gsl_native}/include/rb_gsl_rational.h +1 -1
  150. data/ext/{gsl → gsl_native}/include/rb_gsl_rng.h +0 -0
  151. data/ext/{gsl → gsl_native}/include/rb_gsl_root.h +0 -0
  152. data/ext/{gsl → gsl_native}/include/rb_gsl_sf.h +39 -43
  153. data/ext/{gsl → gsl_native}/include/rb_gsl_statistics.h +0 -0
  154. data/ext/{gsl → gsl_native}/include/rb_gsl_tensor.h +0 -0
  155. data/ext/{gsl → gsl_native}/include/rb_gsl_with_narray.h +0 -0
  156. data/ext/{gsl → gsl_native}/include/templates_off.h +0 -0
  157. data/ext/{gsl → gsl_native}/include/templates_on.h +1 -1
  158. data/ext/{gsl → gsl_native}/integration.c +160 -183
  159. data/ext/{gsl → gsl_native}/interp.c +23 -31
  160. data/ext/gsl_native/jacobi.c +733 -0
  161. data/ext/{gsl → gsl_native}/linalg.c +448 -576
  162. data/ext/{gsl → gsl_native}/linalg_complex.c +84 -98
  163. data/ext/{gsl → gsl_native}/math.c +45 -63
  164. data/ext/{gsl → gsl_native}/matrix.c +4 -6
  165. data/ext/{gsl → gsl_native}/matrix_complex.c +111 -114
  166. data/ext/{gsl → gsl_native}/matrix_double.c +74 -77
  167. data/ext/{gsl → gsl_native}/matrix_int.c +49 -50
  168. data/ext/{gsl/matrix_source.c → gsl_native/matrix_source.h} +280 -302
  169. data/ext/{gsl → gsl_native}/min.c +43 -74
  170. data/ext/{gsl → gsl_native}/monte.c +45 -59
  171. data/ext/{gsl → gsl_native}/multifit.c +138 -147
  172. data/ext/{gsl → gsl_native}/multimin.c +55 -83
  173. data/ext/{gsl → gsl_native}/multimin_fsdf.c +15 -15
  174. data/ext/{gsl → gsl_native}/multiroots.c +61 -64
  175. data/ext/{gsl → gsl_native}/multiset.c +3 -7
  176. data/ext/{gsl → gsl_native}/ndlinear.c +320 -321
  177. data/ext/{gsl → gsl_native}/nmf.c +11 -11
  178. data/ext/{gsl → gsl_native}/nmf_wrap.c +1 -1
  179. data/ext/{gsl → gsl_native}/ntuple.c +13 -13
  180. data/ext/{gsl → gsl_native}/odeiv.c +95 -106
  181. data/ext/gsl_native/ool.c +879 -0
  182. data/ext/{gsl → gsl_native}/permutation.c +36 -34
  183. data/ext/{gsl → gsl_native}/poly.c +2 -5
  184. data/ext/{gsl → gsl_native}/poly2.c +6 -6
  185. data/ext/{gsl/poly_source.c → gsl_native/poly_source.h} +232 -275
  186. data/ext/{gsl → gsl_native}/qrng.c +6 -17
  187. data/ext/{gsl → gsl_native}/randist.c +218 -243
  188. data/ext/{gsl → gsl_native}/rational.c +9 -9
  189. data/ext/{gsl → gsl_native}/rng.c +29 -45
  190. data/ext/{gsl → gsl_native}/root.c +43 -43
  191. data/ext/{gsl → gsl_native}/sf.c +163 -197
  192. data/ext/{gsl → gsl_native}/sf_airy.c +0 -0
  193. data/ext/{gsl → gsl_native}/sf_bessel.c +6 -6
  194. data/ext/{gsl → gsl_native}/sf_clausen.c +0 -0
  195. data/ext/{gsl → gsl_native}/sf_coulomb.c +39 -39
  196. data/ext/{gsl → gsl_native}/sf_coupling.c +29 -29
  197. data/ext/{gsl → gsl_native}/sf_dawson.c +0 -0
  198. data/ext/{gsl → gsl_native}/sf_debye.c +0 -9
  199. data/ext/{gsl → gsl_native}/sf_dilog.c +0 -0
  200. data/ext/{gsl → gsl_native}/sf_elementary.c +2 -2
  201. data/ext/{gsl → gsl_native}/sf_ellint.c +42 -42
  202. data/ext/{gsl → gsl_native}/sf_elljac.c +2 -2
  203. data/ext/{gsl → gsl_native}/sf_erfc.c +0 -4
  204. data/ext/{gsl → gsl_native}/sf_exp.c +2 -2
  205. data/ext/{gsl → gsl_native}/sf_expint.c +1 -11
  206. data/ext/{gsl → gsl_native}/sf_fermi_dirac.c +0 -0
  207. data/ext/{gsl → gsl_native}/sf_gamma.c +1 -5
  208. data/ext/{gsl → gsl_native}/sf_gegenbauer.c +0 -0
  209. data/ext/{gsl → gsl_native}/sf_hyperg.c +0 -0
  210. data/ext/{gsl → gsl_native}/sf_laguerre.c +3 -3
  211. data/ext/{gsl → gsl_native}/sf_lambert.c +0 -0
  212. data/ext/{gsl → gsl_native}/sf_legendre.c +0 -0
  213. data/ext/{gsl → gsl_native}/sf_log.c +3 -3
  214. data/ext/gsl_native/sf_mathieu.c +235 -0
  215. data/ext/{gsl → gsl_native}/sf_power.c +0 -0
  216. data/ext/{gsl → gsl_native}/sf_psi.c +2 -11
  217. data/ext/{gsl → gsl_native}/sf_synchrotron.c +0 -0
  218. data/ext/{gsl → gsl_native}/sf_transport.c +0 -0
  219. data/ext/{gsl → gsl_native}/sf_trigonometric.c +3 -3
  220. data/ext/{gsl → gsl_native}/sf_zeta.c +0 -4
  221. data/ext/{gsl → gsl_native}/signal.c +60 -64
  222. data/ext/{gsl → gsl_native}/siman.c +36 -40
  223. data/ext/{gsl → gsl_native}/sort.c +3 -4
  224. data/ext/{gsl → gsl_native}/spline.c +25 -43
  225. data/ext/{gsl → gsl_native}/stats.c +102 -115
  226. data/ext/{gsl → gsl_native}/sum.c +32 -32
  227. data/ext/{gsl → gsl_native}/tamu_anova.c +0 -0
  228. data/ext/{gsl → gsl_native}/tensor.c +2 -4
  229. data/ext/{gsl/tensor_source.c → gsl_native/tensor_source.h} +144 -144
  230. data/ext/{gsl → gsl_native}/vector.c +2 -4
  231. data/ext/{gsl → gsl_native}/vector_complex.c +165 -171
  232. data/ext/{gsl → gsl_native}/vector_double.c +167 -174
  233. data/ext/{gsl → gsl_native}/vector_int.c +23 -25
  234. data/ext/{gsl/vector_source.c → gsl_native/vector_source.h} +400 -414
  235. data/ext/{gsl → gsl_native}/wavelet.c +215 -236
  236. data/lib/gsl.rb +1 -7
  237. data/lib/gsl/gnuplot.rb +2 -2
  238. data/lib/gsl/version.rb +1 -3
  239. data/rb-gsl.gemspec +29 -0
  240. data/rdoc/blas.rdoc +3 -3
  241. data/rdoc/bspline.rdoc +7 -7
  242. data/rdoc/cheb.rdoc +8 -8
  243. data/rdoc/cholesky_complex.rdoc +1 -1
  244. data/rdoc/combi.rdoc +9 -9
  245. data/rdoc/complex.rdoc +11 -11
  246. data/rdoc/const.rdoc +20 -20
  247. data/rdoc/dht.rdoc +6 -6
  248. data/rdoc/diff.rdoc +6 -6
  249. data/rdoc/ehandling.rdoc +3 -3
  250. data/rdoc/eigen.rdoc +11 -11
  251. data/rdoc/fft.rdoc +26 -26
  252. data/rdoc/fit.rdoc +18 -18
  253. data/rdoc/graph.rdoc +2 -2
  254. data/rdoc/hist.rdoc +16 -16
  255. data/rdoc/hist2d.rdoc +4 -4
  256. data/rdoc/hist3d.rdoc +3 -3
  257. data/rdoc/integration.rdoc +16 -16
  258. data/rdoc/interp.rdoc +11 -11
  259. data/rdoc/intro.rdoc +3 -3
  260. data/rdoc/linalg.rdoc +20 -20
  261. data/rdoc/linalg_complex.rdoc +1 -1
  262. data/rdoc/math.rdoc +13 -13
  263. data/rdoc/matrix.rdoc +22 -22
  264. data/rdoc/min.rdoc +9 -9
  265. data/rdoc/monte.rdoc +3 -3
  266. data/rdoc/multimin.rdoc +12 -12
  267. data/rdoc/multiroot.rdoc +12 -12
  268. data/rdoc/narray.rdoc +9 -9
  269. data/rdoc/ndlinear.rdoc +4 -4
  270. data/rdoc/nonlinearfit.rdoc +17 -17
  271. data/rdoc/ntuple.rdoc +5 -5
  272. data/rdoc/odeiv.rdoc +12 -12
  273. data/rdoc/perm.rdoc +11 -11
  274. data/rdoc/poly.rdoc +17 -17
  275. data/rdoc/qrng.rdoc +9 -9
  276. data/rdoc/randist.rdoc +10 -10
  277. data/rdoc/ref.rdoc +49 -49
  278. data/rdoc/rng.rdoc +9 -9
  279. data/rdoc/roots.rdoc +12 -12
  280. data/rdoc/sf.rdoc +35 -35
  281. data/rdoc/siman.rdoc +3 -3
  282. data/rdoc/sort.rdoc +6 -6
  283. data/rdoc/start.rdoc +2 -2
  284. data/rdoc/stats.rdoc +13 -13
  285. data/rdoc/sum.rdoc +4 -4
  286. data/rdoc/tensor.rdoc +3 -3
  287. data/rdoc/tut.rdoc +1 -1
  288. data/rdoc/use.rdoc +3 -3
  289. data/rdoc/vector.rdoc +28 -28
  290. data/rdoc/vector_complex.rdoc +6 -6
  291. data/rdoc/wavelet.rdoc +8 -8
  292. data/test/gsl/blas_test.rb +1 -1
  293. data/test/gsl/index_test.rb +61 -0
  294. data/test/gsl/matrix_test.rb +21 -0
  295. data/uncrustify.cfg +1693 -0
  296. metadata +212 -243
  297. data/README +0 -28
  298. data/ext/gsl/bspline.c +0 -130
  299. data/ext/gsl/const.c +0 -672
  300. data/ext/gsl/cqp.c +0 -283
  301. data/ext/gsl/fcmp.c +0 -64
  302. data/ext/gsl/fresnel.c +0 -312
  303. data/ext/gsl/jacobi.c +0 -739
  304. data/ext/gsl/ool.c +0 -879
  305. data/ext/gsl/oper_complex_source.c +0 -251
  306. data/ext/gsl/sf_mathieu.c +0 -238
  307. data/rdoc/index.rdoc +0 -50
@@ -31,11 +31,9 @@ gsl_complex rb_gsl_obj_to_gsl_complex(VALUE obj, gsl_complex *z)
31
31
  z = &tmp;
32
32
  GSL_SET_COMPLEX(z, 0.0, 0.0);
33
33
  }
34
-
35
34
  if(obj == Qnil) {
36
35
  return *z;
37
36
  }
38
-
39
37
  switch(TYPE(obj)) {
40
38
  case T_ARRAY:
41
39
  vre = rb_ary_entry(obj,0);
@@ -54,8 +52,8 @@ gsl_complex rb_gsl_obj_to_gsl_complex(VALUE obj, gsl_complex *z)
54
52
  *z = *zz;
55
53
  } else {
56
54
  rb_raise(rb_eTypeError,
57
- "wrong type %s, (nil, Array, Float, Integer, or GSL::Complex expected)",
58
- rb_class2name(CLASS_OF(obj)));
55
+ "wrong type %s, (nil, Array, Float, Integer, or GSL::Complex expected)",
56
+ rb_class2name(CLASS_OF(obj)));
59
57
  }
60
58
  break;
61
59
  }
@@ -66,7 +64,7 @@ static VALUE rb_gsl_complex_new(int argc, VALUE *argv, VALUE klass)
66
64
  {
67
65
  gsl_complex *c = NULL;
68
66
  VALUE obj;
69
- obj = Data_Make_Struct(klass, gsl_complex, 0, free, c);
67
+ obj = Data_Make_Struct(klass, gsl_complex, 0, free, c);
70
68
  switch (argc) {
71
69
  case 1:
72
70
  switch (TYPE(argv[0])) {
@@ -80,8 +78,8 @@ static VALUE rb_gsl_complex_new(int argc, VALUE *argv, VALUE klass)
80
78
  *c = gsl_complex_rect(NUM2DBL(argv[0]), 0.0);
81
79
  break;
82
80
  default:
83
- rb_raise(rb_eTypeError, "wrong argument type %s",
84
- rb_class2name(CLASS_OF(argv[0])));
81
+ rb_raise(rb_eTypeError, "wrong argument type %s",
82
+ rb_class2name(CLASS_OF(argv[0])));
85
83
  }
86
84
  break;
87
85
  case 2:
@@ -107,7 +105,7 @@ static VALUE rb_gsl_complex_polar(VALUE klass, VALUE r, VALUE theta)
107
105
  VALUE obj;
108
106
  gsl_complex *c = NULL;
109
107
  Need_Float(r); Need_Float(theta);
110
- obj = Data_Make_Struct(klass, gsl_complex, 0, free, c);
108
+ obj = Data_Make_Struct(klass, gsl_complex, 0, free, c);
111
109
  *c = gsl_complex_polar(NUM2DBL(r), NUM2DBL(theta));
112
110
  return obj;
113
111
  }
@@ -121,10 +119,10 @@ static VALUE rb_gsl_complex_get(VALUE obj, VALUE ii)
121
119
  i = FIX2INT(ii);
122
120
  switch (i) {
123
121
  case 0:
124
- return rb_float_new(GSL_REAL(*c));
122
+ return rb_float_new(GSL_REAL(*c));
125
123
  break;
126
124
  case 1:
127
- return rb_float_new(GSL_IMAG(*c));
125
+ return rb_float_new(GSL_IMAG(*c));
128
126
  break;
129
127
  default:
130
128
  rb_raise(rb_eArgError, "wrong argument (%d for 0 or 1)", i);
@@ -137,14 +135,14 @@ static VALUE rb_gsl_complex_real(VALUE obj)
137
135
  {
138
136
  gsl_complex *c = NULL;
139
137
  Data_Get_Struct(obj, gsl_complex, c);
140
- return rb_float_new(GSL_REAL(*c));
138
+ return rb_float_new(GSL_REAL(*c));
141
139
  }
142
140
 
143
141
  static VALUE rb_gsl_complex_imag(VALUE obj)
144
142
  {
145
143
  gsl_complex *c = NULL;
146
144
  Data_Get_Struct(obj, gsl_complex, c);
147
- return rb_float_new(GSL_IMAG(*c));
145
+ return rb_float_new(GSL_IMAG(*c));
148
146
  }
149
147
 
150
148
  static VALUE rb_gsl_complex_print(VALUE obj)
@@ -172,7 +170,7 @@ static VALUE rb_gsl_complex_return_double(double (*func)(gsl_complex), VALUE obj
172
170
  {
173
171
  gsl_complex *c = NULL;
174
172
  Data_Get_Struct(obj, gsl_complex, c);
175
- return rb_float_new((*func)(*c));
173
+ return rb_float_new((*func)(*c));
176
174
  }
177
175
 
178
176
  static VALUE rb_gsl_complex_arg(VALUE obj)
@@ -196,10 +194,10 @@ static VALUE rb_gsl_complex_logabs(VALUE obj)
196
194
  }
197
195
 
198
196
  static VALUE rb_gsl_complex_arithmetics2(gsl_complex (*func)(gsl_complex, double),
199
- VALUE obj, VALUE xx);
197
+ VALUE obj, VALUE xx);
200
198
 
201
199
  static VALUE rb_gsl_complex_arithmetics2(gsl_complex (*func)(gsl_complex, double),
202
- VALUE obj, VALUE xx)
200
+ VALUE obj, VALUE xx)
203
201
  {
204
202
  gsl_complex *a = NULL, *c = NULL, tmp;
205
203
  VALUE obj2;
@@ -208,7 +206,7 @@ static VALUE rb_gsl_complex_arithmetics2(gsl_complex (*func)(gsl_complex, double
208
206
  Data_Get_Struct(obj, gsl_complex, a);
209
207
  x = NUM2DBL(xx);
210
208
  tmp = (*func)(*a, x);
211
- obj2 = Data_Make_Struct(cgsl_complex, gsl_complex, 0, free, c);
209
+ obj2 = Data_Make_Struct(cgsl_complex, gsl_complex, 0, free, c);
212
210
  *c = tmp;
213
211
  return obj2;
214
212
  }
@@ -262,7 +260,7 @@ static VALUE rb_gsl_complex_operate(gsl_complex (*func)(gsl_complex), VALUE obj)
262
260
  Data_Get_Struct(obj, gsl_complex, c);
263
261
  cnew = ALLOC(gsl_complex);
264
262
  *cnew = (*func)(*c);
265
- return Data_Wrap_Struct(cgsl_complex, 0, free, cnew);
263
+ return Data_Wrap_Struct(cgsl_complex, 0, free, cnew);
266
264
  }
267
265
 
268
266
  static VALUE rb_gsl_complex_operate2(gsl_complex (*func)(gsl_complex), int argc, VALUE *argv, VALUE obj)
@@ -279,33 +277,33 @@ static VALUE rb_gsl_complex_operate2(gsl_complex (*func)(gsl_complex), int argc,
279
277
  case 1:
280
278
  switch (TYPE(argv[0])) {
281
279
  case T_ARRAY:
282
- tmp = ary2complex(argv[0]);
283
- c = &tmp;
284
- break;
280
+ tmp = ary2complex(argv[0]);
281
+ c = &tmp;
282
+ break;
285
283
  default:
286
- if (VECTOR_COMPLEX_P(argv[0])) {
287
- Data_Get_Struct(argv[0], gsl_vector_complex, v);
288
- vnew = gsl_vector_complex_alloc(v->size);
289
- for (i = 0; i < v->size; i++) {
290
- c = GSL_COMPLEX_AT(v, i);
291
- gsl_vector_complex_set(vnew, i, (*func)(*c));
292
- }
293
- return Data_Wrap_Struct(cgsl_vector_complex, 0, gsl_vector_free, vnew);
294
- } else if (MATRIX_COMPLEX_P(obj)) {
295
- Data_Get_Struct(obj, gsl_matrix_complex, m);
296
- mnew = gsl_matrix_complex_alloc(m->size1, m->size2);
297
- for (i = 0; i < m->size1; i++) {
298
- for (j = 0; j < m->size2; j++) {
299
- gsl_matrix_complex_set(mnew, i, j,
300
- (*func)(gsl_matrix_complex_get(m, i, j)));
301
- }
302
- }
303
- return Data_Wrap_Struct(cgsl_matrix_complex, 0, gsl_matrix_complex_free, mnew);
304
- } else {
305
- CHECK_COMPLEX(argv[0]);
306
- Data_Get_Struct(argv[0], gsl_complex, c);
307
- }
308
- break;
284
+ if (VECTOR_COMPLEX_P(argv[0])) {
285
+ Data_Get_Struct(argv[0], gsl_vector_complex, v);
286
+ vnew = gsl_vector_complex_alloc(v->size);
287
+ for (i = 0; i < v->size; i++) {
288
+ c = GSL_COMPLEX_AT(v, i);
289
+ gsl_vector_complex_set(vnew, i, (*func)(*c));
290
+ }
291
+ return Data_Wrap_Struct(cgsl_vector_complex, 0, gsl_vector_free, vnew);
292
+ } else if (MATRIX_COMPLEX_P(obj)) {
293
+ Data_Get_Struct(obj, gsl_matrix_complex, m);
294
+ mnew = gsl_matrix_complex_alloc(m->size1, m->size2);
295
+ for (i = 0; i < m->size1; i++) {
296
+ for (j = 0; j < m->size2; j++) {
297
+ gsl_matrix_complex_set(mnew, i, j,
298
+ (*func)(gsl_matrix_complex_get(m, i, j)));
299
+ }
300
+ }
301
+ return Data_Wrap_Struct(cgsl_matrix_complex, 0, gsl_matrix_complex_free, mnew);
302
+ } else {
303
+ CHECK_COMPLEX(argv[0]);
304
+ Data_Get_Struct(argv[0], gsl_complex, c);
305
+ }
306
+ break;
309
307
  }
310
308
  break;
311
309
  case 2:
@@ -324,7 +322,7 @@ static VALUE rb_gsl_complex_operate2(gsl_complex (*func)(gsl_complex), int argc,
324
322
  }
325
323
  cnew = ALLOC(gsl_complex);
326
324
  *cnew = (*func)(*c);
327
- return Data_Wrap_Struct(cgsl_complex, 0, free, cnew);
325
+ return Data_Wrap_Struct(cgsl_complex, 0, free, cnew);
328
326
  }
329
327
 
330
328
  static VALUE rb_gsl_complex_conjugate(VALUE obj)
@@ -350,7 +348,7 @@ static VALUE rb_gsl_complex_sqrt_real(VALUE obj, VALUE x)
350
348
  tmp = gsl_complex_sqrt_real(NUM2DBL(x));
351
349
  cnew = ALLOC(gsl_complex);
352
350
  *cnew = tmp;
353
- return Data_Wrap_Struct(cgsl_complex, 0, free, cnew);
351
+ return Data_Wrap_Struct(cgsl_complex, 0, free, cnew);
354
352
  }
355
353
 
356
354
  static VALUE rb_gsl_complex_sqrt(int argc, VALUE *argv, VALUE obj)
@@ -362,22 +360,22 @@ static VALUE rb_gsl_complex_sqrt(int argc, VALUE *argv, VALUE obj)
362
360
  case 1:
363
361
  switch (TYPE(argv[0])) {
364
362
  case T_FIXNUM: case T_FLOAT:
365
- return rb_gsl_complex_sqrt_real(obj, argv[0]);
366
- break;
363
+ return rb_gsl_complex_sqrt_real(obj, argv[0]);
364
+ break;
367
365
  case T_ARRAY:
368
- tmp = ary2complex(argv[0]);
369
- z = ALLOC(gsl_complex);
370
- *z = gsl_complex_sqrt(tmp);
371
- return Data_Wrap_Struct(cgsl_complex, 0, free, z);
372
- break;
366
+ tmp = ary2complex(argv[0]);
367
+ z = ALLOC(gsl_complex);
368
+ *z = gsl_complex_sqrt(tmp);
369
+ return Data_Wrap_Struct(cgsl_complex, 0, free, z);
370
+ break;
373
371
  default:
374
- CHECK_COMPLEX(argv[0]);
375
- Data_Get_Struct(argv[0], gsl_complex, z);
376
- tmp = *z;
377
- z = ALLOC(gsl_complex);
378
- *z = gsl_complex_sqrt(tmp);
379
- return Data_Wrap_Struct(cgsl_complex, 0, free, z);
380
- break;
372
+ CHECK_COMPLEX(argv[0]);
373
+ Data_Get_Struct(argv[0], gsl_complex, z);
374
+ tmp = *z;
375
+ z = ALLOC(gsl_complex);
376
+ *z = gsl_complex_sqrt(tmp);
377
+ return Data_Wrap_Struct(cgsl_complex, 0, free, z);
378
+ break;
381
379
  }
382
380
  break;
383
381
  case 2:
@@ -385,7 +383,7 @@ static VALUE rb_gsl_complex_sqrt(int argc, VALUE *argv, VALUE obj)
385
383
  GSL_SET_REAL(&tmp, NUM2DBL(argv[0]));
386
384
  GSL_SET_IMAG(&tmp, NUM2DBL(argv[1]));
387
385
  *z = gsl_complex_sqrt(tmp);
388
- return Data_Wrap_Struct(cgsl_complex, 0, free, z);
386
+ return Data_Wrap_Struct(cgsl_complex, 0, free, z);
389
387
  break;
390
388
  default:
391
389
  rb_raise(rb_eArgError, "wrong number of arguments (%d for 1 or 2)", argc);
@@ -408,14 +406,14 @@ VALUE rb_gsl_complex_pow(int argc, VALUE *argv, VALUE obj)
408
406
  case T_MODULE:
409
407
  case T_CLASS:
410
408
  case T_OBJECT:
411
- if (argc != 2)
409
+ if (argc != 2)
412
410
  rb_raise(rb_eArgError, "wrong number of arguments (%d for 2)", argc);
413
411
  switch (TYPE(argv[1])) {
414
412
  case T_ARRAY:
415
413
  tmpa = ary2complex(argv[1]);
416
414
  a = &tmpa;
417
415
  break;
418
- case T_FLOAT: case T_FIXNUM:
416
+ case T_FLOAT: case T_FIXNUM:
419
417
  return rb_gsl_complex_pow_real(argc, argv, obj);
420
418
  break;
421
419
  default:
@@ -431,24 +429,24 @@ VALUE rb_gsl_complex_pow(int argc, VALUE *argv, VALUE obj)
431
429
  break;
432
430
  default:
433
431
  if (VECTOR_COMPLEX_P(argv[0])) {
434
- Data_Get_Struct(argv[0], gsl_vector_complex, v);
435
- vnew = gsl_vector_complex_alloc(v->size);
436
- for (i = 0; i < v->size; i++) {
437
- c = GSL_COMPLEX_AT(v, i);
438
- gsl_vector_complex_set(vnew, i, gsl_complex_pow(*c, *a));
439
- }
440
- return Data_Wrap_Struct(cgsl_vector_complex, 0, gsl_vector_complex_free, vnew);
432
+ Data_Get_Struct(argv[0], gsl_vector_complex, v);
433
+ vnew = gsl_vector_complex_alloc(v->size);
434
+ for (i = 0; i < v->size; i++) {
435
+ c = GSL_COMPLEX_AT(v, i);
436
+ gsl_vector_complex_set(vnew, i, gsl_complex_pow(*c, *a));
437
+ }
438
+ return Data_Wrap_Struct(cgsl_vector_complex, 0, gsl_vector_complex_free, vnew);
441
439
  }
442
440
  if (MATRIX_COMPLEX_P(argv[0])) {
443
- Data_Get_Struct(argv[0], gsl_matrix_complex, m);
444
- mnew = gsl_matrix_complex_alloc(m->size1, m->size2);
445
- for (i = 0; i < m->size1; i++) {
446
- for (j = 0; j < m->size2; j++) {
447
- c = gsl_matrix_complex_ptr(m, i, j);
448
- gsl_matrix_complex_set(mnew, i, j, gsl_complex_pow(*c, *a));
449
- }
450
- }
451
- return Data_Wrap_Struct(cgsl_matrix_complex, 0, gsl_matrix_complex_free, mnew);
441
+ Data_Get_Struct(argv[0], gsl_matrix_complex, m);
442
+ mnew = gsl_matrix_complex_alloc(m->size1, m->size2);
443
+ for (i = 0; i < m->size1; i++) {
444
+ for (j = 0; j < m->size2; j++) {
445
+ c = gsl_matrix_complex_ptr(m, i, j);
446
+ gsl_matrix_complex_set(mnew, i, j, gsl_complex_pow(*c, *a));
447
+ }
448
+ }
449
+ return Data_Wrap_Struct(cgsl_matrix_complex, 0, gsl_matrix_complex_free, mnew);
452
450
  }
453
451
  CHECK_COMPLEX(argv[0]);
454
452
  Data_Get_Struct(argv[0], gsl_complex, c);
@@ -457,7 +455,7 @@ VALUE rb_gsl_complex_pow(int argc, VALUE *argv, VALUE obj)
457
455
 
458
456
  break;
459
457
  default:
460
- if (argc != 1)
458
+ if (argc != 1)
461
459
  rb_raise(rb_eArgError, "wrong number of arguments (%d for 1)", argc);
462
460
  CHECK_COMPLEX(obj);
463
461
  Data_Get_Struct(obj, gsl_complex, c);
@@ -466,7 +464,7 @@ VALUE rb_gsl_complex_pow(int argc, VALUE *argv, VALUE obj)
466
464
  tmpa = ary2complex(argv[0]);
467
465
  a = &tmpa;
468
466
  break;
469
- case T_FLOAT: case T_FIXNUM:
467
+ case T_FLOAT: case T_FIXNUM:
470
468
  return rb_gsl_complex_pow_real(argc, argv, obj);
471
469
  break;
472
470
  default:
@@ -478,7 +476,7 @@ VALUE rb_gsl_complex_pow(int argc, VALUE *argv, VALUE obj)
478
476
  }
479
477
  cnew = ALLOC(gsl_complex);
480
478
  *cnew = gsl_complex_pow(*c, *a);
481
- return Data_Wrap_Struct(cgsl_complex, 0, free, cnew);
479
+ return Data_Wrap_Struct(cgsl_complex, 0, free, cnew);
482
480
  }
483
481
 
484
482
  VALUE rb_gsl_complex_pow_real(int argc, VALUE *argv, VALUE obj)
@@ -492,7 +490,7 @@ VALUE rb_gsl_complex_pow_real(int argc, VALUE *argv, VALUE obj)
492
490
  case T_MODULE:
493
491
  case T_CLASS:
494
492
  case T_OBJECT:
495
- if (argc != 2)
493
+ if (argc != 2)
496
494
  rb_raise(rb_eArgError, "wrong number of arguments (%d for 2)", argc);
497
495
  switch (TYPE(argv[0])) {
498
496
  case T_ARRAY:
@@ -502,26 +500,26 @@ VALUE rb_gsl_complex_pow_real(int argc, VALUE *argv, VALUE obj)
502
500
  break;
503
501
  default:
504
502
  if (VECTOR_COMPLEX_P(argv[0])) {
505
- Data_Get_Struct(argv[0], gsl_vector_complex, v);
506
- vnew = gsl_vector_complex_alloc(v->size);
507
- a = NUM2DBL(argv[1]);
508
- for (i = 0; i < v->size; i++) {
509
- c = GSL_COMPLEX_AT(v, i);
510
- tmpc = gsl_complex_pow_real(*c, a);
511
- gsl_vector_complex_set(vnew, i, tmpc);
512
- }
513
- return Data_Wrap_Struct(cgsl_vector_complex, 0, gsl_vector_free, vnew);
503
+ Data_Get_Struct(argv[0], gsl_vector_complex, v);
504
+ vnew = gsl_vector_complex_alloc(v->size);
505
+ a = NUM2DBL(argv[1]);
506
+ for (i = 0; i < v->size; i++) {
507
+ c = GSL_COMPLEX_AT(v, i);
508
+ tmpc = gsl_complex_pow_real(*c, a);
509
+ gsl_vector_complex_set(vnew, i, tmpc);
510
+ }
511
+ return Data_Wrap_Struct(cgsl_vector_complex, 0, gsl_vector_free, vnew);
514
512
  }
515
513
  if (MATRIX_COMPLEX_P(argv[0])) {
516
- Data_Get_Struct(argv[0], gsl_matrix_complex, m);
517
- mnew = gsl_matrix_complex_alloc(m->size1, m->size2);
518
- for (i = 0; i < m->size1; i++) {
519
- for (j = 0; j < m->size2; j++) {
520
- tmpc = gsl_complex_pow_real(gsl_matrix_complex_get(m, i, j), a);
521
- gsl_matrix_complex_set(mnew, i, j, tmpc);
522
- }
523
- }
524
- return Data_Wrap_Struct(cgsl_matrix_complex, 0, gsl_matrix_complex_free, mnew);
514
+ Data_Get_Struct(argv[0], gsl_matrix_complex, m);
515
+ mnew = gsl_matrix_complex_alloc(m->size1, m->size2);
516
+ for (i = 0; i < m->size1; i++) {
517
+ for (j = 0; j < m->size2; j++) {
518
+ tmpc = gsl_complex_pow_real(gsl_matrix_complex_get(m, i, j), a);
519
+ gsl_matrix_complex_set(mnew, i, j, tmpc);
520
+ }
521
+ }
522
+ return Data_Wrap_Struct(cgsl_matrix_complex, 0, gsl_matrix_complex_free, mnew);
525
523
  }
526
524
  CHECK_COMPLEX(argv[0]);
527
525
  Data_Get_Struct(argv[0], gsl_complex, c);
@@ -531,7 +529,7 @@ VALUE rb_gsl_complex_pow_real(int argc, VALUE *argv, VALUE obj)
531
529
  a = NUM2DBL(argv[1]);
532
530
  break;
533
531
  default:
534
- if (argc != 1)
532
+ if (argc != 1)
535
533
  rb_raise(rb_eArgError, "wrong number of arguments (%d for 1)", argc);
536
534
  CHECK_COMPLEX(obj);
537
535
  Need_Float(argv[0]);
@@ -541,7 +539,7 @@ VALUE rb_gsl_complex_pow_real(int argc, VALUE *argv, VALUE obj)
541
539
  }
542
540
  cnew = ALLOC(gsl_complex);
543
541
  *cnew = gsl_complex_pow_real(*c, a);
544
- return Data_Wrap_Struct(cgsl_complex, 0, free, cnew);
542
+ return Data_Wrap_Struct(cgsl_complex, 0, free, cnew);
545
543
  }
546
544
 
547
545
  static VALUE rb_gsl_complex_exp(int argc, VALUE *argv, VALUE obj)
@@ -566,7 +564,7 @@ static VALUE rb_gsl_complex_log_b(int argc, VALUE *argv, VALUE obj)
566
564
  case T_MODULE:
567
565
  case T_CLASS:
568
566
  case T_OBJECT:
569
- if (argc != 2)
567
+ if (argc != 2)
570
568
  rb_raise(rb_eArgError, "wrong number of arguments (%d for 2)", argc);
571
569
  switch (TYPE(argv[1])) {
572
570
  case T_ARRAY:
@@ -592,7 +590,7 @@ static VALUE rb_gsl_complex_log_b(int argc, VALUE *argv, VALUE obj)
592
590
 
593
591
  break;
594
592
  default:
595
- if (argc != 1)
593
+ if (argc != 1)
596
594
  rb_raise(rb_eArgError, "wrong number of arguments (%d for 1)", argc);
597
595
  CHECK_COMPLEX(obj);
598
596
  Data_Get_Struct(obj, gsl_complex, c);
@@ -610,7 +608,7 @@ static VALUE rb_gsl_complex_log_b(int argc, VALUE *argv, VALUE obj)
610
608
  }
611
609
  cnew = ALLOC(gsl_complex);
612
610
  *cnew = gsl_complex_log_b(*c, *a);
613
- return Data_Wrap_Struct(cgsl_complex, 0, free, cnew);
611
+ return Data_Wrap_Struct(cgsl_complex, 0, free, cnew);
614
612
  }
615
613
 
616
614
  static VALUE rb_gsl_complex_sin(int argc, VALUE *argv, VALUE obj)
@@ -658,7 +656,7 @@ static VALUE rb_gsl_complex_arcsin_real(VALUE obj, VALUE xx)
658
656
  tmp = gsl_complex_arcsin_real(x);
659
657
  cnew = ALLOC(gsl_complex);
660
658
  *cnew = tmp;
661
- return Data_Wrap_Struct(cgsl_complex, 0, free, cnew);
659
+ return Data_Wrap_Struct(cgsl_complex, 0, free, cnew);
662
660
  }
663
661
 
664
662
  static VALUE rb_gsl_complex_arccos(int argc, VALUE *argv, VALUE obj)
@@ -675,7 +673,7 @@ static VALUE rb_gsl_complex_arccos_real(VALUE obj, VALUE xx)
675
673
  tmp = gsl_complex_arccos_real(x);
676
674
  cnew = ALLOC(gsl_complex);
677
675
  *cnew = tmp;
678
- return Data_Wrap_Struct(cgsl_complex, 0, free, cnew);
676
+ return Data_Wrap_Struct(cgsl_complex, 0, free, cnew);
679
677
  }
680
678
 
681
679
  static VALUE rb_gsl_complex_arctan(int argc, VALUE *argv, VALUE obj)
@@ -697,7 +695,7 @@ static VALUE rb_gsl_complex_arcsec_real(VALUE obj, VALUE xx)
697
695
  tmp = gsl_complex_arcsec_real(x);
698
696
  cnew = ALLOC(gsl_complex);
699
697
  *cnew = tmp;
700
- return Data_Wrap_Struct(cgsl_complex, 0, free, cnew);
698
+ return Data_Wrap_Struct(cgsl_complex, 0, free, cnew);
701
699
  }
702
700
 
703
701
  static VALUE rb_gsl_complex_arccsc(int argc, VALUE *argv, VALUE obj)
@@ -714,7 +712,7 @@ static VALUE rb_gsl_complex_arccsc_real(VALUE obj, VALUE xx)
714
712
  tmp = gsl_complex_arccsc_real(x);
715
713
  cnew = ALLOC(gsl_complex);
716
714
  *cnew = tmp;
717
- return Data_Wrap_Struct(cgsl_complex, 0, free, cnew);
715
+ return Data_Wrap_Struct(cgsl_complex, 0, free, cnew);
718
716
  }
719
717
 
720
718
  static VALUE rb_gsl_complex_arccot(int argc, VALUE *argv, VALUE obj)
@@ -766,7 +764,7 @@ static VALUE rb_gsl_complex_arccosh_real(VALUE obj, VALUE xx)
766
764
  tmp = gsl_complex_arccosh_real(x);
767
765
  cnew = ALLOC(gsl_complex);
768
766
  *cnew = tmp;
769
- return Data_Wrap_Struct(cgsl_complex, 0, free, cnew);
767
+ return Data_Wrap_Struct(cgsl_complex, 0, free, cnew);
770
768
  }
771
769
 
772
770
  static VALUE rb_gsl_complex_arccosh(int argc, VALUE *argv, VALUE obj)
@@ -788,7 +786,7 @@ static VALUE rb_gsl_complex_arctanh_real(VALUE obj, VALUE xx)
788
786
  tmp = gsl_complex_arctanh_real(x);
789
787
  cnew = ALLOC(gsl_complex);
790
788
  *cnew = tmp;
791
- return Data_Wrap_Struct(cgsl_complex, 0, free, cnew);
789
+ return Data_Wrap_Struct(cgsl_complex, 0, free, cnew);
792
790
  }
793
791
 
794
792
  static VALUE rb_gsl_complex_arcsech(int argc, VALUE *argv, VALUE obj)
@@ -807,10 +805,10 @@ static VALUE rb_gsl_complex_arccoth(int argc, VALUE *argv, VALUE obj)
807
805
  }
808
806
 
809
807
  int rbgsl_complex_equal(const gsl_complex *z1, const gsl_complex *z2,
810
- double eps)
808
+ double eps)
811
809
  {
812
810
  if (gsl_fcmp(z1->dat[0], z2->dat[0], eps) != 0) return 0;
813
- if (gsl_fcmp(z1->dat[1], z2->dat[1], eps) != 0) return 0;
811
+ if (gsl_fcmp(z1->dat[1], z2->dat[1], eps) != 0) return 0;
814
812
  return 1;
815
813
  }
816
814
 
@@ -825,11 +823,11 @@ static VALUE rb_gsl_complex_equal(int argc, VALUE *argv, VALUE obj)
825
823
  {
826
824
  gsl_complex *z1 = NULL, *z2 = NULL;
827
825
  double eps = 1e-8;
828
-
826
+
829
827
  switch (argc) {
830
828
  case 1:
831
829
  CHECK_COMPLEX(argv[0]);
832
- Data_Get_Struct(argv[0], gsl_complex, z2);
830
+ Data_Get_Struct(argv[0], gsl_complex, z2);
833
831
  break;
834
832
  case 2:
835
833
  CHECK_COMPLEX(argv[0]);