gsl 1.15.3 → 1.16.0.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (446) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +12 -0
  3. data/.travis.yml +24 -0
  4. data/AUTHORS +10 -2
  5. data/COPYING +341 -339
  6. data/ChangeLog +612 -554
  7. data/Gemfile +4 -0
  8. data/README.md +77 -0
  9. data/Rakefile +14 -93
  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/{alf.c → gsl_native/alf.c} +10 -10
  89. data/ext/{array.c → gsl_native/array.c} +70 -159
  90. data/ext/{array_complex.c → gsl_native/array_complex.c} +63 -66
  91. data/ext/{blas.c → gsl_native/blas.c} +2 -3
  92. data/ext/{blas1.c → gsl_native/blas1.c} +35 -36
  93. data/ext/{blas2.c → gsl_native/blas2.c} +57 -62
  94. data/ext/{blas3.c → gsl_native/blas3.c} +57 -58
  95. data/ext/{block.c → gsl_native/block.c} +14 -18
  96. data/ext/{block_source.c → gsl_native/block_source.h} +110 -112
  97. data/ext/gsl_native/bspline.c +122 -0
  98. data/ext/{bundle.c → gsl_native/bundle.c} +0 -0
  99. data/ext/{cdf.c → gsl_native/cdf.c} +79 -93
  100. data/ext/{cheb.c → gsl_native/cheb.c} +78 -89
  101. data/ext/{combination.c → gsl_native/combination.c} +11 -19
  102. data/ext/{common.c → gsl_native/common.c} +9 -41
  103. data/ext/{complex.c → gsl_native/complex.c} +116 -118
  104. data/ext/gsl_native/const.c +331 -0
  105. data/ext/{const_additional.c → gsl_native/const_additional.c} +13 -34
  106. data/ext/gsl_native/cqp.c +283 -0
  107. data/ext/{deriv.c → gsl_native/deriv.c} +25 -33
  108. data/ext/{dht.c → gsl_native/dht.c} +23 -31
  109. data/ext/{diff.c → gsl_native/diff.c} +26 -28
  110. data/ext/{dirac.c → gsl_native/dirac.c} +45 -46
  111. data/ext/{eigen.c → gsl_native/eigen.c} +1044 -1095
  112. data/ext/{error.c → gsl_native/error.c} +18 -18
  113. data/ext/gsl_native/extconf.rb +118 -0
  114. data/ext/{fft.c → gsl_native/fft.c} +197 -204
  115. data/ext/{fit.c → gsl_native/fit.c} +17 -18
  116. data/ext/gsl_native/fresnel.c +312 -0
  117. data/ext/{function.c → gsl_native/function.c} +37 -43
  118. data/ext/{geometry.c → gsl_native/geometry.c} +16 -16
  119. data/ext/{graph.c → gsl_native/graph.c} +39 -89
  120. data/ext/{gsl.c → gsl_native/gsl.c} +12 -33
  121. data/ext/{gsl_narray.c → gsl_native/gsl_narray.c} +20 -30
  122. data/ext/{histogram.c → gsl_native/histogram.c} +133 -160
  123. data/ext/{histogram2d.c → gsl_native/histogram2d.c} +78 -104
  124. data/ext/{histogram3d.c → gsl_native/histogram3d.c} +76 -76
  125. data/ext/{histogram3d_source.c → gsl_native/histogram3d_source.c} +196 -197
  126. data/ext/{histogram_find.c → gsl_native/histogram_find.c} +32 -34
  127. data/ext/{histogram_oper.c → gsl_native/histogram_oper.c} +43 -52
  128. data/ext/{ieee.c → gsl_native/ieee.c} +9 -21
  129. data/{include → ext/gsl_native/include}/rb_gsl.h +4 -26
  130. data/{include → ext/gsl_native/include}/rb_gsl_array.h +15 -39
  131. data/{include → ext/gsl_native/include}/rb_gsl_cheb.h +0 -2
  132. data/{include → ext/gsl_native/include}/rb_gsl_common.h +61 -61
  133. data/{include → ext/gsl_native/include}/rb_gsl_complex.h +1 -1
  134. data/{include → ext/gsl_native/include}/rb_gsl_const.h +0 -6
  135. data/ext/gsl_native/include/rb_gsl_dirac.h +6 -0
  136. data/{include → ext/gsl_native/include}/rb_gsl_eigen.h +1 -1
  137. data/{include → ext/gsl_native/include}/rb_gsl_fft.h +0 -13
  138. data/{include → ext/gsl_native/include}/rb_gsl_fit.h +0 -2
  139. data/{include → ext/gsl_native/include}/rb_gsl_function.h +0 -4
  140. data/{include → ext/gsl_native/include}/rb_gsl_graph.h +2 -4
  141. data/{include → ext/gsl_native/include}/rb_gsl_histogram.h +8 -8
  142. data/{include → ext/gsl_native/include}/rb_gsl_histogram3d.h +50 -50
  143. data/{include → ext/gsl_native/include}/rb_gsl_integration.h +1 -1
  144. data/{include → ext/gsl_native/include}/rb_gsl_interp.h +0 -5
  145. data/{include → ext/gsl_native/include}/rb_gsl_linalg.h +2 -6
  146. data/{include → ext/gsl_native/include}/rb_gsl_math.h +0 -6
  147. data/{include → ext/gsl_native/include}/rb_gsl_odeiv.h +0 -3
  148. data/{include → ext/gsl_native/include}/rb_gsl_poly.h +3 -7
  149. data/{include → ext/gsl_native/include}/rb_gsl_rational.h +1 -8
  150. data/{include → ext/gsl_native/include}/rb_gsl_rng.h +0 -1
  151. data/{include → ext/gsl_native/include}/rb_gsl_root.h +1 -1
  152. data/{include → ext/gsl_native/include}/rb_gsl_sf.h +39 -48
  153. data/{include → ext/gsl_native/include}/rb_gsl_statistics.h +1 -1
  154. data/{include → ext/gsl_native/include}/rb_gsl_tensor.h +0 -2
  155. data/{include → ext/gsl_native/include}/rb_gsl_with_narray.h +3 -1
  156. data/{include → ext/gsl_native/include}/templates_off.h +0 -0
  157. data/{include → ext/gsl_native/include}/templates_on.h +1 -1
  158. data/ext/{integration.c → gsl_native/integration.c} +164 -189
  159. data/ext/{interp.c → gsl_native/interp.c} +25 -38
  160. data/ext/gsl_native/jacobi.c +733 -0
  161. data/ext/{linalg.c → gsl_native/linalg.c} +462 -589
  162. data/ext/{linalg_complex.c → gsl_native/linalg_complex.c} +93 -106
  163. data/ext/{math.c → gsl_native/math.c} +48 -67
  164. data/ext/{matrix.c → gsl_native/matrix.c} +13 -16
  165. data/ext/{matrix_complex.c → gsl_native/matrix_complex.c} +119 -123
  166. data/ext/{matrix_double.c → gsl_native/matrix_double.c} +79 -82
  167. data/ext/{matrix_int.c → gsl_native/matrix_int.c} +53 -54
  168. data/ext/{matrix_source.c → gsl_native/matrix_source.h} +292 -318
  169. data/ext/{min.c → gsl_native/min.c} +45 -76
  170. data/ext/{monte.c → gsl_native/monte.c} +50 -64
  171. data/ext/{multifit.c → gsl_native/multifit.c} +142 -151
  172. data/ext/{multimin.c → gsl_native/multimin.c} +64 -92
  173. data/ext/{multimin_fsdf.c → gsl_native/multimin_fsdf.c} +16 -16
  174. data/ext/{multiroots.c → gsl_native/multiroots.c} +73 -76
  175. data/ext/{multiset.c → gsl_native/multiset.c} +4 -8
  176. data/ext/{ndlinear.c → gsl_native/ndlinear.c} +320 -321
  177. data/ext/{nmf.c → gsl_native/nmf.c} +11 -11
  178. data/ext/{nmf_wrap.c → gsl_native/nmf_wrap.c} +1 -1
  179. data/ext/{ntuple.c → gsl_native/ntuple.c} +23 -23
  180. data/ext/{odeiv.c → gsl_native/odeiv.c} +101 -116
  181. data/ext/gsl_native/ool.c +879 -0
  182. data/ext/{permutation.c → gsl_native/permutation.c} +39 -37
  183. data/ext/{poly.c → gsl_native/poly.c} +10 -13
  184. data/ext/{poly2.c → gsl_native/poly2.c} +16 -16
  185. data/ext/{poly_source.c → gsl_native/poly_source.h} +249 -293
  186. data/ext/{qrng.c → gsl_native/qrng.c} +9 -20
  187. data/ext/{randist.c → gsl_native/randist.c} +222 -247
  188. data/ext/{rational.c → gsl_native/rational.c} +12 -12
  189. data/ext/{rng.c → gsl_native/rng.c} +30 -47
  190. data/ext/{root.c → gsl_native/root.c} +47 -48
  191. data/ext/{sf.c → gsl_native/sf.c} +196 -244
  192. data/ext/{sf_airy.c → gsl_native/sf_airy.c} +2 -2
  193. data/ext/{sf_bessel.c → gsl_native/sf_bessel.c} +7 -7
  194. data/ext/{sf_clausen.c → gsl_native/sf_clausen.c} +1 -1
  195. data/ext/{sf_coulomb.c → gsl_native/sf_coulomb.c} +40 -40
  196. data/ext/{sf_coupling.c → gsl_native/sf_coupling.c} +30 -30
  197. data/ext/{sf_dawson.c → gsl_native/sf_dawson.c} +1 -1
  198. data/ext/{sf_debye.c → gsl_native/sf_debye.c} +1 -10
  199. data/ext/{sf_dilog.c → gsl_native/sf_dilog.c} +1 -1
  200. data/ext/{sf_elementary.c → gsl_native/sf_elementary.c} +3 -3
  201. data/ext/{sf_ellint.c → gsl_native/sf_ellint.c} +43 -43
  202. data/ext/{sf_elljac.c → gsl_native/sf_elljac.c} +3 -3
  203. data/ext/{sf_erfc.c → gsl_native/sf_erfc.c} +1 -5
  204. data/ext/{sf_exp.c → gsl_native/sf_exp.c} +3 -3
  205. data/ext/{sf_expint.c → gsl_native/sf_expint.c} +2 -12
  206. data/ext/{sf_fermi_dirac.c → gsl_native/sf_fermi_dirac.c} +1 -1
  207. data/ext/{sf_gamma.c → gsl_native/sf_gamma.c} +2 -6
  208. data/ext/{sf_gegenbauer.c → gsl_native/sf_gegenbauer.c} +1 -1
  209. data/ext/{sf_hyperg.c → gsl_native/sf_hyperg.c} +1 -1
  210. data/ext/{sf_laguerre.c → gsl_native/sf_laguerre.c} +4 -4
  211. data/ext/{sf_lambert.c → gsl_native/sf_lambert.c} +1 -1
  212. data/ext/{sf_legendre.c → gsl_native/sf_legendre.c} +1 -1
  213. data/ext/{sf_log.c → gsl_native/sf_log.c} +4 -4
  214. data/ext/gsl_native/sf_mathieu.c +235 -0
  215. data/ext/{sf_power.c → gsl_native/sf_power.c} +1 -1
  216. data/ext/{sf_psi.c → gsl_native/sf_psi.c} +3 -12
  217. data/ext/{sf_synchrotron.c → gsl_native/sf_synchrotron.c} +1 -1
  218. data/ext/{sf_transport.c → gsl_native/sf_transport.c} +1 -1
  219. data/ext/{sf_trigonometric.c → gsl_native/sf_trigonometric.c} +4 -4
  220. data/ext/{sf_zeta.c → gsl_native/sf_zeta.c} +1 -5
  221. data/ext/{signal.c → gsl_native/signal.c} +63 -68
  222. data/ext/{siman.c → gsl_native/siman.c} +45 -49
  223. data/ext/{sort.c → gsl_native/sort.c} +6 -7
  224. data/ext/{spline.c → gsl_native/spline.c} +28 -46
  225. data/ext/{stats.c → gsl_native/stats.c} +105 -118
  226. data/ext/{sum.c → gsl_native/sum.c} +34 -34
  227. data/ext/{tamu_anova.c → gsl_native/tamu_anova.c} +1 -1
  228. data/ext/{tensor.c → gsl_native/tensor.c} +8 -11
  229. data/ext/{tensor_source.c → gsl_native/tensor_source.h} +147 -148
  230. data/ext/{vector.c → gsl_native/vector.c} +11 -14
  231. data/ext/{vector_complex.c → gsl_native/vector_complex.c} +179 -184
  232. data/ext/{vector_double.c → gsl_native/vector_double.c} +178 -183
  233. data/ext/{vector_int.c → gsl_native/vector_int.c} +27 -29
  234. data/ext/{vector_source.c → gsl_native/vector_source.h} +428 -443
  235. data/ext/{wavelet.c → gsl_native/wavelet.c} +224 -246
  236. data/gsl.gemspec +29 -0
  237. data/lib/gsl.rb +8 -3
  238. data/lib/gsl/gnuplot.rb +3 -3
  239. data/lib/gsl/oper.rb +35 -60
  240. data/lib/gsl/version.rb +3 -0
  241. data/lib/rbgsl.rb +1 -3
  242. data/rdoc/alf.rdoc +5 -5
  243. data/rdoc/blas.rdoc +9 -9
  244. data/rdoc/bspline.rdoc +17 -17
  245. data/rdoc/changes.rdoc +4 -9
  246. data/rdoc/cheb.rdoc +25 -25
  247. data/rdoc/cholesky_complex.rdoc +21 -21
  248. data/rdoc/combi.rdoc +37 -37
  249. data/rdoc/complex.rdoc +22 -22
  250. data/rdoc/const.rdoc +47 -47
  251. data/rdoc/dht.rdoc +49 -49
  252. data/rdoc/diff.rdoc +42 -42
  253. data/rdoc/ehandling.rdoc +6 -6
  254. data/rdoc/eigen.rdoc +153 -153
  255. data/rdoc/fft.rdoc +146 -146
  256. data/rdoc/fit.rdoc +109 -109
  257. data/rdoc/function.rdoc +11 -11
  258. data/rdoc/graph.rdoc +17 -17
  259. data/rdoc/hist.rdoc +103 -103
  260. data/rdoc/hist2d.rdoc +42 -42
  261. data/rdoc/hist3d.rdoc +9 -9
  262. data/rdoc/integration.rdoc +110 -110
  263. data/rdoc/interp.rdoc +71 -71
  264. data/rdoc/intro.rdoc +8 -8
  265. data/rdoc/linalg.rdoc +188 -188
  266. data/rdoc/linalg_complex.rdoc +1 -1
  267. data/rdoc/math.rdoc +58 -58
  268. data/rdoc/matrix.rdoc +275 -275
  269. data/rdoc/min.rdoc +57 -57
  270. data/rdoc/monte.rdoc +22 -22
  271. data/rdoc/multimin.rdoc +95 -95
  272. data/rdoc/multiroot.rdoc +80 -80
  273. data/rdoc/narray.rdoc +32 -32
  274. data/rdoc/ndlinear.rdoc +54 -54
  275. data/rdoc/nonlinearfit.rdoc +100 -100
  276. data/rdoc/ntuple.rdoc +31 -31
  277. data/rdoc/odeiv.rdoc +88 -88
  278. data/rdoc/perm.rdoc +90 -90
  279. data/rdoc/poly.rdoc +66 -66
  280. data/rdoc/qrng.rdoc +21 -21
  281. data/rdoc/randist.rdoc +82 -82
  282. data/rdoc/ref.rdoc +57 -57
  283. data/rdoc/rng.rdoc +85 -85
  284. data/rdoc/roots.rdoc +57 -57
  285. data/rdoc/sf.rdoc +428 -428
  286. data/rdoc/siman.rdoc +19 -19
  287. data/rdoc/sort.rdoc +30 -30
  288. data/rdoc/start.rdoc +8 -8
  289. data/rdoc/stats.rdoc +52 -52
  290. data/rdoc/sum.rdoc +12 -12
  291. data/rdoc/tensor.rdoc +31 -31
  292. data/rdoc/tut.rdoc +1 -1
  293. data/rdoc/use.rdoc +39 -39
  294. data/rdoc/vector.rdoc +188 -188
  295. data/rdoc/vector_complex.rdoc +24 -24
  296. data/rdoc/wavelet.rdoc +46 -46
  297. data/test/gsl/blas_test.rb +79 -0
  298. data/test/gsl/bspline_test.rb +63 -0
  299. data/test/gsl/cdf_test.rb +1512 -0
  300. data/test/gsl/cheb_test.rb +80 -0
  301. data/test/gsl/combination_test.rb +100 -0
  302. data/test/gsl/complex_test.rb +20 -0
  303. data/test/gsl/const_test.rb +29 -0
  304. data/test/gsl/deriv_test.rb +62 -0
  305. data/test/gsl/dht_test.rb +79 -0
  306. data/test/gsl/diff_test.rb +53 -0
  307. data/test/gsl/eigen_test.rb +563 -0
  308. data/test/gsl/err_test.rb +23 -0
  309. data/test/gsl/fit_test.rb +101 -0
  310. data/test/gsl/histo_test.rb +14 -0
  311. data/test/gsl/index_test.rb +61 -0
  312. data/test/gsl/integration_test.rb +274 -0
  313. data/test/gsl/interp_test.rb +27 -0
  314. data/test/gsl/linalg_test.rb +463 -0
  315. data/test/gsl/matrix_nmf_test.rb +37 -0
  316. data/test/gsl/matrix_test.rb +98 -0
  317. data/test/gsl/min_test.rb +89 -0
  318. data/test/gsl/monte_test.rb +77 -0
  319. data/test/gsl/multifit_test.rb +753 -0
  320. data/test/gsl/multimin_test.rb +157 -0
  321. data/test/gsl/multiroot_test.rb +135 -0
  322. data/test/gsl/multiset_test.rb +52 -0
  323. data/test/gsl/odeiv_test.rb +275 -0
  324. data/test/gsl/oper_test.rb +98 -0
  325. data/test/gsl/poly_test.rb +338 -0
  326. data/test/gsl/qrng_test.rb +94 -0
  327. data/test/gsl/quartic_test.rb +28 -0
  328. data/test/gsl/randist_test.rb +122 -0
  329. data/test/gsl/rng_test.rb +303 -0
  330. data/test/gsl/roots_test.rb +78 -0
  331. data/test/gsl/sf_test.rb +2079 -0
  332. data/test/gsl/stats_test.rb +122 -0
  333. data/test/gsl/sum_test.rb +69 -0
  334. data/test/gsl/tensor_test.rb +396 -0
  335. data/test/gsl/vector_test.rb +223 -0
  336. data/test/gsl/wavelet_test.rb +130 -0
  337. data/test/gsl_test.rb +321 -0
  338. data/test/test_helper.rb +42 -0
  339. data/uncrustify.cfg +1693 -0
  340. metadata +337 -378
  341. data/README +0 -32
  342. data/VERSION +0 -1
  343. data/ext/bspline.c +0 -130
  344. data/ext/const.c +0 -673
  345. data/ext/cqp.c +0 -283
  346. data/ext/extconf.rb +0 -295
  347. data/ext/fcmp.c +0 -66
  348. data/ext/fresnel.c +0 -312
  349. data/ext/jacobi.c +0 -739
  350. data/ext/ool.c +0 -879
  351. data/ext/oper_complex_source.c +0 -253
  352. data/ext/sf_mathieu.c +0 -238
  353. data/include/rb_gsl_config.h +0 -62
  354. data/include/rb_gsl_dirac.h +0 -13
  355. data/rdoc/index.rdoc +0 -62
  356. data/rdoc/rngextra.rdoc +0 -11
  357. data/rdoc/screenshot.rdoc +0 -40
  358. data/setup.rb +0 -1585
  359. data/tests/blas/amax.rb +0 -14
  360. data/tests/blas/asum.rb +0 -16
  361. data/tests/blas/axpy.rb +0 -25
  362. data/tests/blas/copy.rb +0 -23
  363. data/tests/blas/dot.rb +0 -23
  364. data/tests/bspline.rb +0 -53
  365. data/tests/cdf.rb +0 -1388
  366. data/tests/cheb.rb +0 -112
  367. data/tests/combination.rb +0 -123
  368. data/tests/complex.rb +0 -17
  369. data/tests/const.rb +0 -24
  370. data/tests/deriv.rb +0 -85
  371. data/tests/dht/dht1.rb +0 -17
  372. data/tests/dht/dht2.rb +0 -23
  373. data/tests/dht/dht3.rb +0 -23
  374. data/tests/dht/dht4.rb +0 -23
  375. data/tests/diff.rb +0 -78
  376. data/tests/eigen/eigen.rb +0 -220
  377. data/tests/eigen/gen.rb +0 -105
  378. data/tests/eigen/genherm.rb +0 -66
  379. data/tests/eigen/gensymm.rb +0 -68
  380. data/tests/eigen/nonsymm.rb +0 -53
  381. data/tests/eigen/nonsymmv.rb +0 -53
  382. data/tests/eigen/symm-herm.rb +0 -74
  383. data/tests/err.rb +0 -58
  384. data/tests/fit.rb +0 -124
  385. data/tests/gsl_test.rb +0 -118
  386. data/tests/gsl_test2.rb +0 -110
  387. data/tests/histo.rb +0 -12
  388. data/tests/integration/integration1.rb +0 -72
  389. data/tests/integration/integration2.rb +0 -71
  390. data/tests/integration/integration3.rb +0 -71
  391. data/tests/integration/integration4.rb +0 -71
  392. data/tests/interp.rb +0 -45
  393. data/tests/linalg/HH.rb +0 -64
  394. data/tests/linalg/LU.rb +0 -47
  395. data/tests/linalg/QR.rb +0 -77
  396. data/tests/linalg/SV.rb +0 -24
  397. data/tests/linalg/TDN.rb +0 -116
  398. data/tests/linalg/TDS.rb +0 -122
  399. data/tests/linalg/bidiag.rb +0 -73
  400. data/tests/linalg/cholesky.rb +0 -20
  401. data/tests/linalg/linalg.rb +0 -158
  402. data/tests/matrix/matrix_complex_test.rb +0 -36
  403. data/tests/matrix/matrix_nmf_test.rb +0 -39
  404. data/tests/matrix/matrix_test.rb +0 -48
  405. data/tests/min.rb +0 -99
  406. data/tests/monte/miser.rb +0 -31
  407. data/tests/monte/vegas.rb +0 -45
  408. data/tests/multifit/test_2dgauss.rb +0 -112
  409. data/tests/multifit/test_brown.rb +0 -90
  410. data/tests/multifit/test_enso.rb +0 -246
  411. data/tests/multifit/test_filip.rb +0 -155
  412. data/tests/multifit/test_gauss.rb +0 -97
  413. data/tests/multifit/test_longley.rb +0 -110
  414. data/tests/multifit/test_multifit.rb +0 -52
  415. data/tests/multimin.rb +0 -139
  416. data/tests/multiroot.rb +0 -131
  417. data/tests/multiset.rb +0 -52
  418. data/tests/narray/blas_dnrm2.rb +0 -20
  419. data/tests/odeiv.rb +0 -353
  420. data/tests/poly/poly.rb +0 -290
  421. data/tests/poly/special.rb +0 -65
  422. data/tests/qrng.rb +0 -131
  423. data/tests/quartic.rb +0 -29
  424. data/tests/randist.rb +0 -134
  425. data/tests/rng.rb +0 -305
  426. data/tests/roots.rb +0 -76
  427. data/tests/run-test.sh +0 -17
  428. data/tests/sf/gsl_test_sf.rb +0 -249
  429. data/tests/sf/test_airy.rb +0 -83
  430. data/tests/sf/test_bessel.rb +0 -306
  431. data/tests/sf/test_coulomb.rb +0 -17
  432. data/tests/sf/test_dilog.rb +0 -25
  433. data/tests/sf/test_gamma.rb +0 -209
  434. data/tests/sf/test_hyperg.rb +0 -356
  435. data/tests/sf/test_legendre.rb +0 -227
  436. data/tests/sf/test_mathieu.rb +0 -59
  437. data/tests/sf/test_mode.rb +0 -19
  438. data/tests/sf/test_sf.rb +0 -839
  439. data/tests/stats.rb +0 -174
  440. data/tests/stats_mt.rb +0 -16
  441. data/tests/sum.rb +0 -98
  442. data/tests/sys.rb +0 -323
  443. data/tests/tensor.rb +0 -419
  444. data/tests/vector/vector_complex_test.rb +0 -101
  445. data/tests/vector/vector_test.rb +0 -141
  446. data/tests/wavelet.rb +0 -142
