romanbsd-gsl 1.11.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (156) hide show
  1. data/README.rdoc +29 -0
  2. data/Rakefile +54 -0
  3. data/VERSION +1 -0
  4. data/ext/MANIFEST +116 -0
  5. data/ext/array.c +665 -0
  6. data/ext/array_complex.c +247 -0
  7. data/ext/blas.c +29 -0
  8. data/ext/blas1.c +729 -0
  9. data/ext/blas2.c +1093 -0
  10. data/ext/blas3.c +881 -0
  11. data/ext/block.c +44 -0
  12. data/ext/block_source.c +885 -0
  13. data/ext/bspline.c +116 -0
  14. data/ext/bundle.c +3 -0
  15. data/ext/cdf.c +754 -0
  16. data/ext/cheb.c +538 -0
  17. data/ext/combination.c +283 -0
  18. data/ext/common.c +310 -0
  19. data/ext/complex.c +1005 -0
  20. data/ext/const.c +668 -0
  21. data/ext/const_additional.c +120 -0
  22. data/ext/cqp.c +283 -0
  23. data/ext/deriv.c +194 -0
  24. data/ext/dht.c +360 -0
  25. data/ext/diff.c +165 -0
  26. data/ext/dirac.c +395 -0
  27. data/ext/eigen.c +2373 -0
  28. data/ext/error.c +194 -0
  29. data/ext/extconf.rb +272 -0
  30. data/ext/fcmp.c +66 -0
  31. data/ext/fft.c +1092 -0
  32. data/ext/fit.c +205 -0
  33. data/ext/fresnel.c +312 -0
  34. data/ext/function.c +522 -0
  35. data/ext/graph.c +1634 -0
  36. data/ext/gsl.c +265 -0
  37. data/ext/gsl_narray.c +652 -0
  38. data/ext/histogram.c +1717 -0
  39. data/ext/histogram2d.c +1067 -0
  40. data/ext/histogram3d.c +883 -0
  41. data/ext/histogram3d_source.c +750 -0
  42. data/ext/histogram_find.c +101 -0
  43. data/ext/histogram_oper.c +159 -0
  44. data/ext/ieee.c +98 -0
  45. data/ext/integration.c +1138 -0
  46. data/ext/interp.c +511 -0
  47. data/ext/jacobi.c +737 -0
  48. data/ext/linalg.c +4045 -0
  49. data/ext/linalg_complex.c +743 -0
  50. data/ext/math.c +724 -0
  51. data/ext/matrix.c +39 -0
  52. data/ext/matrix_complex.c +1731 -0
  53. data/ext/matrix_double.c +560 -0
  54. data/ext/matrix_int.c +256 -0
  55. data/ext/matrix_source.c +2678 -0
  56. data/ext/min.c +234 -0
  57. data/ext/monte.c +759 -0
  58. data/ext/multifit.c +1810 -0
  59. data/ext/multimin.c +793 -0
  60. data/ext/multimin_fsdf.c +156 -0
  61. data/ext/multiroots.c +952 -0
  62. data/ext/ndlinear.c +320 -0
  63. data/ext/nmf.c +159 -0
  64. data/ext/nmf_wrap.c +63 -0
  65. data/ext/ntuple.c +469 -0
  66. data/ext/odeiv.c +958 -0
  67. data/ext/ool.c +879 -0
  68. data/ext/oper_complex_source.c +253 -0
  69. data/ext/permutation.c +596 -0
  70. data/ext/poly.c +42 -0
  71. data/ext/poly2.c +265 -0
  72. data/ext/poly_source.c +1799 -0
  73. data/ext/qrng.c +171 -0
  74. data/ext/randist.c +1869 -0
  75. data/ext/rational.c +480 -0
  76. data/ext/rng.c +612 -0
  77. data/ext/root.c +408 -0
  78. data/ext/sf.c +1494 -0
  79. data/ext/sf_airy.c +200 -0
  80. data/ext/sf_bessel.c +867 -0
  81. data/ext/sf_clausen.c +28 -0
  82. data/ext/sf_coulomb.c +206 -0
  83. data/ext/sf_coupling.c +118 -0
  84. data/ext/sf_dawson.c +29 -0
  85. data/ext/sf_debye.c +157 -0
  86. data/ext/sf_dilog.c +42 -0
  87. data/ext/sf_elementary.c +44 -0
  88. data/ext/sf_ellint.c +206 -0
  89. data/ext/sf_elljac.c +29 -0
  90. data/ext/sf_erfc.c +93 -0
  91. data/ext/sf_exp.c +164 -0
  92. data/ext/sf_expint.c +211 -0
  93. data/ext/sf_fermi_dirac.c +148 -0
  94. data/ext/sf_gamma.c +344 -0
  95. data/ext/sf_gegenbauer.c +96 -0
  96. data/ext/sf_hyperg.c +197 -0
  97. data/ext/sf_laguerre.c +112 -0
  98. data/ext/sf_lambert.c +47 -0
  99. data/ext/sf_legendre.c +367 -0
  100. data/ext/sf_log.c +104 -0
  101. data/ext/sf_mathieu.c +238 -0
  102. data/ext/sf_power.c +46 -0
  103. data/ext/sf_psi.c +98 -0
  104. data/ext/sf_synchrotron.c +48 -0
  105. data/ext/sf_transport.c +76 -0
  106. data/ext/sf_trigonometric.c +207 -0
  107. data/ext/sf_zeta.c +119 -0
  108. data/ext/signal.c +310 -0
  109. data/ext/siman.c +718 -0
  110. data/ext/sort.c +208 -0
  111. data/ext/spline.c +393 -0
  112. data/ext/stats.c +799 -0
  113. data/ext/sum.c +168 -0
  114. data/ext/tamu_anova.c +56 -0
  115. data/ext/tensor.c +38 -0
  116. data/ext/tensor_source.c +1121 -0
  117. data/ext/vector.c +38 -0
  118. data/ext/vector_complex.c +2139 -0
  119. data/ext/vector_double.c +1445 -0
  120. data/ext/vector_int.c +204 -0
  121. data/ext/vector_source.c +3325 -0
  122. data/ext/wavelet.c +937 -0
  123. data/include/rb_gsl.h +140 -0
  124. data/include/rb_gsl_array.h +230 -0
  125. data/include/rb_gsl_cheb.h +21 -0
  126. data/include/rb_gsl_common.h +343 -0
  127. data/include/rb_gsl_complex.h +25 -0
  128. data/include/rb_gsl_const.h +29 -0
  129. data/include/rb_gsl_dirac.h +15 -0
  130. data/include/rb_gsl_eigen.h +17 -0
  131. data/include/rb_gsl_fft.h +62 -0
  132. data/include/rb_gsl_fit.h +25 -0
  133. data/include/rb_gsl_function.h +27 -0
  134. data/include/rb_gsl_graph.h +70 -0
  135. data/include/rb_gsl_histogram.h +65 -0
  136. data/include/rb_gsl_histogram3d.h +97 -0
  137. data/include/rb_gsl_integration.h +17 -0
  138. data/include/rb_gsl_interp.h +46 -0
  139. data/include/rb_gsl_linalg.h +25 -0
  140. data/include/rb_gsl_math.h +26 -0
  141. data/include/rb_gsl_odeiv.h +21 -0
  142. data/include/rb_gsl_poly.h +71 -0
  143. data/include/rb_gsl_rational.h +37 -0
  144. data/include/rb_gsl_rng.h +21 -0
  145. data/include/rb_gsl_root.h +22 -0
  146. data/include/rb_gsl_sf.h +119 -0
  147. data/include/rb_gsl_statistics.h +17 -0
  148. data/include/rb_gsl_tensor.h +45 -0
  149. data/include/rb_gsl_with_narray.h +22 -0
  150. data/include/templates_off.h +87 -0
  151. data/include/templates_on.h +241 -0
  152. data/lib/gsl/gnuplot.rb +41 -0
  153. data/lib/gsl/oper.rb +68 -0
  154. data/lib/ool.rb +22 -0
  155. data/lib/ool/conmin.rb +30 -0
  156. metadata +221 -0