data/README DELETED
@@ -1,32 +0,0 @@
1
- =begin
2
- == Description
3
- Ruby/GSL, a ruby interface to GSL (GNU Scientific library)
4
-
5
- == Installation
6
- (0) Make sure the command "gsl-config" is in search path.
7
- (1) % ruby setup.rb config
8
- (2) % ruby setup.rb setup
9
- (3) % ruby setup.rb install (as root)
10
-
11
- See also html/index.html.
12
-
13
- == Reference
14
-
15
- See ((<URL:http://rb-gsl.rubyforge.org/ref.html>)).
16
-
17
- == Licence
18
- Ruby/GSL is free software: you can redistribute it and/or modify it
19
- under the terms of the GNU General Public License.
20
- This library is distributed in the hope that it will be useful, but
21
- WITHOUT ANY WARRANTY.
22
-
23
- == Bug Report
24
- Any bug reports are welcome.
25
- If you encounter bugs in Ruby/GSL, please e-mail to me, or
26
- submit reports from http://rubyforge.org/projects/rb-gsl/.
27
-
28
- == Author
29
- Yoshiki Tsunesada
30
- y-tsunesada at mm dot em-net dot ne dot jp
31
-
32
- =end
data/VERSION DELETED
@@ -1 +0,0 @@
1
- 1.15.3
@@ -1,130 +0,0 @@
1
-
2
- #include "rb_gsl.h"
3
- #ifdef GSL_1_9_LATER
4
- #include "gsl/gsl_bspline.h"
5
-
6
- static VALUE cBSWS;
7
-
8
- static VALUE rb_gsl_bspline_alloc(VALUE klass, VALUE k, VALUE n)
9
- {
10
- gsl_bspline_workspace *w;
11
- w = gsl_bspline_alloc(FIX2INT(k), FIX2INT(n));
12
- return Data_Wrap_Struct(klass, 0, gsl_bspline_free, w);
13
- }
14
-
15
- static VALUE rb_gsl_bspline_ncoeffs(VALUE obj)
16
- {
17
- gsl_bspline_workspace *w;
18
- Data_Get_Struct(obj, gsl_bspline_workspace, w);
19
- return INT2FIX((int)gsl_bspline_ncoeffs(w));
20
- }
21
- static VALUE rb_gsl_bspline_order(VALUE obj)
22
- {
23
- gsl_bspline_workspace *w;
24
- Data_Get_Struct(obj, gsl_bspline_workspace, w);
25
- return INT2FIX((int)gsl_bspline_order(w));
26
- }
27
- static VALUE rb_gsl_bspline_nbreak(VALUE obj)
28
- {
29
- gsl_bspline_workspace *w;
30
- Data_Get_Struct(obj, gsl_bspline_workspace, w);
31
- return INT2FIX((int)gsl_bspline_nbreak(w));
32
- }
33
- static VALUE rb_gsl_bspline_breakpoint(VALUE obj, VALUE i)
34
- {
35
- gsl_bspline_workspace *w;
36
- Data_Get_Struct(obj, gsl_bspline_workspace, w);
37
- return rb_float_new(gsl_bspline_breakpoint(FIX2INT(i), w));
38
- }
39
- static VALUE rb_gsl_bspline_knots(VALUE obj, VALUE b)
40
- {
41
- gsl_bspline_workspace *w;
42
- gsl_vector *bpts;
43
- CHECK_VECTOR(b);
44
- Data_Get_Struct(obj, gsl_bspline_workspace, w);
45
- Data_Get_Struct(b, gsl_vector, bpts);
46
- gsl_bspline_knots(bpts, w);
47
- return Data_Wrap_Struct(cgsl_vector_view_ro, 0, NULL, w->knots);
48
- }
49
- static VALUE rb_gsl_bspline_knots_uniform(int argc, VALUE *argv, VALUE obj)
50
- {
51
- gsl_bspline_workspace *w;
52
- int argc2;
53
- switch (TYPE(obj)) {
54
- case T_MODULE:
55
- case T_CLASS:
56
- case T_OBJECT:
57
- if (!rb_obj_is_kind_of(argv[argc-1], cBSWS)) {
58
- rb_raise(rb_eTypeError, "Wrong argument type %s (GSL::BSpline expected)",
59
- rb_class2name(CLASS_OF(argv[argc-1])));
60
- }
61
- Data_Get_Struct(argv[argc-1], gsl_bspline_workspace, w);
62
- argc2 = argc-1;
63
- break;
64
- default:
65
- Data_Get_Struct(obj, gsl_bspline_workspace, w);
66
- argc2 = argc;
67
- }
68
- if (argc2 != 2) rb_raise(rb_eArgError, "Wrong number of arguments.");
69
- gsl_bspline_knots_uniform(NUM2DBL(argv[0]), NUM2DBL(argv[1]), w);
70
- return Data_Wrap_Struct(cgsl_vector_view_ro, 0, NULL, w->knots);
71
- }
72
- static VALUE rb_gsl_bspline_eval(int argc, VALUE *argv, VALUE obj)
73
- {
74
- gsl_bspline_workspace *w;
75
- double x;
76
- gsl_vector *B;
77
- VALUE vB;
78
-
79
- Data_Get_Struct(obj, gsl_bspline_workspace, w);
80
-
81
- switch (argc) {
82
- case 2:
83
- CHECK_VECTOR(argv[1]);
84
- Data_Get_Struct(argv[1], gsl_vector, B);
85
- vB = argv[1];
86
- x = NUM2DBL(argv[0]);
87
- break;
88
- case 1:
89
- x = NUM2DBL(argv[0]);
90
- B = gsl_vector_alloc(w->nbreak+w->k-2);
91
- vB = Data_Wrap_Struct(cgsl_vector, 0, gsl_vector_free, B);
92
- break;
93
- default:
94
- rb_raise(rb_eArgError, "Wrong number of arguments (%d for 1 or 2)", argc);
95
- }
96
-
97
- gsl_bspline_eval(x, B, w);
98
-
99
- return vB;
100
- }
101
- #ifdef GSL_1_13_LATER
102
- static VALUE rb_gsl_bspline_greville_abscissa(VALUE obj, VALUE i)
103
- {
104
- gsl_bspline_workspace *w;
105
- Data_Get_Struct(obj, gsl_bspline_workspace, w);
106
- return rb_float_new(gsl_bspline_greville_abscissa(i, w));
107
- }
108
- #endif
109
-
110
- void Init_bspline(VALUE module)
111
- {
112
- cBSWS = rb_define_class_under(module, "BSpline", cGSL_Object);
113
-
114
- rb_define_singleton_method(cBSWS, "alloc", rb_gsl_bspline_alloc, 2);
115
-
116
- rb_define_method(cBSWS, "ncoeffs", rb_gsl_bspline_ncoeffs, 0);
117
- rb_define_method(cBSWS, "order", rb_gsl_bspline_order, 0);
118
- rb_define_method(cBSWS, "nbreak", rb_gsl_bspline_nbreak, 0);
119
- rb_define_method(cBSWS, "breakpoint", rb_gsl_bspline_breakpoint, 1);
120
- rb_define_method(cBSWS, "knots", rb_gsl_bspline_knots, 1);
121
- rb_define_method(cBSWS, "knots_uniform", rb_gsl_bspline_knots_uniform, -1);
122
- rb_define_singleton_method(cBSWS, "knots_uniform", rb_gsl_bspline_knots_uniform, -1);
123
- rb_define_method(cBSWS, "eval", rb_gsl_bspline_eval, -1);
124
-
125
- #ifdef GSL_1_13_LATER
126
- rb_define_method(cBSWS, "greville_abscissa", rb_gsl_bspline_greville_abscissa, 1);
127
- #endif
128
-
129
- }
130
- #endif
@@ -1,673 +0,0 @@
1
- /*
2
- const.c
3
- Ruby/GSL: Ruby extension library for GSL (GNU Scientific Library)
4
- (C) Copyright 2001-2006 by Yoshiki Tsunesada
5
-
6
- Ruby/GSL is free software: you can redistribute it and/or modify it
7
- under the terms of the GNU General Public License.
8
- This library is distributed in the hope that it will be useful, but
9
- WITHOUT ANY WARRANTY.
10
- */
11
-
12
- #include "rb_gsl_config.h"
13
- #include "rb_gsl_const.h"
14
-
15
- static void rb_gsl_const_mks(VALUE module);
16
- static void rb_gsl_const_cgs(VALUE module);
17
- static void rb_gsl_const_num(VALUE module);
18
- void Init_gsl_const_additional(VALUE mmks, VALUE mcgs, VALUE mnum);
19
-
20
- #ifdef GSL_CONST_OLD
21
- static void rb_gsl_const_mks(VALUE module)
22
- {
23
- rb_define_const(module, "SPEED_OF_LIGHT",
24
- rb_float_new(GSL_CONST_MKS_SPEED_OF_LIGHT));
25
- rb_define_const(module, "GRAVITATIONAL_CONSTANT",
26
- rb_float_new(GSL_CONST_MKS_GRAVITATIONAL_CONSTANT));
27
- rb_define_const(module, "PLANCKS_CONSTANT_H",
28
- rb_float_new(GSL_CONST_MKS_PLANCKS_CONSTANT_H));
29
- rb_define_const(module, "PLANCKS_CONSTANT_HBAR",
30
- rb_float_new(GSL_CONST_MKS_PLANCKS_CONSTANT_HBAR));
31
- rb_define_const(module, "VACUUM_PERMEABILITY",
32
- rb_float_new(GSL_CONST_MKS_VACUUM_PERMEABILITY));
33
- rb_define_const(module, "ASTRONOMICAL_UNIT",
34
- rb_float_new(GSL_CONST_MKS_ASTRONOMICAL_UNIT));
35
- rb_define_const(module, "LIGHT_YEAR", rb_float_new(GSL_CONST_MKS_LIGHT_YEAR));
36
- rb_define_const(module, "PARSEC", rb_float_new(GSL_CONST_MKS_PARSEC));
37
- rb_define_const(module, "GRAV_ACCEL", rb_float_new(GSL_CONST_MKS_GRAV_ACCEL));
38
- rb_define_const(module, "ELECTRON_VOLT",
39
- rb_float_new(GSL_CONST_MKS_ELECTRON_VOLT));
40
- rb_define_const(module, "MASS_ELECTRON",
41
- rb_float_new(GSL_CONST_MKS_MASS_ELECTRON));
42
- rb_define_const(module, "MASS_MUON", rb_float_new(GSL_CONST_MKS_MASS_MUON));
43
- rb_define_const(module, "MASS_PROTON", rb_float_new(GSL_CONST_MKS_MASS_PROTON));
44
- rb_define_const(module, "MASS_NEUTRON", rb_float_new(GSL_CONST_MKS_MASS_NEUTRON));
45
- rb_define_const(module, "RYDBERG", rb_float_new(GSL_CONST_MKS_RYDBERG));
46
- rb_define_const(module, "BOLTZMANN", rb_float_new(GSL_CONST_MKS_BOLTZMANN));
47
- rb_define_const(module, "MOLAR_GAS", rb_float_new(GSL_CONST_MKS_MOLAR_GAS));
48
- rb_define_const(module, "BOHR_MAGNETON",
49
- rb_float_new(GSL_CONST_MKS_BOHR_MAGNETON));
50
- rb_define_const(module, "NUCLEAR_MAGNETON",
51
- rb_float_new(GSL_CONST_MKS_NUCLEAR_MAGNETON));
52
- rb_define_const(module, "ELECTRON_MAGNETIC_MOMENT",
53
- rb_float_new(GSL_CONST_MKS_ELECTRON_MAGNETIC_MOMENT));
54
- rb_define_const(module, "PROTON_MAGNETIC_MOMENT",
55
- rb_float_new(GSL_CONST_MKS_PROTON_MAGNETIC_MOMENT));
56
- rb_define_const(module, "STANDARD_GAS_VOLUME",
57
- rb_float_new(GSL_CONST_MKS_STANDARD_GAS_VOLUME));
58
-
59
- rb_define_const(module, "MINUTE", rb_float_new(GSL_CONST_MKS_MINUTE));
60
- rb_define_const(module, "HOUR", rb_float_new(GSL_CONST_MKS_HOUR));
61
- rb_define_const(module, "DAY", rb_float_new(GSL_CONST_MKS_DAY));
62
- rb_define_const(module, "WEEK", rb_float_new(GSL_CONST_MKS_WEEK));
63
- rb_define_const(module, "INCH", rb_float_new(GSL_CONST_MKS_INCH));
64
- rb_define_const(module, "FOOT", rb_float_new(GSL_CONST_MKS_FOOT));
65
- rb_define_const(module, "YARD", rb_float_new(GSL_CONST_MKS_YARD));
66
- rb_define_const(module, "MILE", rb_float_new(GSL_CONST_MKS_MILE));
67
- rb_define_const(module, "NAUTICAL_MILE", rb_float_new(GSL_CONST_MKS_NAUTICAL_MILE));
68
- rb_define_const(module, "FATHOM", rb_float_new(GSL_CONST_MKS_FATHOM));
69
- rb_define_const(module, "MIL", rb_float_new(GSL_CONST_MKS_MIL));
70
- rb_define_const(module, "POINT", rb_float_new(GSL_CONST_MKS_POINT));
71
- rb_define_const(module, "TEXPOINT", rb_float_new(GSL_CONST_MKS_TEXPOINT));
72
- rb_define_const(module, "MICRON", rb_float_new(GSL_CONST_MKS_MICRON));
73
- rb_define_const(module, "ANGSTROM", rb_float_new(GSL_CONST_MKS_ANGSTROM));
74
- rb_define_const(module, "HECTARE", rb_float_new(GSL_CONST_MKS_HECTARE));
75
- rb_define_const(module, "ACRE", rb_float_new(GSL_CONST_MKS_ACRE));
76
- #ifdef GSL_0_9_4_LATER
77
- rb_define_const(module, "BARN", rb_float_new(GSL_CONST_MKS_BARN));
78
- rb_define_const(module, "BTU", rb_float_new(GSL_CONST_MKS_BTU));
79
- rb_define_const(module, "SOLAR_MASS", rb_float_new(GSL_CONST_MKS_SOLAR_MASS));
80
- #else
81
- rb_define_const(module, "BARN", rb_float_new(1.0e-28));
82
- rb_define_const(module, "BTU", rb_float_new(1.05505585262e3));
83
- #endif
84
- rb_define_const(module, "LITER", rb_float_new(GSL_CONST_MKS_LITER));
85
- rb_define_const(module, "US_GALLON", rb_float_new(GSL_CONST_MKS_US_GALLON));
86
- rb_define_const(module, "QUART", rb_float_new(GSL_CONST_MKS_QUART));
87
- rb_define_const(module, "PINT", rb_float_new(GSL_CONST_MKS_PINT));
88
- rb_define_const(module, "CUP", rb_float_new(GSL_CONST_MKS_CUP));
89
- rb_define_const(module, "FLUID_OUNCE", rb_float_new(GSL_CONST_MKS_FLUID_OUNCE));
90
- rb_define_const(module, "TABLESPOON", rb_float_new(GSL_CONST_MKS_TABLESPOON));
91
- rb_define_const(module, "CANADIAN_GALLON",
92
- rb_float_new(GSL_CONST_MKS_CANADIAN_GALLON));
93
-
94
- rb_define_const(module, "UK_GALLON", rb_float_new(GSL_CONST_MKS_UK_GALLON));
95
- rb_define_const(module, "KILOMETERS_PER_HOUR",
96
- rb_float_new(GSL_CONST_MKS_MILES_PER_HOUR));
97
- rb_define_const(module, "MILES_PER_HOUR",
98
- rb_float_new(GSL_CONST_MKS_KILOMETERS_PER_HOUR));
99
- rb_define_const(module, "KNOT", rb_float_new(GSL_CONST_MKS_KNOT));
100
- rb_define_const(module, "POUND_MASS", rb_float_new(GSL_CONST_MKS_POUND_MASS));
101
- rb_define_const(module, "POUND_OUNCE", rb_float_new(GSL_CONST_MKS_OUNCE_MASS));
102
- rb_define_const(module, "POUND_TON", rb_float_new(GSL_CONST_MKS_TON));
103
- rb_define_const(module, "POUND_METRIC_TON",
104
- rb_float_new(GSL_CONST_MKS_METRIC_TON));
105
- rb_define_const(module, "POUND_UK_TON", rb_float_new(GSL_CONST_MKS_UK_TON));
106
- rb_define_const(module, "POUND_TROY_OUNCE",
107
- rb_float_new(GSL_CONST_MKS_TROY_OUNCE));
108
- rb_define_const(module, "CARAT", rb_float_new(GSL_CONST_MKS_CARAT));
109
- rb_define_const(module, "UNIFIED_ATOMIC_MASS",
110
- rb_float_new(GSL_CONST_MKS_UNIFIED_ATOMIC_MASS));
111
- rb_define_const(module, "GRAM_FORCE", rb_float_new(GSL_CONST_MKS_GRAM_FORCE));
112
- rb_define_const(module, "POUND_FORCE", rb_float_new(GSL_CONST_MKS_POUND_FORCE));
113
- rb_define_const(module, "KILOPOUND_FORCE",
114
- rb_float_new(GSL_CONST_MKS_KILOPOUND_FORCE));
115
- rb_define_const(module, "POUNDAL", rb_float_new(GSL_CONST_MKS_POUNDAL));
116
- rb_define_const(module, "CALORIE", rb_float_new(GSL_CONST_MKS_CALORIE));
117
- rb_define_const(module, "THERM", rb_float_new(GSL_CONST_MKS_THERM));
118
- rb_define_const(module, "HORSEPOWER", rb_float_new(GSL_CONST_MKS_HORSEPOWER));
119
- rb_define_const(module, "BAR", rb_float_new(GSL_CONST_MKS_BAR));
120
- rb_define_const(module, "STD_ATMOSPHERE",
121
- rb_float_new(GSL_CONST_MKS_STD_ATMOSPHERE));
122
- rb_define_const(module, "TORR", rb_float_new(GSL_CONST_MKS_TORR));
123
- rb_define_const(module, "METER_OF_MERCURY",
124
- rb_float_new(GSL_CONST_MKS_METER_OF_MERCURY));
125
- rb_define_const(module, "INCH_OF_MERCURY",
126
- rb_float_new(GSL_CONST_MKS_INCH_OF_MERCURY));
127
- rb_define_const(module, "INCH_OF_WATER",
128
- rb_float_new(GSL_CONST_MKS_INCH_OF_WATER));
129
- rb_define_const(module, "PSI", rb_float_new(GSL_CONST_MKS_PSI));
130
- rb_define_const(module, "POISE", rb_float_new(GSL_CONST_MKS_POISE));
131
- rb_define_const(module, "STOKES", rb_float_new(GSL_CONST_MKS_STOKES));
132
- rb_define_const(module, "FARADAY", rb_float_new(GSL_CONST_MKS_FARADAY));
133
- rb_define_const(module, "ELECTRON_CHARGE",
134
- rb_float_new(GSL_CONST_MKS_ELECTRON_CHARGE));
135
- rb_define_const(module, "GAUSS", rb_float_new(GSL_CONST_MKS_GAUSS));
136
- rb_define_const(module, "STILB", rb_float_new(GSL_CONST_MKS_STILB));
137
- rb_define_const(module, "LUMEN", rb_float_new(GSL_CONST_MKS_LUMEN));
138
- rb_define_const(module, "LUX", rb_float_new(GSL_CONST_MKS_LUX));
139
- rb_define_const(module, "PHOT", rb_float_new(GSL_CONST_MKS_PHOT));
140
- rb_define_const(module, "FOOTCANDLE", rb_float_new(GSL_CONST_MKS_FOOTCANDLE));
141
- rb_define_const(module, "LAMBERT", rb_float_new(GSL_CONST_MKS_LAMBERT));
142
- rb_define_const(module, "CURIE", rb_float_new(GSL_CONST_MKS_CURIE));
143
- rb_define_const(module, "ROENTGEN", rb_float_new(GSL_CONST_MKS_ROENTGEN));
144
- rb_define_const(module, "RAD", rb_float_new(GSL_CONST_MKS_RAD));
145
-
146
- #ifdef GSL_1_1_LATER
147
- rb_define_const(module, "VACUUM_PERMITTIVITY",
148
- rb_float_new(GSL_CONST_MKS_VACUUM_PERMITTIVITY));
149
- rb_define_const(module, "BOHR_RADIUS", rb_float_new(GSL_CONST_MKS_BOHR_RADIUS));
150
- #endif
151
-
152
- #ifdef GSL_1_2_LATER
153
- rb_define_const(module, "NEWTON", rb_float_new(GSL_CONST_MKS_NEWTON));
154
- rb_define_const(module, "DYNE", rb_float_new(GSL_CONST_MKS_DYNE));
155
- rb_define_const(module, "JOULE", rb_float_new(GSL_CONST_MKS_JOULE));
156
- rb_define_const(module, "ERG", rb_float_new(GSL_CONST_MKS_ERG));
157
- #endif
158
-
159
- #ifdef GSL_1_8_LATER
160
- rb_define_const(module, "DEBYE", rb_float_new(GSL_CONST_MKS_DEBYE));
161
- #endif
162
-
163
- }
164
-
165
- static void rb_gsl_const_cgs(VALUE module)
166
- {
167
- rb_define_const(module, "SPEED_OF_LIGHT",
168
- rb_float_new(GSL_CONST_CGS_SPEED_OF_LIGHT));
169
- rb_define_const(module, "GRAVITATIONAL_CONSTANT",
170
- rb_float_new(GSL_CONST_CGS_GRAVITATIONAL_CONSTANT));
171
- rb_define_const(module, "PLANCKS_CONSTANT_H",
172
- rb_float_new(GSL_CONST_CGS_PLANCKS_CONSTANT_H));
173
- rb_define_const(module, "PLANCKS_CONSTANT_HBAR",
174
- rb_float_new(GSL_CONST_CGS_PLANCKS_CONSTANT_HBAR));
175
- rb_define_const(module, "ASTRONOMICAL_UNIT",
176
- rb_float_new(GSL_CONST_CGS_ASTRONOMICAL_UNIT));
177
- rb_define_const(module, "LIGHT_YEAR", rb_float_new(GSL_CONST_CGS_LIGHT_YEAR));
178
- rb_define_const(module, "PARSEC", rb_float_new(GSL_CONST_CGS_PARSEC));
179
- rb_define_const(module, "GRAV_ACCEL", rb_float_new(GSL_CONST_CGS_GRAV_ACCEL));
180
- rb_define_const(module, "ELECTRON_VOLT",
181
- rb_float_new(GSL_CONST_CGS_ELECTRON_VOLT));
182
- rb_define_const(module, "MASS_ELECTRON",
183
- rb_float_new(GSL_CONST_CGS_MASS_ELECTRON));
184
- rb_define_const(module, "MASS_MUON", rb_float_new(GSL_CONST_CGS_MASS_MUON));
185
- rb_define_const(module, "MASS_PROTON",
186
- rb_float_new(GSL_CONST_CGS_MASS_PROTON));
187
- rb_define_const(module, "MASS_NEUTRON", rb_float_new(GSL_CONST_CGS_MASS_NEUTRON));
188
- rb_define_const(module, "RYDBERG", rb_float_new(GSL_CONST_CGS_RYDBERG));
189
- rb_define_const(module, "BOHR_MAGNETON",
190
- rb_float_new(GSL_CONST_CGS_BOHR_MAGNETON));
191
-
192
- rb_define_const(module, "NUCLEAR_MAGNETON",
193
- rb_float_new(GSL_CONST_CGS_NUCLEAR_MAGNETON));
194
- rb_define_const(module, "ELECTRON_MAGNETIC_MOMENT",
195
- rb_float_new(GSL_CONST_CGS_ELECTRON_MAGNETIC_MOMENT));
196
- rb_define_const(module, "PROTON_MAGNETIC_MOMENT",
197
- rb_float_new(GSL_CONST_CGS_PROTON_MAGNETIC_MOMENT));
198
- rb_define_const(module, "STANDARD_GAS_VOLUME",
199
- rb_float_new(GSL_CONST_CGS_STANDARD_GAS_VOLUME));
200
-
201
- rb_define_const(module, "MINUTE", rb_float_new(GSL_CONST_CGS_MINUTE));
202
- rb_define_const(module, "HOUR", rb_float_new(GSL_CONST_CGS_HOUR));
203
- rb_define_const(module, "DAY", rb_float_new(GSL_CONST_CGS_DAY));
204
- rb_define_const(module, "WEEK", rb_float_new(GSL_CONST_CGS_WEEK));
205
- rb_define_const(module, "INCH", rb_float_new(GSL_CONST_CGS_INCH));
206
- rb_define_const(module, "FOOT", rb_float_new(GSL_CONST_CGS_FOOT));
207
- rb_define_const(module, "YARD", rb_float_new(GSL_CONST_CGS_YARD));
208
- rb_define_const(module, "MILE", rb_float_new(GSL_CONST_CGS_MILE));
209
- rb_define_const(module, "NAUTICAL_MILE",
210
- rb_float_new(GSL_CONST_CGS_NAUTICAL_MILE));
211
- rb_define_const(module, "FATHOM", rb_float_new(GSL_CONST_CGS_FATHOM));
212
- rb_define_const(module, "MIL", rb_float_new(GSL_CONST_CGS_MIL));
213
- rb_define_const(module, "POINT", rb_float_new(GSL_CONST_CGS_POINT));
214
- rb_define_const(module, "TEXPOINT", rb_float_new(GSL_CONST_CGS_TEXPOINT));
215
- rb_define_const(module, "MICRON", rb_float_new(GSL_CONST_CGS_MICRON));
216
- rb_define_const(module, "ANGSTROM", rb_float_new(GSL_CONST_CGS_ANGSTROM));
217
- rb_define_const(module, "HECTARE", rb_float_new(GSL_CONST_CGS_HECTARE));
218
- rb_define_const(module, "ACRE", rb_float_new(GSL_CONST_CGS_ACRE));
219
- #ifdef GSL_0_9_4_LATER
220
- rb_define_const(module, "BARN", rb_float_new(GSL_CONST_CGS_BARN));
221
- rb_define_const(module, "BTU", rb_float_new(GSL_CONST_CGS_BTU));
222
- rb_define_const(module, "SOLAR_MASS", rb_float_new(GSL_CONST_CGS_SOLAR_MASS));
223
- #else
224
- rb_define_const(module, "BARN", rb_float_new(1e-24));
225
- rb_define_const(module, "BTU", rb_float_new(1.05505585262e10));
226
- #endif
227
- rb_define_const(module, "LITER", rb_float_new(GSL_CONST_CGS_LITER));
228
- rb_define_const(module, "US_GALLON", rb_float_new(GSL_CONST_CGS_US_GALLON));
229
- rb_define_const(module, "QUART", rb_float_new(GSL_CONST_CGS_QUART));
230
- rb_define_const(module, "PINT", rb_float_new(GSL_CONST_CGS_PINT));
231
- rb_define_const(module, "CUP", rb_float_new(GSL_CONST_CGS_CUP));
232
- rb_define_const(module, "FLUID_OUNCE", rb_float_new(GSL_CONST_CGS_FLUID_OUNCE));
233
- rb_define_const(module, "TABLESPOON", rb_float_new(GSL_CONST_CGS_TABLESPOON));
234
- rb_define_const(module, "CANADIAN_GALLON",
235
- rb_float_new(GSL_CONST_CGS_CANADIAN_GALLON));
236
-
237
- rb_define_const(module, "UK_GALLON", rb_float_new(GSL_CONST_CGS_UK_GALLON));
238
- rb_define_const(module, "KILOMETERS_PER_HOUR",
239
- rb_float_new(GSL_CONST_CGS_MILES_PER_HOUR));
240
- rb_define_const(module, "MILES_PER_HOUR",
241
- rb_float_new(GSL_CONST_CGS_KILOMETERS_PER_HOUR));
242
- rb_define_const(module, "KNOT", rb_float_new(GSL_CONST_CGS_KNOT));
243
- rb_define_const(module, "POUND_MASS", rb_float_new(GSL_CONST_CGS_POUND_MASS));
244
- rb_define_const(module, "POUND_OUNCE", rb_float_new(GSL_CONST_CGS_OUNCE_MASS));
245
- rb_define_const(module, "POUND_TON", rb_float_new(GSL_CONST_CGS_TON));
246
- rb_define_const(module, "POUND_METRIC_TON",
247
- rb_float_new(GSL_CONST_CGS_METRIC_TON));
248
- rb_define_const(module, "POUND_UK_TON", rb_float_new(GSL_CONST_CGS_UK_TON));
249
- rb_define_const(module, "POUND_TROY_OUNCE",
250
- rb_float_new(GSL_CONST_CGS_TROY_OUNCE));
251
- rb_define_const(module, "CARAT", rb_float_new(GSL_CONST_CGS_CARAT));
252
- rb_define_const(module, "UNIFIED_ATOMIC_MASS",
253
- rb_float_new(GSL_CONST_CGS_UNIFIED_ATOMIC_MASS));
254
- rb_define_const(module, "GRAM_FORCE", rb_float_new(GSL_CONST_CGS_GRAM_FORCE));
255
- rb_define_const(module, "POUND_FORCE", rb_float_new(GSL_CONST_CGS_POUND_FORCE));
256
- rb_define_const(module, "KILOPOUND_FORCE",
257
- rb_float_new(GSL_CONST_CGS_KILOPOUND_FORCE));
258
- rb_define_const(module, "POUNDAL", rb_float_new(GSL_CONST_CGS_POUNDAL));
259
- rb_define_const(module, "CALORIE", rb_float_new(GSL_CONST_CGS_CALORIE));
260
- rb_define_const(module, "THERM", rb_float_new(GSL_CONST_CGS_THERM));
261
- rb_define_const(module, "HORSEPOWER", rb_float_new(GSL_CONST_CGS_HORSEPOWER));
262
- rb_define_const(module, "BAR", rb_float_new(GSL_CONST_CGS_BAR));
263
- rb_define_const(module, "STD_ATMOSPHERE",
264
- rb_float_new(GSL_CONST_CGS_STD_ATMOSPHERE));
265
- rb_define_const(module, "TORR", rb_float_new(GSL_CONST_CGS_TORR));
266
- rb_define_const(module, "METER_OF_MERCURY",
267
- rb_float_new(GSL_CONST_CGS_METER_OF_MERCURY));
268
- rb_define_const(module, "INCH_OF_MERCURY",
269
- rb_float_new(GSL_CONST_CGS_INCH_OF_MERCURY));
270
- rb_define_const(module, "INCH_OF_WATER",
271
- rb_float_new(GSL_CONST_CGS_INCH_OF_WATER));
272
- rb_define_const(module, "PSI", rb_float_new(GSL_CONST_CGS_PSI));
273
- rb_define_const(module, "POISE", rb_float_new(GSL_CONST_CGS_POISE));
274
- rb_define_const(module, "STOKES", rb_float_new(GSL_CONST_CGS_STOKES));
275
- rb_define_const(module, "FARADAY", rb_float_new(GSL_CONST_CGS_FARADAY));
276
- rb_define_const(module, "ELECTRON_CHARGE",
277
- rb_float_new(GSL_CONST_CGS_ELECTRON_CHARGE));
278
- rb_define_const(module, "ELECTRON_CHARGE_ESU",
279
- rb_float_new(GSL_CONST_CGS_ELECTRON_CHARGE*GSL_CONST_CGS_SPEED_OF_LIGHT));
280
- rb_define_const(module, "GAUSS", rb_float_new(GSL_CONST_CGS_GAUSS));
281
- rb_define_const(module, "STILB", rb_float_new(GSL_CONST_CGS_STILB));
282
- rb_define_const(module, "LUMEN", rb_float_new(GSL_CONST_CGS_LUMEN));
283
- rb_define_const(module, "LUX", rb_float_new(GSL_CONST_CGS_LUX));
284
- rb_define_const(module, "PHOT", rb_float_new(GSL_CONST_CGS_PHOT));
285
- rb_define_const(module, "FOOTCANDLE", rb_float_new(GSL_CONST_CGS_FOOTCANDLE));
286
- rb_define_const(module, "LAMBERT", rb_float_new(GSL_CONST_CGS_LAMBERT));
287
- rb_define_const(module, "CURIE", rb_float_new(GSL_CONST_CGS_CURIE));
288
- rb_define_const(module, "ROENTGEN", rb_float_new(GSL_CONST_CGS_ROENTGEN));
289
- rb_define_const(module, "RAD", rb_float_new(GSL_CONST_CGS_RAD));
290
-
291
- rb_define_const(module, "BOLTZMANN", rb_float_new(GSL_CONST_CGS_BOLTZMANN));
292
- rb_define_const(module, "MOLAR_GAS", rb_float_new(GSL_CONST_CGS_MOLAR_GAS));
293
-
294
- #ifdef GSL_1_1_LATER
295
- rb_define_const(module, "BOHR_RADIUS", rb_float_new(GSL_CONST_CGS_BOHR_RADIUS));
296
- #endif
297
- #ifdef GSL_1_2_LATER
298
- rb_define_const(module, "NEWTON", rb_float_new(GSL_CONST_CGS_NEWTON));
299
- rb_define_const(module, "DYNE", rb_float_new(GSL_CONST_CGS_DYNE));
300
- rb_define_const(module, "JOULE", rb_float_new(GSL_CONST_CGS_JOULE));
301
- rb_define_const(module, "ERG", rb_float_new(GSL_CONST_CGS_ERG));
302
- #endif
303
-
304
- }
305
-
306
- static void rb_gsl_const_num(VALUE module)
307
- {
308
- rb_define_const(module, "AVOGADRO", rb_float_new(GSL_CONST_NUM_AVOGADRO));
309
- rb_define_const(module, "FINE_STRUCTURE",
310
- rb_float_new(GSL_CONST_NUM_FINE_STRUCTURE));
311
- #ifdef GSL_1_2_LATER
312
- rb_define_const(module, "YOTTA", rb_float_new(GSL_CONST_NUM_YOTTA));
313
- rb_define_const(module, "ZETTA", rb_float_new(GSL_CONST_NUM_ZETTA));
314
- rb_define_const(module, "EXA", rb_float_new(GSL_CONST_NUM_EXA));
315
- rb_define_const(module, "PETA", rb_float_new(GSL_CONST_NUM_PETA));
316
- rb_define_const(module, "TERA", rb_float_new(GSL_CONST_NUM_TERA));
317
- rb_define_const(module, "GIGA", rb_float_new(GSL_CONST_NUM_GIGA));
318
- rb_define_const(module, "MEGA", rb_float_new(GSL_CONST_NUM_MEGA));
319
- rb_define_const(module, "KILO", rb_float_new(GSL_CONST_NUM_KILO));
320
- rb_define_const(module, "MILLI", rb_float_new(GSL_CONST_NUM_MILLI));
321
- rb_define_const(module, "MICRO", rb_float_new(GSL_CONST_NUM_MICRO));
322
- rb_define_const(module, "NANO", rb_float_new(GSL_CONST_NUM_NANO));
323
- rb_define_const(module, "PICO", rb_float_new(GSL_CONST_NUM_PICO));
324
- rb_define_const(module, "FEMTO", rb_float_new(GSL_CONST_NUM_FEMTO));
325
- rb_define_const(module, "ATTO", rb_float_new(GSL_CONST_NUM_ATTO));
326
- rb_define_const(module, "ZEPTO", rb_float_new(GSL_CONST_NUM_ZEPTO));
327
- rb_define_const(module, "YOCTO", rb_float_new(GSL_CONST_NUM_YOCTO));
328
- #endif
329
- }
330
-
331
- void Init_gsl_const(VALUE module)
332
- {
333
- VALUE mgsl_const;
334
- VALUE mgsl_const_mks, mgsl_const_cgs, mgsl_const_num;
335
-
336
- mgsl_const = rb_define_module_under(module, "CONST");
337
- mgsl_const_mks = rb_define_module_under(mgsl_const, "MKSA");
338
- rb_gsl_const_mks(mgsl_const_mks);
339
- mgsl_const_cgs = rb_define_module_under(mgsl_const, "CGSM");
340
- rb_gsl_const_cgs(mgsl_const_cgs);
341
- mgsl_const_num = rb_define_module_under(mgsl_const, "NUM");
342
- rb_gsl_const_num(mgsl_const_num);
343
- Init_gsl_const_additional(mgsl_const_mks, mgsl_const_cgs, mgsl_const_num);
344
- }
345
-
346
- #else
347
-
348
- static void rb_gsl_const_mks(VALUE module)
349
- {
350
- rb_define_const(module, "SPEED_OF_LIGHT",
351
- rb_float_new(GSL_CONST_MKSA_SPEED_OF_LIGHT));
352
- rb_define_const(module, "GRAVITATIONAL_CONSTANT",
353
- rb_float_new(GSL_CONST_MKSA_GRAVITATIONAL_CONSTANT));
354
- rb_define_const(module, "PLANCKS_CONSTANT_H",
355
- rb_float_new(GSL_CONST_MKSA_PLANCKS_CONSTANT_H));
356
- rb_define_const(module, "PLANCKS_CONSTANT_HBAR",
357
- rb_float_new(GSL_CONST_MKSA_PLANCKS_CONSTANT_HBAR));
358
- rb_define_const(module, "VACUUM_PERMEABILITY",
359
- rb_float_new(GSL_CONST_MKSA_VACUUM_PERMEABILITY));
360
- rb_define_const(module, "VACUUM_PERMITTIVITY",
361
- rb_float_new(GSL_CONST_MKSA_VACUUM_PERMITTIVITY));
362
- rb_define_const(module, "ASTRONOMICAL_UNIT",
363
- rb_float_new(GSL_CONST_MKSA_ASTRONOMICAL_UNIT));
364
- rb_define_const(module, "LIGHT_YEAR", rb_float_new(GSL_CONST_MKSA_LIGHT_YEAR));
365
- rb_define_const(module, "PARSEC", rb_float_new(GSL_CONST_MKSA_PARSEC));
366
- rb_define_const(module, "GRAV_ACCEL", rb_float_new(GSL_CONST_MKSA_GRAV_ACCEL));
367
- rb_define_const(module, "ELECTRON_VOLT",
368
- rb_float_new(GSL_CONST_MKSA_ELECTRON_VOLT));
369
- rb_define_const(module, "MASS_ELECTRON",
370
- rb_float_new(GSL_CONST_MKSA_MASS_ELECTRON));
371
- rb_define_const(module, "MASS_MUON", rb_float_new(GSL_CONST_MKSA_MASS_MUON));
372
- rb_define_const(module, "MASS_PROTON", rb_float_new(GSL_CONST_MKSA_MASS_PROTON));
373
- rb_define_const(module, "MASS_NEUTRON", rb_float_new(GSL_CONST_MKSA_MASS_NEUTRON));
374
- rb_define_const(module, "RYDBERG", rb_float_new(GSL_CONST_MKSA_RYDBERG));
375
- rb_define_const(module, "BOHR_MAGNETON",
376
- rb_float_new(GSL_CONST_MKSA_BOHR_MAGNETON));
377
- rb_define_const(module, "NUCLEAR_MAGNETON",
378
- rb_float_new(GSL_CONST_MKSA_NUCLEAR_MAGNETON));
379
- rb_define_const(module, "ELECTRON_MAGNETIC_MOMENT",
380
- rb_float_new(GSL_CONST_MKSA_ELECTRON_MAGNETIC_MOMENT));
381
- rb_define_const(module, "PROTON_MAGNETIC_MOMENT",
382
- rb_float_new(GSL_CONST_MKSA_PROTON_MAGNETIC_MOMENT));
383
- rb_define_const(module, "STANDARD_GAS_VOLUME",
384
- rb_float_new(GSL_CONST_MKSA_STANDARD_GAS_VOLUME));
385
-
386
- rb_define_const(module, "MINUTE", rb_float_new(GSL_CONST_MKSA_MINUTE));
387
- rb_define_const(module, "HOUR", rb_float_new(GSL_CONST_MKSA_HOUR));
388
- rb_define_const(module, "DAY", rb_float_new(GSL_CONST_MKSA_DAY));
389
- rb_define_const(module, "WEEK", rb_float_new(GSL_CONST_MKSA_WEEK));
390
- rb_define_const(module, "INCH", rb_float_new(GSL_CONST_MKSA_INCH));
391
- rb_define_const(module, "FOOT", rb_float_new(GSL_CONST_MKSA_FOOT));
392
- rb_define_const(module, "YARD", rb_float_new(GSL_CONST_MKSA_YARD));
393
- rb_define_const(module, "MILE", rb_float_new(GSL_CONST_MKSA_MILE));
394
- rb_define_const(module, "NAUTICAL_MILE",
395
- rb_float_new(GSL_CONST_MKSA_NAUTICAL_MILE));
396
- rb_define_const(module, "FATHOM", rb_float_new(GSL_CONST_MKSA_FATHOM));
397
- rb_define_const(module, "MIL", rb_float_new(GSL_CONST_MKSA_MIL));
398
- rb_define_const(module, "POINT", rb_float_new(GSL_CONST_MKSA_POINT));
399
- rb_define_const(module, "TEXPOINT", rb_float_new(GSL_CONST_MKSA_TEXPOINT));
400
- rb_define_const(module, "MICRON", rb_float_new(GSL_CONST_MKSA_MICRON));
401
- rb_define_const(module, "ANGSTROM", rb_float_new(GSL_CONST_MKSA_ANGSTROM));
402
- rb_define_const(module, "HECTARE", rb_float_new(GSL_CONST_MKSA_HECTARE));
403
- rb_define_const(module, "ACRE", rb_float_new(GSL_CONST_MKSA_ACRE));
404
- rb_define_const(module, "BARN", rb_float_new(GSL_CONST_MKSA_BARN));
405
- rb_define_const(module, "LITER", rb_float_new(GSL_CONST_MKSA_LITER));
406
- rb_define_const(module, "US_GALLON", rb_float_new(GSL_CONST_MKSA_US_GALLON));
407
- rb_define_const(module, "QUART", rb_float_new(GSL_CONST_MKSA_QUART));
408
- rb_define_const(module, "PINT", rb_float_new(GSL_CONST_MKSA_PINT));
409
- rb_define_const(module, "CUP", rb_float_new(GSL_CONST_MKSA_CUP));
410
- rb_define_const(module, "FLUID_OUNCE", rb_float_new(GSL_CONST_MKSA_FLUID_OUNCE));
411
- rb_define_const(module, "TABLESPOON", rb_float_new(GSL_CONST_MKSA_TABLESPOON));
412
- rb_define_const(module, "CANADIAN_GALLON",
413
- rb_float_new(GSL_CONST_MKSA_CANADIAN_GALLON));
414
-
415
- rb_define_const(module, "UK_GALLON", rb_float_new(GSL_CONST_MKSA_UK_GALLON));
416
- rb_define_const(module, "KILOMETERS_PER_HOUR",
417
- rb_float_new(GSL_CONST_MKSA_MILES_PER_HOUR));
418
- rb_define_const(module, "MILES_PER_HOUR",
419
- rb_float_new(GSL_CONST_MKSA_KILOMETERS_PER_HOUR));
420
- rb_define_const(module, "KNOT", rb_float_new(GSL_CONST_MKSA_KNOT));
421
- rb_define_const(module, "POUND_MASS", rb_float_new(GSL_CONST_MKSA_POUND_MASS));
422
- rb_define_const(module, "POUND_OUNCE", rb_float_new(GSL_CONST_MKSA_OUNCE_MASS));
423
- rb_define_const(module, "POUND_TON", rb_float_new(GSL_CONST_MKSA_TON));
424
- rb_define_const(module, "POUND_METRIC_TON",
425
- rb_float_new(GSL_CONST_MKSA_METRIC_TON));
426
- rb_define_const(module, "POUND_UK_TON", rb_float_new(GSL_CONST_MKSA_UK_TON));
427
- rb_define_const(module, "POUND_TROY_OUNCE",
428
- rb_float_new(GSL_CONST_MKSA_TROY_OUNCE));
429
- rb_define_const(module, "CARAT", rb_float_new(GSL_CONST_MKSA_CARAT));
430
- rb_define_const(module, "UNIFIED_ATOMIC_MASS",
431
- rb_float_new(GSL_CONST_MKSA_UNIFIED_ATOMIC_MASS));
432
- rb_define_const(module, "GRAM_FORCE", rb_float_new(GSL_CONST_MKSA_GRAM_FORCE));
433
- rb_define_const(module, "POUND_FORCE", rb_float_new(GSL_CONST_MKSA_POUND_FORCE));
434
- rb_define_const(module, "KILOPOUND_FORCE",
435
- rb_float_new(GSL_CONST_MKSA_KILOPOUND_FORCE));
436
- rb_define_const(module, "POUNDAL", rb_float_new(GSL_CONST_MKSA_POUNDAL));
437
- rb_define_const(module, "CALORIE", rb_float_new(GSL_CONST_MKSA_CALORIE));
438
- rb_define_const(module, "BTU", rb_float_new(GSL_CONST_MKSA_BTU));
439
- rb_define_const(module, "THERM", rb_float_new(GSL_CONST_MKSA_THERM));
440
- rb_define_const(module, "HORSEPOWER", rb_float_new(GSL_CONST_MKSA_HORSEPOWER));
441
- rb_define_const(module, "BAR", rb_float_new(GSL_CONST_MKSA_BAR));
442
- rb_define_const(module, "STD_ATMOSPHERE",
443
- rb_float_new(GSL_CONST_MKSA_STD_ATMOSPHERE));
444
- rb_define_const(module, "TORR", rb_float_new(GSL_CONST_MKSA_TORR));
445
- rb_define_const(module, "METER_OF_MERCURY",
446
- rb_float_new(GSL_CONST_MKSA_METER_OF_MERCURY));
447
- rb_define_const(module, "INCH_OF_MERCURY",
448
- rb_float_new(GSL_CONST_MKSA_INCH_OF_MERCURY));
449
- rb_define_const(module, "INCH_OF_WATER",
450
- rb_float_new(GSL_CONST_MKSA_INCH_OF_WATER));
451
- rb_define_const(module, "PSI", rb_float_new(GSL_CONST_MKSA_PSI));
452
- rb_define_const(module, "POISE", rb_float_new(GSL_CONST_MKSA_POISE));
453
- rb_define_const(module, "STOKES", rb_float_new(GSL_CONST_MKSA_STOKES));
454
- rb_define_const(module, "FARADAY", rb_float_new(GSL_CONST_MKSA_FARADAY));
455
- rb_define_const(module, "ELECTRON_CHARGE",
456
- rb_float_new(GSL_CONST_MKSA_ELECTRON_CHARGE));
457
- rb_define_const(module, "GAUSS", rb_float_new(GSL_CONST_MKSA_GAUSS));
458
- rb_define_const(module, "STILB", rb_float_new(GSL_CONST_MKSA_STILB));
459
- rb_define_const(module, "LUMEN", rb_float_new(GSL_CONST_MKSA_LUMEN));
460
- rb_define_const(module, "LUX", rb_float_new(GSL_CONST_MKSA_LUX));
461
- rb_define_const(module, "PHOT", rb_float_new(GSL_CONST_MKSA_PHOT));
462
- rb_define_const(module, "FOOTCANDLE", rb_float_new(GSL_CONST_MKSA_FOOTCANDLE));
463
- rb_define_const(module, "LAMBERT", rb_float_new(GSL_CONST_MKSA_LAMBERT));
464
- rb_define_const(module, "CURIE", rb_float_new(GSL_CONST_MKSA_CURIE));
465
- rb_define_const(module, "ROENTGEN", rb_float_new(GSL_CONST_MKSA_ROENTGEN));
466
- rb_define_const(module, "RAD", rb_float_new(GSL_CONST_MKSA_RAD));
467
- rb_define_const(module, "SOLAR_MASS", rb_float_new(GSL_CONST_MKSA_SOLAR_MASS));
468
-
469
- rb_define_const(module, "BOLTZMANN", rb_float_new(GSL_CONST_MKSA_BOLTZMANN));
470
- rb_define_const(module, "MOLAR_GAS", rb_float_new(GSL_CONST_MKSA_MOLAR_GAS));
471
-
472
- rb_define_const(module, "BOHR_RADIUS", rb_float_new(GSL_CONST_MKSA_BOHR_RADIUS));
473
- rb_define_const(module, "NEWTON", rb_float_new(GSL_CONST_MKSA_NEWTON));
474
- rb_define_const(module, "DYNE", rb_float_new(GSL_CONST_MKSA_DYNE));
475
- rb_define_const(module, "JOULE", rb_float_new(GSL_CONST_MKSA_JOULE));
476
- rb_define_const(module, "ERG", rb_float_new(GSL_CONST_MKSA_ERG));
477
-
478
- #ifdef GSL_1_4_9_LATER
479
- rb_define_const(module, "STEFAN_BOLTZMANN_CONSTANT",
480
- rb_float_new(GSL_CONST_MKSA_STEFAN_BOLTZMANN_CONSTANT));
481
- rb_define_const(module, "THOMSON_CROSS_SECTION",
482
- rb_float_new(GSL_CONST_MKSA_THOMSON_CROSS_SECTION));
483
- #endif
484
-
485
-
486
- #ifdef GSL_1_8_LATER
487
- rb_define_const(module, "DEBYE", rb_float_new(GSL_CONST_MKSA_DEBYE));
488
- #endif
489
-
490
- }
491
-
492
-
493
- static void rb_gsl_const_cgs(VALUE module)
494
- {
495
- rb_define_const(module, "SPEED_OF_LIGHT",
496
- rb_float_new(GSL_CONST_CGSM_SPEED_OF_LIGHT));
497
- rb_define_const(module, "GRAVITATIONAL_CONSTANT",
498
- rb_float_new(GSL_CONST_CGSM_GRAVITATIONAL_CONSTANT));
499
- rb_define_const(module, "PLANCKS_CONSTANT_H",
500
- rb_float_new(GSL_CONST_CGSM_PLANCKS_CONSTANT_H));
501
- rb_define_const(module, "PLANCKS_CONSTANT_HBAR",
502
- rb_float_new(GSL_CONST_CGSM_PLANCKS_CONSTANT_HBAR));
503
- rb_define_const(module, "ASTRONOMICAL_UNIT",
504
- rb_float_new(GSL_CONST_CGSM_ASTRONOMICAL_UNIT));
505
- rb_define_const(module, "LIGHT_YEAR",
506
- rb_float_new(GSL_CONST_CGSM_LIGHT_YEAR));
507
- rb_define_const(module, "PARSEC",
508
- rb_float_new(GSL_CONST_CGSM_PARSEC));
509
- rb_define_const(module, "GRAV_ACCEL",
510
- rb_float_new(GSL_CONST_CGSM_GRAV_ACCEL));
511
- rb_define_const(module, "ELECTRON_VOLT",
512
- rb_float_new(GSL_CONST_CGSM_ELECTRON_VOLT));
513
- rb_define_const(module, "MASS_ELECTRON",
514
- rb_float_new(GSL_CONST_CGSM_MASS_ELECTRON));
515
- rb_define_const(module, "MASS_MUON", rb_float_new(GSL_CONST_CGSM_MASS_MUON));
516
- rb_define_const(module, "MASS_PROTON", rb_float_new(GSL_CONST_CGSM_MASS_PROTON));
517
- rb_define_const(module, "MASS_NEUTRON", rb_float_new(GSL_CONST_CGSM_MASS_NEUTRON));
518
- rb_define_const(module, "RYDBERG", rb_float_new(GSL_CONST_CGSM_RYDBERG));
519
-
520
- rb_define_const(module, "BOHR_MAGNETON",
521
- rb_float_new(GSL_CONST_CGSM_BOHR_MAGNETON));
522
-
523
- rb_define_const(module, "NUCLEAR_MAGNETON",
524
- rb_float_new(GSL_CONST_CGSM_NUCLEAR_MAGNETON));
525
- rb_define_const(module, "ELECTRON_MAGNETIC_MOMENT",
526
- rb_float_new(GSL_CONST_CGSM_ELECTRON_MAGNETIC_MOMENT));
527
- rb_define_const(module, "PROTON_MAGNETIC_MOMENT",
528
- rb_float_new(GSL_CONST_CGSM_PROTON_MAGNETIC_MOMENT));
529
- rb_define_const(module, "STANDARD_GAS_VOLUME",
530
- rb_float_new(GSL_CONST_CGSM_STANDARD_GAS_VOLUME));
531
-
532
- rb_define_const(module, "MINUTE", rb_float_new(GSL_CONST_CGSM_MINUTE));
533
- rb_define_const(module, "HOUR", rb_float_new(GSL_CONST_CGSM_HOUR));
534
- rb_define_const(module, "DAY", rb_float_new(GSL_CONST_CGSM_DAY));
535
- rb_define_const(module, "WEEK", rb_float_new(GSL_CONST_CGSM_WEEK));
536
- rb_define_const(module, "INCH", rb_float_new(GSL_CONST_CGSM_INCH));
537
- rb_define_const(module, "FOOT", rb_float_new(GSL_CONST_CGSM_FOOT));
538
- rb_define_const(module, "YARD", rb_float_new(GSL_CONST_CGSM_YARD));
539
- rb_define_const(module, "MILE", rb_float_new(GSL_CONST_CGSM_MILE));
540
- rb_define_const(module, "NAUTICAL_MILE",
541
- rb_float_new(GSL_CONST_CGSM_NAUTICAL_MILE));
542
- rb_define_const(module, "FATHOM", rb_float_new(GSL_CONST_CGSM_FATHOM));
543
- rb_define_const(module, "MIL", rb_float_new(GSL_CONST_CGSM_MIL));
544
- rb_define_const(module, "POINT", rb_float_new(GSL_CONST_CGSM_POINT));
545
- rb_define_const(module, "TEXPOINT", rb_float_new(GSL_CONST_CGSM_TEXPOINT));
546
- rb_define_const(module, "MICRON", rb_float_new(GSL_CONST_CGSM_MICRON));
547
- rb_define_const(module, "ANGSTROM", rb_float_new(GSL_CONST_CGSM_ANGSTROM));
548
- rb_define_const(module, "HECTARE", rb_float_new(GSL_CONST_CGSM_HECTARE));
549
- rb_define_const(module, "ACRE", rb_float_new(GSL_CONST_CGSM_ACRE));
550
- rb_define_const(module, "BARN", rb_float_new(GSL_CONST_CGSM_BARN));
551
- rb_define_const(module, "LITER", rb_float_new(GSL_CONST_CGSM_LITER));
552
- rb_define_const(module, "US_GALLON", rb_float_new(GSL_CONST_CGSM_US_GALLON));
553
- rb_define_const(module, "QUART", rb_float_new(GSL_CONST_CGSM_QUART));
554
- rb_define_const(module, "PINT", rb_float_new(GSL_CONST_CGSM_PINT));
555
- rb_define_const(module, "CUP", rb_float_new(GSL_CONST_CGSM_CUP));
556
- rb_define_const(module, "FLUID_OUNCE", rb_float_new(GSL_CONST_CGSM_FLUID_OUNCE));
557
- rb_define_const(module, "TABLESPOON", rb_float_new(GSL_CONST_CGSM_TABLESPOON));
558
- rb_define_const(module, "CANADIAN_GALLON",
559
- rb_float_new(GSL_CONST_CGSM_CANADIAN_GALLON));
560
-
561
- rb_define_const(module, "UK_GALLON", rb_float_new(GSL_CONST_CGSM_UK_GALLON));
562
- rb_define_const(module, "KILOMETERS_PER_HOUR",
563
- rb_float_new(GSL_CONST_CGSM_MILES_PER_HOUR));
564
- rb_define_const(module, "MILES_PER_HOUR",
565
- rb_float_new(GSL_CONST_CGSM_KILOMETERS_PER_HOUR));
566
- rb_define_const(module, "KNOT", rb_float_new(GSL_CONST_CGSM_KNOT));
567
- rb_define_const(module, "POUND_MASS", rb_float_new(GSL_CONST_CGSM_POUND_MASS));
568
- rb_define_const(module, "POUND_OUNCE", rb_float_new(GSL_CONST_CGSM_OUNCE_MASS));
569
- rb_define_const(module, "POUND_TON", rb_float_new(GSL_CONST_CGSM_TON));
570
- rb_define_const(module, "POUND_METRIC_TON",
571
- rb_float_new(GSL_CONST_CGSM_METRIC_TON));
572
- rb_define_const(module, "POUND_UK_TON", rb_float_new(GSL_CONST_CGSM_UK_TON));
573
- rb_define_const(module, "POUND_TROY_OUNCE",
574
- rb_float_new(GSL_CONST_CGSM_TROY_OUNCE));
575
- rb_define_const(module, "CARAT", rb_float_new(GSL_CONST_CGSM_CARAT));
576
- rb_define_const(module, "UNIFIED_ATOMIC_MASS",
577
- rb_float_new(GSL_CONST_CGSM_UNIFIED_ATOMIC_MASS));
578
- rb_define_const(module, "GRAM_FORCE", rb_float_new(GSL_CONST_CGSM_GRAM_FORCE));
579
- rb_define_const(module, "POUND_FORCE", rb_float_new(GSL_CONST_CGSM_POUND_FORCE));
580
- rb_define_const(module, "KILOPOUND_FORCE",
581
- rb_float_new(GSL_CONST_CGSM_KILOPOUND_FORCE));
582
- rb_define_const(module, "POUNDAL", rb_float_new(GSL_CONST_CGSM_POUNDAL));
583
- rb_define_const(module, "CALORIE", rb_float_new(GSL_CONST_CGSM_CALORIE));
584
- rb_define_const(module, "BTU", rb_float_new(GSL_CONST_CGSM_BTU));
585
- rb_define_const(module, "THERM", rb_float_new(GSL_CONST_CGSM_THERM));
586
- rb_define_const(module, "HORSEPOWER", rb_float_new(GSL_CONST_CGSM_HORSEPOWER));
587
- rb_define_const(module, "BAR", rb_float_new(GSL_CONST_CGSM_BAR));
588
- rb_define_const(module, "STD_ATMOSPHERE",
589
- rb_float_new(GSL_CONST_CGSM_STD_ATMOSPHERE));
590
- rb_define_const(module, "TORR", rb_float_new(GSL_CONST_CGSM_TORR));
591
- rb_define_const(module, "METER_OF_MERCURY",
592
- rb_float_new(GSL_CONST_CGSM_METER_OF_MERCURY));
593
- rb_define_const(module, "INCH_OF_MERCURY",
594
- rb_float_new(GSL_CONST_CGSM_INCH_OF_MERCURY));
595
- rb_define_const(module, "INCH_OF_WATER",
596
- rb_float_new(GSL_CONST_CGSM_INCH_OF_WATER));
597
- rb_define_const(module, "PSI", rb_float_new(GSL_CONST_CGSM_PSI));
598
- rb_define_const(module, "POISE", rb_float_new(GSL_CONST_CGSM_POISE));
599
- rb_define_const(module, "STOKES", rb_float_new(GSL_CONST_CGSM_STOKES));
600
- rb_define_const(module, "FARADAY", rb_float_new(GSL_CONST_CGSM_FARADAY));
601
- rb_define_const(module, "ELECTRON_CHARGE",
602
- rb_float_new(GSL_CONST_CGSM_ELECTRON_CHARGE));
603
- rb_define_const(module, "ELECTRON_CHARGE_ESU",
604
- rb_float_new(GSL_CONST_CGSM_ELECTRON_CHARGE*GSL_CONST_CGSM_SPEED_OF_LIGHT));
605
- #ifndef GSL_1_13_LATER
606
- rb_define_const(module, "GAUSS", rb_float_new(GSL_CONST_CGSM_GAUSS));
607
- #endif
608
- rb_define_const(module, "STILB", rb_float_new(GSL_CONST_CGSM_STILB));
609
- rb_define_const(module, "LUMEN", rb_float_new(GSL_CONST_CGSM_LUMEN));
610
- rb_define_const(module, "LUX", rb_float_new(GSL_CONST_CGSM_LUX));
611
- rb_define_const(module, "PHOT", rb_float_new(GSL_CONST_CGSM_PHOT));
612
- rb_define_const(module, "FOOTCANDLE", rb_float_new(GSL_CONST_CGSM_FOOTCANDLE));
613
- rb_define_const(module, "LAMBERT", rb_float_new(GSL_CONST_CGSM_LAMBERT));
614
- rb_define_const(module, "CURIE", rb_float_new(GSL_CONST_CGSM_CURIE));
615
- rb_define_const(module, "ROENTGEN", rb_float_new(GSL_CONST_CGSM_ROENTGEN));
616
- rb_define_const(module, "RAD", rb_float_new(GSL_CONST_CGSM_RAD));
617
- rb_define_const(module, "SOLAR_MASS", rb_float_new(GSL_CONST_CGSM_SOLAR_MASS));
618
-
619
- rb_define_const(module, "BOLTZMANN", rb_float_new(GSL_CONST_CGSM_BOLTZMANN));
620
- rb_define_const(module, "MOLAR_GAS", rb_float_new(GSL_CONST_CGSM_MOLAR_GAS));
621
-
622
- rb_define_const(module, "BOHR_RADIUS", rb_float_new(GSL_CONST_CGSM_BOHR_RADIUS));
623
- rb_define_const(module, "NEWTON", rb_float_new(GSL_CONST_CGSM_NEWTON));
624
- rb_define_const(module, "DYNE", rb_float_new(GSL_CONST_CGSM_DYNE));
625
- rb_define_const(module, "JOULE", rb_float_new(GSL_CONST_CGSM_JOULE));
626
- rb_define_const(module, "ERG", rb_float_new(GSL_CONST_CGSM_ERG));
627
-
628
- #ifdef GSL_1_4_9_LATER
629
- rb_define_const(module, "STEFAN_BOLTZMANN_CONSTANT",
630
- rb_float_new(GSL_CONST_CGSM_STEFAN_BOLTZMANN_CONSTANT));
631
- rb_define_const(module, "THOMSON_CROSS_SECTION",
632
- rb_float_new(GSL_CONST_CGSM_THOMSON_CROSS_SECTION));
633
- #endif
634
- }
635
-
636
- static void rb_gsl_const_num(VALUE module)
637
- {
638
- rb_define_const(module, "AVOGADRO", rb_float_new(GSL_CONST_NUM_AVOGADRO));
639
- rb_define_const(module, "FINE_STRUCTURE",
640
- rb_float_new(GSL_CONST_NUM_FINE_STRUCTURE));
641
- rb_define_const(module, "YOTTA", rb_float_new(GSL_CONST_NUM_YOTTA));
642
- rb_define_const(module, "ZETTA", rb_float_new(GSL_CONST_NUM_ZETTA));
643
- rb_define_const(module, "EXA", rb_float_new(GSL_CONST_NUM_EXA));
644
- rb_define_const(module, "PETA", rb_float_new(GSL_CONST_NUM_PETA));
645
- rb_define_const(module, "TERA", rb_float_new(GSL_CONST_NUM_TERA));
646
- rb_define_const(module, "GIGA", rb_float_new(GSL_CONST_NUM_GIGA));
647
- rb_define_const(module, "MEGA", rb_float_new(GSL_CONST_NUM_MEGA));
648
- rb_define_const(module, "KILO", rb_float_new(GSL_CONST_NUM_KILO));
649
- rb_define_const(module, "MILLI", rb_float_new(GSL_CONST_NUM_MILLI));
650
- rb_define_const(module, "MICRO", rb_float_new(GSL_CONST_NUM_MICRO));
651
- rb_define_const(module, "NANO", rb_float_new(GSL_CONST_NUM_NANO));
652
- rb_define_const(module, "PICO", rb_float_new(GSL_CONST_NUM_PICO));
653
- rb_define_const(module, "FEMTO", rb_float_new(GSL_CONST_NUM_FEMTO));
654
- rb_define_const(module, "ATTO", rb_float_new(GSL_CONST_NUM_ATTO));
655
- rb_define_const(module, "ZEPTO", rb_float_new(GSL_CONST_NUM_ZEPTO));
656
- rb_define_const(module, "YOCTO", rb_float_new(GSL_CONST_NUM_YOCTO));
657
- }
658
-
659
- void Init_gsl_const(VALUE module)
660
- {
661
- VALUE mgsl_const;
662
- VALUE mgsl_const_mks, mgsl_const_cgs, mgsl_const_num;
663
-
664
- mgsl_const = rb_define_module_under(module, "CONST");
665
- mgsl_const_mks = rb_define_module_under(mgsl_const, "MKSA");
666
- rb_gsl_const_mks(mgsl_const_mks);
667
- mgsl_const_cgs = rb_define_module_under(mgsl_const, "CGSM");
668
- rb_gsl_const_cgs(mgsl_const_cgs);
669
- mgsl_const_num = rb_define_module_under(mgsl_const, "NUM");
670
- rb_gsl_const_num(mgsl_const_num);
671
- Init_gsl_const_additional(mgsl_const_mks, mgsl_const_cgs, mgsl_const_num);
672
- }
673
- #endif