data/ext/const.c ADDED
@@ -0,0 +1,668 @@
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
+ rb_define_const(module, "NUCLEAR_MAGNETON",
192
+ rb_float_new(GSL_CONST_CGS_NUCLEAR_MAGNETON));
193
+ rb_define_const(module, "ELECTRON_MAGNETIC_MOMENT",
194
+ rb_float_new(GSL_CONST_CGS_ELECTRON_MAGNETIC_MOMENT));
195
+ rb_define_const(module, "PROTON_MAGNETIC_MOMENT",
196
+ rb_float_new(GSL_CONST_CGS_PROTON_MAGNETIC_MOMENT));
197
+ rb_define_const(module, "STANDARD_GAS_VOLUME",
198
+ rb_float_new(GSL_CONST_CGS_STANDARD_GAS_VOLUME));
199
+
200
+ rb_define_const(module, "MINUTE", rb_float_new(GSL_CONST_CGS_MINUTE));
201
+ rb_define_const(module, "HOUR", rb_float_new(GSL_CONST_CGS_HOUR));
202
+ rb_define_const(module, "DAY", rb_float_new(GSL_CONST_CGS_DAY));
203
+ rb_define_const(module, "WEEK", rb_float_new(GSL_CONST_CGS_WEEK));
204
+ rb_define_const(module, "INCH", rb_float_new(GSL_CONST_CGS_INCH));
205
+ rb_define_const(module, "FOOT", rb_float_new(GSL_CONST_CGS_FOOT));
206
+ rb_define_const(module, "YARD", rb_float_new(GSL_CONST_CGS_YARD));
207
+ rb_define_const(module, "MILE", rb_float_new(GSL_CONST_CGS_MILE));
208
+ rb_define_const(module, "NAUTICAL_MILE",
209
+ rb_float_new(GSL_CONST_CGS_NAUTICAL_MILE));
210
+ rb_define_const(module, "FATHOM", rb_float_new(GSL_CONST_CGS_FATHOM));
211
+ rb_define_const(module, "MIL", rb_float_new(GSL_CONST_CGS_MIL));
212
+ rb_define_const(module, "POINT", rb_float_new(GSL_CONST_CGS_POINT));
213
+ rb_define_const(module, "TEXPOINT", rb_float_new(GSL_CONST_CGS_TEXPOINT));
214
+ rb_define_const(module, "MICRON", rb_float_new(GSL_CONST_CGS_MICRON));
215
+ rb_define_const(module, "ANGSTROM", rb_float_new(GSL_CONST_CGS_ANGSTROM));
216
+ rb_define_const(module, "HECTARE", rb_float_new(GSL_CONST_CGS_HECTARE));
217
+ rb_define_const(module, "ACRE", rb_float_new(GSL_CONST_CGS_ACRE));
218
+ #ifdef GSL_0_9_4_LATER
219
+ rb_define_const(module, "BARN", rb_float_new(GSL_CONST_CGS_BARN));
220
+ rb_define_const(module, "BTU", rb_float_new(GSL_CONST_CGS_BTU));
221
+ rb_define_const(module, "SOLAR_MASS", rb_float_new(GSL_CONST_CGS_SOLAR_MASS));
222
+ #else
223
+ rb_define_const(module, "BARN", rb_float_new(1e-24));
224
+ rb_define_const(module, "BTU", rb_float_new(1.05505585262e10));
225
+ #endif
226
+ rb_define_const(module, "LITER", rb_float_new(GSL_CONST_CGS_LITER));
227
+ rb_define_const(module, "US_GALLON", rb_float_new(GSL_CONST_CGS_US_GALLON));
228
+ rb_define_const(module, "QUART", rb_float_new(GSL_CONST_CGS_QUART));
229
+ rb_define_const(module, "PINT", rb_float_new(GSL_CONST_CGS_PINT));
230
+ rb_define_const(module, "CUP", rb_float_new(GSL_CONST_CGS_CUP));
231
+ rb_define_const(module, "FLUID_OUNCE", rb_float_new(GSL_CONST_CGS_FLUID_OUNCE));
232
+ rb_define_const(module, "TABLESPOON", rb_float_new(GSL_CONST_CGS_TABLESPOON));
233
+ rb_define_const(module, "CANADIAN_GALLON",
234
+ rb_float_new(GSL_CONST_CGS_CANADIAN_GALLON));
235
+
236
+ rb_define_const(module, "UK_GALLON", rb_float_new(GSL_CONST_CGS_UK_GALLON));
237
+ rb_define_const(module, "KILOMETERS_PER_HOUR",
238
+ rb_float_new(GSL_CONST_CGS_MILES_PER_HOUR));
239
+ rb_define_const(module, "MILES_PER_HOUR",
240
+ rb_float_new(GSL_CONST_CGS_KILOMETERS_PER_HOUR));
241
+ rb_define_const(module, "KNOT", rb_float_new(GSL_CONST_CGS_KNOT));
242
+ rb_define_const(module, "POUND_MASS", rb_float_new(GSL_CONST_CGS_POUND_MASS));
243
+ rb_define_const(module, "POUND_OUNCE", rb_float_new(GSL_CONST_CGS_OUNCE_MASS));
244
+ rb_define_const(module, "POUND_TON", rb_float_new(GSL_CONST_CGS_TON));
245
+ rb_define_const(module, "POUND_METRIC_TON",
246
+ rb_float_new(GSL_CONST_CGS_METRIC_TON));
247
+ rb_define_const(module, "POUND_UK_TON", rb_float_new(GSL_CONST_CGS_UK_TON));
248
+ rb_define_const(module, "POUND_TROY_OUNCE",
249
+ rb_float_new(GSL_CONST_CGS_TROY_OUNCE));
250
+ rb_define_const(module, "CARAT", rb_float_new(GSL_CONST_CGS_CARAT));
251
+ rb_define_const(module, "UNIFIED_ATOMIC_MASS",
252
+ rb_float_new(GSL_CONST_CGS_UNIFIED_ATOMIC_MASS));
253
+ rb_define_const(module, "GRAM_FORCE", rb_float_new(GSL_CONST_CGS_GRAM_FORCE));
254
+ rb_define_const(module, "POUND_FORCE", rb_float_new(GSL_CONST_CGS_POUND_FORCE));
255
+ rb_define_const(module, "KILOPOUND_FORCE",
256
+ rb_float_new(GSL_CONST_CGS_KILOPOUND_FORCE));
257
+ rb_define_const(module, "POUNDAL", rb_float_new(GSL_CONST_CGS_POUNDAL));
258
+ rb_define_const(module, "CALORIE", rb_float_new(GSL_CONST_CGS_CALORIE));
259
+ rb_define_const(module, "THERM", rb_float_new(GSL_CONST_CGS_THERM));
260
+ rb_define_const(module, "HORSEPOWER", rb_float_new(GSL_CONST_CGS_HORSEPOWER));
261
+ rb_define_const(module, "BAR", rb_float_new(GSL_CONST_CGS_BAR));
262
+ rb_define_const(module, "STD_ATMOSPHERE",
263
+ rb_float_new(GSL_CONST_CGS_STD_ATMOSPHERE));
264
+ rb_define_const(module, "TORR", rb_float_new(GSL_CONST_CGS_TORR));
265
+ rb_define_const(module, "METER_OF_MERCURY",
266
+ rb_float_new(GSL_CONST_CGS_METER_OF_MERCURY));
267
+ rb_define_const(module, "INCH_OF_MERCURY",
268
+ rb_float_new(GSL_CONST_CGS_INCH_OF_MERCURY));
269
+ rb_define_const(module, "INCH_OF_WATER",
270
+ rb_float_new(GSL_CONST_CGS_INCH_OF_WATER));
271
+ rb_define_const(module, "PSI", rb_float_new(GSL_CONST_CGS_PSI));
272
+ rb_define_const(module, "POISE", rb_float_new(GSL_CONST_CGS_POISE));
273
+ rb_define_const(module, "STOKES", rb_float_new(GSL_CONST_CGS_STOKES));
274
+ rb_define_const(module, "FARADAY", rb_float_new(GSL_CONST_CGS_FARADAY));
275
+ rb_define_const(module, "ELECTRON_CHARGE",
276
+ rb_float_new(GSL_CONST_CGS_ELECTRON_CHARGE));
277
+ rb_define_const(module, "ELECTRON_CHARGE_ESU",
278
+ rb_float_new(GSL_CONST_CGS_ELECTRON_CHARGE*GSL_CONST_CGS_SPEED_OF_LIGHT));
279
+ rb_define_const(module, "GAUSS", rb_float_new(GSL_CONST_CGS_GAUSS));
280
+ rb_define_const(module, "STILB", rb_float_new(GSL_CONST_CGS_STILB));
281
+ rb_define_const(module, "LUMEN", rb_float_new(GSL_CONST_CGS_LUMEN));
282
+ rb_define_const(module, "LUX", rb_float_new(GSL_CONST_CGS_LUX));
283
+ rb_define_const(module, "PHOT", rb_float_new(GSL_CONST_CGS_PHOT));
284
+ rb_define_const(module, "FOOTCANDLE", rb_float_new(GSL_CONST_CGS_FOOTCANDLE));
285
+ rb_define_const(module, "LAMBERT", rb_float_new(GSL_CONST_CGS_LAMBERT));
286
+ rb_define_const(module, "CURIE", rb_float_new(GSL_CONST_CGS_CURIE));
287
+ rb_define_const(module, "ROENTGEN", rb_float_new(GSL_CONST_CGS_ROENTGEN));
288
+ rb_define_const(module, "RAD", rb_float_new(GSL_CONST_CGS_RAD));
289
+
290
+ rb_define_const(module, "BOLTZMANN", rb_float_new(GSL_CONST_CGS_BOLTZMANN));
291
+ rb_define_const(module, "MOLAR_GAS", rb_float_new(GSL_CONST_CGS_MOLAR_GAS));
292
+
293
+ #ifdef GSL_1_1_LATER
294
+ rb_define_const(module, "BOHR_RADIUS", rb_float_new(GSL_CONST_CGS_BOHR_RADIUS));
295
+ #endif
296
+ #ifdef GSL_1_2_LATER
297
+ rb_define_const(module, "NEWTON", rb_float_new(GSL_CONST_CGS_NEWTON));
298
+ rb_define_const(module, "DYNE", rb_float_new(GSL_CONST_CGS_DYNE));
299
+ rb_define_const(module, "JOULE", rb_float_new(GSL_CONST_CGS_JOULE));
300
+ rb_define_const(module, "ERG", rb_float_new(GSL_CONST_CGS_ERG));
301
+ #endif
302
+
303
+ }
304
+
305
+ static void rb_gsl_const_num(VALUE module)
306
+ {
307
+ rb_define_const(module, "AVOGADRO", rb_float_new(GSL_CONST_NUM_AVOGADRO));
308
+ rb_define_const(module, "FINE_STRUCTURE",
309
+ rb_float_new(GSL_CONST_NUM_FINE_STRUCTURE));
310
+ #ifdef GSL_1_2_LATER
311
+ rb_define_const(module, "YOTTA", rb_float_new(GSL_CONST_NUM_YOTTA));
312
+ rb_define_const(module, "ZETTA", rb_float_new(GSL_CONST_NUM_ZETTA));
313
+ rb_define_const(module, "EXA", rb_float_new(GSL_CONST_NUM_EXA));
314
+ rb_define_const(module, "PETA", rb_float_new(GSL_CONST_NUM_PETA));
315
+ rb_define_const(module, "TERA", rb_float_new(GSL_CONST_NUM_TERA));
316
+ rb_define_const(module, "GIGA", rb_float_new(GSL_CONST_NUM_GIGA));
317
+ rb_define_const(module, "MEGA", rb_float_new(GSL_CONST_NUM_MEGA));
318
+ rb_define_const(module, "KILO", rb_float_new(GSL_CONST_NUM_KILO));
319
+ rb_define_const(module, "MILLI", rb_float_new(GSL_CONST_NUM_MILLI));
320
+ rb_define_const(module, "MICRO", rb_float_new(GSL_CONST_NUM_MICRO));
321
+ rb_define_const(module, "NANO", rb_float_new(GSL_CONST_NUM_NANO));
322
+ rb_define_const(module, "PICO", rb_float_new(GSL_CONST_NUM_PICO));
323
+ rb_define_const(module, "FEMTO", rb_float_new(GSL_CONST_NUM_FEMTO));
324
+ rb_define_const(module, "ATTO", rb_float_new(GSL_CONST_NUM_ATTO));
325
+ rb_define_const(module, "ZEPTO", rb_float_new(GSL_CONST_NUM_ZEPTO));
326
+ rb_define_const(module, "YOCTO", rb_float_new(GSL_CONST_NUM_YOCTO));
327
+ #endif
328
+ }
329
+
330
+ void Init_gsl_const(VALUE module)
331
+ {
332
+ VALUE mgsl_const;
333
+ VALUE mgsl_const_mks, mgsl_const_cgs, mgsl_const_num;
334
+
335
+ mgsl_const = rb_define_module_under(module, "CONST");
336
+ mgsl_const_mks = rb_define_module_under(mgsl_const, "MKSA");
337
+ rb_gsl_const_mks(mgsl_const_mks);
338
+ mgsl_const_cgs = rb_define_module_under(mgsl_const, "CGSM");
339
+ rb_gsl_const_cgs(mgsl_const_cgs);
340
+ mgsl_const_num = rb_define_module_under(mgsl_const, "NUM");
341
+ rb_gsl_const_num(mgsl_const_num);
342
+ Init_gsl_const_additional(mgsl_const_mks, mgsl_const_cgs, mgsl_const_num);
343
+ }
344
+
345
+ #else
346
+
347
+ static void rb_gsl_const_mks(VALUE module)
348
+ {
349
+ rb_define_const(module, "SPEED_OF_LIGHT",
350
+ rb_float_new(GSL_CONST_MKSA_SPEED_OF_LIGHT));
351
+ rb_define_const(module, "GRAVITATIONAL_CONSTANT",
352
+ rb_float_new(GSL_CONST_MKSA_GRAVITATIONAL_CONSTANT));
353
+ rb_define_const(module, "PLANCKS_CONSTANT_H",
354
+ rb_float_new(GSL_CONST_MKSA_PLANCKS_CONSTANT_H));
355
+ rb_define_const(module, "PLANCKS_CONSTANT_HBAR",
356
+ rb_float_new(GSL_CONST_MKSA_PLANCKS_CONSTANT_HBAR));
357
+ rb_define_const(module, "VACUUM_PERMEABILITY",
358
+ rb_float_new(GSL_CONST_MKSA_VACUUM_PERMEABILITY));
359
+ rb_define_const(module, "VACUUM_PERMITTIVITY",
360
+ rb_float_new(GSL_CONST_MKSA_VACUUM_PERMITTIVITY));
361
+ rb_define_const(module, "ASTRONOMICAL_UNIT",
362
+ rb_float_new(GSL_CONST_MKSA_ASTRONOMICAL_UNIT));
363
+ rb_define_const(module, "LIGHT_YEAR", rb_float_new(GSL_CONST_MKSA_LIGHT_YEAR));
364
+ rb_define_const(module, "PARSEC", rb_float_new(GSL_CONST_MKSA_PARSEC));
365
+ rb_define_const(module, "GRAV_ACCEL", rb_float_new(GSL_CONST_MKSA_GRAV_ACCEL));
366
+ rb_define_const(module, "ELECTRON_VOLT",
367
+ rb_float_new(GSL_CONST_MKSA_ELECTRON_VOLT));
368
+ rb_define_const(module, "MASS_ELECTRON",
369
+ rb_float_new(GSL_CONST_MKSA_MASS_ELECTRON));
370
+ rb_define_const(module, "MASS_MUON", rb_float_new(GSL_CONST_MKSA_MASS_MUON));
371
+ rb_define_const(module, "MASS_PROTON", rb_float_new(GSL_CONST_MKSA_MASS_PROTON));
372
+ rb_define_const(module, "MASS_NEUTRON", rb_float_new(GSL_CONST_MKSA_MASS_NEUTRON));
373
+ rb_define_const(module, "RYDBERG", rb_float_new(GSL_CONST_MKSA_RYDBERG));
374
+ rb_define_const(module, "BOHR_MAGNETON",
375
+ rb_float_new(GSL_CONST_MKSA_BOHR_MAGNETON));
376
+ rb_define_const(module, "NUCLEAR_MAGNETON",
377
+ rb_float_new(GSL_CONST_MKSA_NUCLEAR_MAGNETON));
378
+ rb_define_const(module, "ELECTRON_MAGNETIC_MOMENT",
379
+ rb_float_new(GSL_CONST_MKSA_ELECTRON_MAGNETIC_MOMENT));
380
+ rb_define_const(module, "PROTON_MAGNETIC_MOMENT",
381
+ rb_float_new(GSL_CONST_MKSA_PROTON_MAGNETIC_MOMENT));
382
+ rb_define_const(module, "STANDARD_GAS_VOLUME",
383
+ rb_float_new(GSL_CONST_MKSA_STANDARD_GAS_VOLUME));
384
+
385
+ rb_define_const(module, "MINUTE", rb_float_new(GSL_CONST_MKSA_MINUTE));
386
+ rb_define_const(module, "HOUR", rb_float_new(GSL_CONST_MKSA_HOUR));
387
+ rb_define_const(module, "DAY", rb_float_new(GSL_CONST_MKSA_DAY));
388
+ rb_define_const(module, "WEEK", rb_float_new(GSL_CONST_MKSA_WEEK));
389
+ rb_define_const(module, "INCH", rb_float_new(GSL_CONST_MKSA_INCH));
390
+ rb_define_const(module, "FOOT", rb_float_new(GSL_CONST_MKSA_FOOT));
391
+ rb_define_const(module, "YARD", rb_float_new(GSL_CONST_MKSA_YARD));
392
+ rb_define_const(module, "MILE", rb_float_new(GSL_CONST_MKSA_MILE));
393
+ rb_define_const(module, "NAUTICAL_MILE",
394
+ rb_float_new(GSL_CONST_MKSA_NAUTICAL_MILE));
395
+ rb_define_const(module, "FATHOM", rb_float_new(GSL_CONST_MKSA_FATHOM));
396
+ rb_define_const(module, "MIL", rb_float_new(GSL_CONST_MKSA_MIL));
397
+ rb_define_const(module, "POINT", rb_float_new(GSL_CONST_MKSA_POINT));
398
+ rb_define_const(module, "TEXPOINT", rb_float_new(GSL_CONST_MKSA_TEXPOINT));
399
+ rb_define_const(module, "MICRON", rb_float_new(GSL_CONST_MKSA_MICRON));
400
+ rb_define_const(module, "ANGSTROM", rb_float_new(GSL_CONST_MKSA_ANGSTROM));
401
+ rb_define_const(module, "HECTARE", rb_float_new(GSL_CONST_MKSA_HECTARE));
402
+ rb_define_const(module, "ACRE", rb_float_new(GSL_CONST_MKSA_ACRE));
403
+ rb_define_const(module, "BARN", rb_float_new(GSL_CONST_MKSA_BARN));
404
+ rb_define_const(module, "LITER", rb_float_new(GSL_CONST_MKSA_LITER));
405
+ rb_define_const(module, "US_GALLON", rb_float_new(GSL_CONST_MKSA_US_GALLON));
406
+ rb_define_const(module, "QUART", rb_float_new(GSL_CONST_MKSA_QUART));
407
+ rb_define_const(module, "PINT", rb_float_new(GSL_CONST_MKSA_PINT));
408
+ rb_define_const(module, "CUP", rb_float_new(GSL_CONST_MKSA_CUP));
409
+ rb_define_const(module, "FLUID_OUNCE", rb_float_new(GSL_CONST_MKSA_FLUID_OUNCE));
410
+ rb_define_const(module, "TABLESPOON", rb_float_new(GSL_CONST_MKSA_TABLESPOON));
411
+ rb_define_const(module, "CANADIAN_GALLON",
412
+ rb_float_new(GSL_CONST_MKSA_CANADIAN_GALLON));
413
+
414
+ rb_define_const(module, "UK_GALLON", rb_float_new(GSL_CONST_MKSA_UK_GALLON));
415
+ rb_define_const(module, "KILOMETERS_PER_HOUR",
416
+ rb_float_new(GSL_CONST_MKSA_MILES_PER_HOUR));
417
+ rb_define_const(module, "MILES_PER_HOUR",
418
+ rb_float_new(GSL_CONST_MKSA_KILOMETERS_PER_HOUR));
419
+ rb_define_const(module, "KNOT", rb_float_new(GSL_CONST_MKSA_KNOT));
420
+ rb_define_const(module, "POUND_MASS", rb_float_new(GSL_CONST_MKSA_POUND_MASS));
421
+ rb_define_const(module, "POUND_OUNCE", rb_float_new(GSL_CONST_MKSA_OUNCE_MASS));
422
+ rb_define_const(module, "POUND_TON", rb_float_new(GSL_CONST_MKSA_TON));
423
+ rb_define_const(module, "POUND_METRIC_TON",
424
+ rb_float_new(GSL_CONST_MKSA_METRIC_TON));
425
+ rb_define_const(module, "POUND_UK_TON", rb_float_new(GSL_CONST_MKSA_UK_TON));
426
+ rb_define_const(module, "POUND_TROY_OUNCE",
427
+ rb_float_new(GSL_CONST_MKSA_TROY_OUNCE));
428
+ rb_define_const(module, "CARAT", rb_float_new(GSL_CONST_MKSA_CARAT));
429
+ rb_define_const(module, "UNIFIED_ATOMIC_MASS",
430
+ rb_float_new(GSL_CONST_MKSA_UNIFIED_ATOMIC_MASS));
431
+ rb_define_const(module, "GRAM_FORCE", rb_float_new(GSL_CONST_MKSA_GRAM_FORCE));
432
+ rb_define_const(module, "POUND_FORCE", rb_float_new(GSL_CONST_MKSA_POUND_FORCE));
433
+ rb_define_const(module, "KILOPOUND_FORCE",
434
+ rb_float_new(GSL_CONST_MKSA_KILOPOUND_FORCE));
435
+ rb_define_const(module, "POUNDAL", rb_float_new(GSL_CONST_MKSA_POUNDAL));
436
+ rb_define_const(module, "CALORIE", rb_float_new(GSL_CONST_MKSA_CALORIE));
437
+ rb_define_const(module, "BTU", rb_float_new(GSL_CONST_MKSA_BTU));
438
+ rb_define_const(module, "THERM", rb_float_new(GSL_CONST_MKSA_THERM));
439
+ rb_define_const(module, "HORSEPOWER", rb_float_new(GSL_CONST_MKSA_HORSEPOWER));
440
+ rb_define_const(module, "BAR", rb_float_new(GSL_CONST_MKSA_BAR));
441
+ rb_define_const(module, "STD_ATMOSPHERE",
442
+ rb_float_new(GSL_CONST_MKSA_STD_ATMOSPHERE));
443
+ rb_define_const(module, "TORR", rb_float_new(GSL_CONST_MKSA_TORR));
444
+ rb_define_const(module, "METER_OF_MERCURY",
445
+ rb_float_new(GSL_CONST_MKSA_METER_OF_MERCURY));
446
+ rb_define_const(module, "INCH_OF_MERCURY",
447
+ rb_float_new(GSL_CONST_MKSA_INCH_OF_MERCURY));
448
+ rb_define_const(module, "INCH_OF_WATER",
449
+ rb_float_new(GSL_CONST_MKSA_INCH_OF_WATER));
450
+ rb_define_const(module, "PSI", rb_float_new(GSL_CONST_MKSA_PSI));
451
+ rb_define_const(module, "POISE", rb_float_new(GSL_CONST_MKSA_POISE));
452
+ rb_define_const(module, "STOKES", rb_float_new(GSL_CONST_MKSA_STOKES));
453
+ rb_define_const(module, "FARADAY", rb_float_new(GSL_CONST_MKSA_FARADAY));
454
+ rb_define_const(module, "ELECTRON_CHARGE",
455
+ rb_float_new(GSL_CONST_MKSA_ELECTRON_CHARGE));
456
+ rb_define_const(module, "GAUSS", rb_float_new(GSL_CONST_MKSA_GAUSS));
457
+ rb_define_const(module, "STILB", rb_float_new(GSL_CONST_MKSA_STILB));
458
+ rb_define_const(module, "LUMEN", rb_float_new(GSL_CONST_MKSA_LUMEN));
459
+ rb_define_const(module, "LUX", rb_float_new(GSL_CONST_MKSA_LUX));
460
+ rb_define_const(module, "PHOT", rb_float_new(GSL_CONST_MKSA_PHOT));
461
+ rb_define_const(module, "FOOTCANDLE", rb_float_new(GSL_CONST_MKSA_FOOTCANDLE));
462
+ rb_define_const(module, "LAMBERT", rb_float_new(GSL_CONST_MKSA_LAMBERT));
463
+ rb_define_const(module, "CURIE", rb_float_new(GSL_CONST_MKSA_CURIE));
464
+ rb_define_const(module, "ROENTGEN", rb_float_new(GSL_CONST_MKSA_ROENTGEN));
465
+ rb_define_const(module, "RAD", rb_float_new(GSL_CONST_MKSA_RAD));
466
+ rb_define_const(module, "SOLAR_MASS", rb_float_new(GSL_CONST_MKSA_SOLAR_MASS));
467
+
468
+ rb_define_const(module, "BOLTZMANN", rb_float_new(GSL_CONST_MKSA_BOLTZMANN));
469
+ rb_define_const(module, "MOLAR_GAS", rb_float_new(GSL_CONST_MKSA_MOLAR_GAS));
470
+
471
+ rb_define_const(module, "BOHR_RADIUS", rb_float_new(GSL_CONST_MKSA_BOHR_RADIUS));
472
+ rb_define_const(module, "NEWTON", rb_float_new(GSL_CONST_MKSA_NEWTON));
473
+ rb_define_const(module, "DYNE", rb_float_new(GSL_CONST_MKSA_DYNE));
474
+ rb_define_const(module, "JOULE", rb_float_new(GSL_CONST_MKSA_JOULE));
475
+ rb_define_const(module, "ERG", rb_float_new(GSL_CONST_MKSA_ERG));
476
+
477
+ #ifdef GSL_1_4_9_LATER
478
+ rb_define_const(module, "STEFAN_BOLTZMANN_CONSTANT",
479
+ rb_float_new(GSL_CONST_MKSA_STEFAN_BOLTZMANN_CONSTANT));
480
+ rb_define_const(module, "THOMSON_CROSS_SECTION",
481
+ rb_float_new(GSL_CONST_MKSA_THOMSON_CROSS_SECTION));
482
+ #endif
483
+
484
+
485
+ #ifdef GSL_1_8_LATER
486
+ rb_define_const(module, "DEBYE", rb_float_new(GSL_CONST_MKSA_DEBYE));
487
+ #endif
488
+
489
+ }
490
+
491
+
492
+ static void rb_gsl_const_cgs(VALUE module)
493
+ {
494
+ rb_define_const(module, "SPEED_OF_LIGHT",
495
+ rb_float_new(GSL_CONST_CGSM_SPEED_OF_LIGHT));
496
+ rb_define_const(module, "GRAVITATIONAL_CONSTANT",
497
+ rb_float_new(GSL_CONST_CGSM_GRAVITATIONAL_CONSTANT));
498
+ rb_define_const(module, "PLANCKS_CONSTANT_H",
499
+ rb_float_new(GSL_CONST_CGSM_PLANCKS_CONSTANT_H));
500
+ rb_define_const(module, "PLANCKS_CONSTANT_HBAR",
501
+ rb_float_new(GSL_CONST_CGSM_PLANCKS_CONSTANT_HBAR));
502
+ rb_define_const(module, "ASTRONOMICAL_UNIT",
503
+ rb_float_new(GSL_CONST_CGSM_ASTRONOMICAL_UNIT));
504
+ rb_define_const(module, "LIGHT_YEAR",
505
+ rb_float_new(GSL_CONST_CGSM_LIGHT_YEAR));
506
+ rb_define_const(module, "PARSEC",
507
+ rb_float_new(GSL_CONST_CGSM_PARSEC));
508
+ rb_define_const(module, "GRAV_ACCEL",
509
+ rb_float_new(GSL_CONST_CGSM_GRAV_ACCEL));
510
+ rb_define_const(module, "ELECTRON_VOLT",
511
+ rb_float_new(GSL_CONST_CGSM_ELECTRON_VOLT));
512
+ rb_define_const(module, "MASS_ELECTRON",
513
+ rb_float_new(GSL_CONST_CGSM_MASS_ELECTRON));
514
+ rb_define_const(module, "MASS_MUON", rb_float_new(GSL_CONST_CGSM_MASS_MUON));
515
+ rb_define_const(module, "MASS_PROTON", rb_float_new(GSL_CONST_CGSM_MASS_PROTON));
516
+ rb_define_const(module, "MASS_NEUTRON", rb_float_new(GSL_CONST_CGSM_MASS_NEUTRON));
517
+ rb_define_const(module, "RYDBERG", rb_float_new(GSL_CONST_CGSM_RYDBERG));
518
+ rb_define_const(module, "BOHR_MAGNETON",
519
+ rb_float_new(GSL_CONST_CGSM_BOHR_MAGNETON));
520
+ rb_define_const(module, "NUCLEAR_MAGNETON",
521
+ rb_float_new(GSL_CONST_CGSM_NUCLEAR_MAGNETON));
522
+ rb_define_const(module, "ELECTRON_MAGNETIC_MOMENT",
523
+ rb_float_new(GSL_CONST_CGSM_ELECTRON_MAGNETIC_MOMENT));
524
+ rb_define_const(module, "PROTON_MAGNETIC_MOMENT",
525
+ rb_float_new(GSL_CONST_CGSM_PROTON_MAGNETIC_MOMENT));
526
+ rb_define_const(module, "STANDARD_GAS_VOLUME",
527
+ rb_float_new(GSL_CONST_CGSM_STANDARD_GAS_VOLUME));
528
+
529
+ rb_define_const(module, "MINUTE", rb_float_new(GSL_CONST_CGSM_MINUTE));
530
+ rb_define_const(module, "HOUR", rb_float_new(GSL_CONST_CGSM_HOUR));
531
+ rb_define_const(module, "DAY", rb_float_new(GSL_CONST_CGSM_DAY));
532
+ rb_define_const(module, "WEEK", rb_float_new(GSL_CONST_CGSM_WEEK));
533
+ rb_define_const(module, "INCH", rb_float_new(GSL_CONST_CGSM_INCH));
534
+ rb_define_const(module, "FOOT", rb_float_new(GSL_CONST_CGSM_FOOT));
535
+ rb_define_const(module, "YARD", rb_float_new(GSL_CONST_CGSM_YARD));
536
+ rb_define_const(module, "MILE", rb_float_new(GSL_CONST_CGSM_MILE));
537
+ rb_define_const(module, "NAUTICAL_MILE",
538
+ rb_float_new(GSL_CONST_CGSM_NAUTICAL_MILE));
539
+ rb_define_const(module, "FATHOM", rb_float_new(GSL_CONST_CGSM_FATHOM));
540
+ rb_define_const(module, "MIL", rb_float_new(GSL_CONST_CGSM_MIL));
541
+ rb_define_const(module, "POINT", rb_float_new(GSL_CONST_CGSM_POINT));
542
+ rb_define_const(module, "TEXPOINT", rb_float_new(GSL_CONST_CGSM_TEXPOINT));
543
+ rb_define_const(module, "MICRON", rb_float_new(GSL_CONST_CGSM_MICRON));
544
+ rb_define_const(module, "ANGSTROM", rb_float_new(GSL_CONST_CGSM_ANGSTROM));
545
+ rb_define_const(module, "HECTARE", rb_float_new(GSL_CONST_CGSM_HECTARE));
546
+ rb_define_const(module, "ACRE", rb_float_new(GSL_CONST_CGSM_ACRE));
547
+ rb_define_const(module, "BARN", rb_float_new(GSL_CONST_CGSM_BARN));
548
+ rb_define_const(module, "LITER", rb_float_new(GSL_CONST_CGSM_LITER));
549
+ rb_define_const(module, "US_GALLON", rb_float_new(GSL_CONST_CGSM_US_GALLON));
550
+ rb_define_const(module, "QUART", rb_float_new(GSL_CONST_CGSM_QUART));
551
+ rb_define_const(module, "PINT", rb_float_new(GSL_CONST_CGSM_PINT));
552
+ rb_define_const(module, "CUP", rb_float_new(GSL_CONST_CGSM_CUP));
553
+ rb_define_const(module, "FLUID_OUNCE", rb_float_new(GSL_CONST_CGSM_FLUID_OUNCE));
554
+ rb_define_const(module, "TABLESPOON", rb_float_new(GSL_CONST_CGSM_TABLESPOON));
555
+ rb_define_const(module, "CANADIAN_GALLON",
556
+ rb_float_new(GSL_CONST_CGSM_CANADIAN_GALLON));
557
+
558
+ rb_define_const(module, "UK_GALLON", rb_float_new(GSL_CONST_CGSM_UK_GALLON));
559
+ rb_define_const(module, "KILOMETERS_PER_HOUR",
560
+ rb_float_new(GSL_CONST_CGSM_MILES_PER_HOUR));
561
+ rb_define_const(module, "MILES_PER_HOUR",
562
+ rb_float_new(GSL_CONST_CGSM_KILOMETERS_PER_HOUR));
563
+ rb_define_const(module, "KNOT", rb_float_new(GSL_CONST_CGSM_KNOT));
564
+ rb_define_const(module, "POUND_MASS", rb_float_new(GSL_CONST_CGSM_POUND_MASS));
565
+ rb_define_const(module, "POUND_OUNCE", rb_float_new(GSL_CONST_CGSM_OUNCE_MASS));
566
+ rb_define_const(module, "POUND_TON", rb_float_new(GSL_CONST_CGSM_TON));
567
+ rb_define_const(module, "POUND_METRIC_TON",
568
+ rb_float_new(GSL_CONST_CGSM_METRIC_TON));
569
+ rb_define_const(module, "POUND_UK_TON", rb_float_new(GSL_CONST_CGSM_UK_TON));
570
+ rb_define_const(module, "POUND_TROY_OUNCE",
571
+ rb_float_new(GSL_CONST_CGSM_TROY_OUNCE));
572
+ rb_define_const(module, "CARAT", rb_float_new(GSL_CONST_CGSM_CARAT));
573
+ rb_define_const(module, "UNIFIED_ATOMIC_MASS",
574
+ rb_float_new(GSL_CONST_CGSM_UNIFIED_ATOMIC_MASS));
575
+ rb_define_const(module, "GRAM_FORCE", rb_float_new(GSL_CONST_CGSM_GRAM_FORCE));
576
+ rb_define_const(module, "POUND_FORCE", rb_float_new(GSL_CONST_CGSM_POUND_FORCE));
577
+ rb_define_const(module, "KILOPOUND_FORCE",
578
+ rb_float_new(GSL_CONST_CGSM_KILOPOUND_FORCE));
579
+ rb_define_const(module, "POUNDAL", rb_float_new(GSL_CONST_CGSM_POUNDAL));
580
+ rb_define_const(module, "CALORIE", rb_float_new(GSL_CONST_CGSM_CALORIE));
581
+ rb_define_const(module, "BTU", rb_float_new(GSL_CONST_CGSM_BTU));
582
+ rb_define_const(module, "THERM", rb_float_new(GSL_CONST_CGSM_THERM));
583
+ rb_define_const(module, "HORSEPOWER", rb_float_new(GSL_CONST_CGSM_HORSEPOWER));
584
+ rb_define_const(module, "BAR", rb_float_new(GSL_CONST_CGSM_BAR));
585
+ rb_define_const(module, "STD_ATMOSPHERE",
586
+ rb_float_new(GSL_CONST_CGSM_STD_ATMOSPHERE));
587
+ rb_define_const(module, "TORR", rb_float_new(GSL_CONST_CGSM_TORR));
588
+ rb_define_const(module, "METER_OF_MERCURY",
589
+ rb_float_new(GSL_CONST_CGSM_METER_OF_MERCURY));
590
+ rb_define_const(module, "INCH_OF_MERCURY",
591
+ rb_float_new(GSL_CONST_CGSM_INCH_OF_MERCURY));
592
+ rb_define_const(module, "INCH_OF_WATER",
593
+ rb_float_new(GSL_CONST_CGSM_INCH_OF_WATER));
594
+ rb_define_const(module, "PSI", rb_float_new(GSL_CONST_CGSM_PSI));
595
+ rb_define_const(module, "POISE", rb_float_new(GSL_CONST_CGSM_POISE));
596
+ rb_define_const(module, "STOKES", rb_float_new(GSL_CONST_CGSM_STOKES));
597
+ rb_define_const(module, "FARADAY", rb_float_new(GSL_CONST_CGSM_FARADAY));
598
+ rb_define_const(module, "ELECTRON_CHARGE",
599
+ rb_float_new(GSL_CONST_CGSM_ELECTRON_CHARGE));
600
+ rb_define_const(module, "ELECTRON_CHARGE_ESU",
601
+ rb_float_new(GSL_CONST_CGSM_ELECTRON_CHARGE*GSL_CONST_CGSM_SPEED_OF_LIGHT));
602
+ rb_define_const(module, "GAUSS", rb_float_new(GSL_CONST_CGSM_GAUSS));
603
+ rb_define_const(module, "STILB", rb_float_new(GSL_CONST_CGSM_STILB));
604
+ rb_define_const(module, "LUMEN", rb_float_new(GSL_CONST_CGSM_LUMEN));
605
+ rb_define_const(module, "LUX", rb_float_new(GSL_CONST_CGSM_LUX));
606
+ rb_define_const(module, "PHOT", rb_float_new(GSL_CONST_CGSM_PHOT));
607
+ rb_define_const(module, "FOOTCANDLE", rb_float_new(GSL_CONST_CGSM_FOOTCANDLE));
608
+ rb_define_const(module, "LAMBERT", rb_float_new(GSL_CONST_CGSM_LAMBERT));
609
+ rb_define_const(module, "CURIE", rb_float_new(GSL_CONST_CGSM_CURIE));
610
+ rb_define_const(module, "ROENTGEN", rb_float_new(GSL_CONST_CGSM_ROENTGEN));
611
+ rb_define_const(module, "RAD", rb_float_new(GSL_CONST_CGSM_RAD));
612
+ rb_define_const(module, "SOLAR_MASS", rb_float_new(GSL_CONST_CGSM_SOLAR_MASS));
613
+
614
+ rb_define_const(module, "BOLTZMANN", rb_float_new(GSL_CONST_CGSM_BOLTZMANN));
615
+ rb_define_const(module, "MOLAR_GAS", rb_float_new(GSL_CONST_CGSM_MOLAR_GAS));
616
+
617
+ rb_define_const(module, "BOHR_RADIUS", rb_float_new(GSL_CONST_CGSM_BOHR_RADIUS));
618
+ rb_define_const(module, "NEWTON", rb_float_new(GSL_CONST_CGSM_NEWTON));
619
+ rb_define_const(module, "DYNE", rb_float_new(GSL_CONST_CGSM_DYNE));
620
+ rb_define_const(module, "JOULE", rb_float_new(GSL_CONST_CGSM_JOULE));
621
+ rb_define_const(module, "ERG", rb_float_new(GSL_CONST_CGSM_ERG));
622
+
623
+ #ifdef GSL_1_4_9_LATER
624
+ rb_define_const(module, "STEFAN_BOLTZMANN_CONSTANT",
625
+ rb_float_new(GSL_CONST_CGSM_STEFAN_BOLTZMANN_CONSTANT));
626
+ rb_define_const(module, "THOMSON_CROSS_SECTION",
627
+ rb_float_new(GSL_CONST_CGSM_THOMSON_CROSS_SECTION));
628
+ #endif
629
+ }
630
+
631
+ static void rb_gsl_const_num(VALUE module)
632
+ {
633
+ rb_define_const(module, "AVOGADRO", rb_float_new(GSL_CONST_NUM_AVOGADRO));
634
+ rb_define_const(module, "FINE_STRUCTURE",
635
+ rb_float_new(GSL_CONST_NUM_FINE_STRUCTURE));
636
+ rb_define_const(module, "YOTTA", rb_float_new(GSL_CONST_NUM_YOTTA));
637
+ rb_define_const(module, "ZETTA", rb_float_new(GSL_CONST_NUM_ZETTA));
638
+ rb_define_const(module, "EXA", rb_float_new(GSL_CONST_NUM_EXA));
639
+ rb_define_const(module, "PETA", rb_float_new(GSL_CONST_NUM_PETA));
640
+ rb_define_const(module, "TERA", rb_float_new(GSL_CONST_NUM_TERA));
641
+ rb_define_const(module, "GIGA", rb_float_new(GSL_CONST_NUM_GIGA));
642
+ rb_define_const(module, "MEGA", rb_float_new(GSL_CONST_NUM_MEGA));
643
+ rb_define_const(module, "KILO", rb_float_new(GSL_CONST_NUM_KILO));
644
+ rb_define_const(module, "MILLI", rb_float_new(GSL_CONST_NUM_MILLI));
645
+ rb_define_const(module, "MICRO", rb_float_new(GSL_CONST_NUM_MICRO));
646
+ rb_define_const(module, "NANO", rb_float_new(GSL_CONST_NUM_NANO));
647
+ rb_define_const(module, "PICO", rb_float_new(GSL_CONST_NUM_PICO));
648
+ rb_define_const(module, "FEMTO", rb_float_new(GSL_CONST_NUM_FEMTO));
649
+ rb_define_const(module, "ATTO", rb_float_new(GSL_CONST_NUM_ATTO));
650
+ rb_define_const(module, "ZEPTO", rb_float_new(GSL_CONST_NUM_ZEPTO));
651
+ rb_define_const(module, "YOCTO", rb_float_new(GSL_CONST_NUM_YOCTO));
652
+ }
653
+
654
+ void Init_gsl_const(VALUE module)
655
+ {
656
+ VALUE mgsl_const;
657
+ VALUE mgsl_const_mks, mgsl_const_cgs, mgsl_const_num;
658
+
659
+ mgsl_const = rb_define_module_under(module, "CONST");
660
+ mgsl_const_mks = rb_define_module_under(mgsl_const, "MKSA");
661
+ rb_gsl_const_mks(mgsl_const_mks);
662
+ mgsl_const_cgs = rb_define_module_under(mgsl_const, "CGSM");
663
+ rb_gsl_const_cgs(mgsl_const_cgs);
664
+ mgsl_const_num = rb_define_module_under(mgsl_const, "NUM");
665
+ rb_gsl_const_num(mgsl_const_num);
666
+ Init_gsl_const_additional(mgsl_const_mks, mgsl_const_cgs, mgsl_const_num);
667
+ }
668
+ #endif