File: const.c

package info (click to toggle)
ruby-gsl 2.1.0.3%2Bdfsg1-5
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 5,604 kB
  • sloc: ansic: 62,050; ruby: 15,845; sh: 19; makefile: 10
file content (331 lines) | stat: -rw-r--r-- 19,477 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
/*
  const.c
  Ruby/GSL: Ruby extension library for GSL (GNU Scientific Library)
    (C) Copyright 2001-2006 by Yoshiki Tsunesada

  Ruby/GSL is free software: you can redistribute it and/or modify it
  under the terms of the GNU General Public License.
  This library is distributed in the hope that it will be useful, but
  WITHOUT ANY WARRANTY.
*/

#include "include/rb_gsl_const.h"

static void rb_gsl_const_mks(VALUE module);
static void rb_gsl_const_cgs(VALUE module);
static void rb_gsl_const_num(VALUE module);
void Init_gsl_const_additional(VALUE mmks, VALUE mcgs, VALUE mnum);

static void rb_gsl_const_mks(VALUE module)
{
  rb_define_const(module, "SPEED_OF_LIGHT",
                  rb_float_new(GSL_CONST_MKSA_SPEED_OF_LIGHT));
  rb_define_const(module, "GRAVITATIONAL_CONSTANT",
                  rb_float_new(GSL_CONST_MKSA_GRAVITATIONAL_CONSTANT));
  rb_define_const(module, "PLANCKS_CONSTANT_H",
                  rb_float_new(GSL_CONST_MKSA_PLANCKS_CONSTANT_H));
  rb_define_const(module, "PLANCKS_CONSTANT_HBAR",
                  rb_float_new(GSL_CONST_MKSA_PLANCKS_CONSTANT_HBAR));
  rb_define_const(module, "VACUUM_PERMEABILITY",
                  rb_float_new(GSL_CONST_MKSA_VACUUM_PERMEABILITY));
  rb_define_const(module, "VACUUM_PERMITTIVITY",
                  rb_float_new(GSL_CONST_MKSA_VACUUM_PERMITTIVITY));
  rb_define_const(module, "ASTRONOMICAL_UNIT",
                  rb_float_new(GSL_CONST_MKSA_ASTRONOMICAL_UNIT));
  rb_define_const(module, "LIGHT_YEAR", rb_float_new(GSL_CONST_MKSA_LIGHT_YEAR));
  rb_define_const(module, "PARSEC", rb_float_new(GSL_CONST_MKSA_PARSEC));
  rb_define_const(module, "GRAV_ACCEL", rb_float_new(GSL_CONST_MKSA_GRAV_ACCEL));
  rb_define_const(module, "ELECTRON_VOLT",
                  rb_float_new(GSL_CONST_MKSA_ELECTRON_VOLT));
  rb_define_const(module, "MASS_ELECTRON",
                  rb_float_new(GSL_CONST_MKSA_MASS_ELECTRON));
  rb_define_const(module, "MASS_MUON", rb_float_new(GSL_CONST_MKSA_MASS_MUON));
  rb_define_const(module, "MASS_PROTON", rb_float_new(GSL_CONST_MKSA_MASS_PROTON));
  rb_define_const(module, "MASS_NEUTRON", rb_float_new(GSL_CONST_MKSA_MASS_NEUTRON));
  rb_define_const(module, "RYDBERG", rb_float_new(GSL_CONST_MKSA_RYDBERG));
  rb_define_const(module, "BOHR_MAGNETON",
                  rb_float_new(GSL_CONST_MKSA_BOHR_MAGNETON));
  rb_define_const(module, "NUCLEAR_MAGNETON",
                  rb_float_new(GSL_CONST_MKSA_NUCLEAR_MAGNETON));
  rb_define_const(module, "ELECTRON_MAGNETIC_MOMENT",
                  rb_float_new(GSL_CONST_MKSA_ELECTRON_MAGNETIC_MOMENT));
  rb_define_const(module, "PROTON_MAGNETIC_MOMENT",
                  rb_float_new(GSL_CONST_MKSA_PROTON_MAGNETIC_MOMENT));
  rb_define_const(module, "STANDARD_GAS_VOLUME",
                  rb_float_new(GSL_CONST_MKSA_STANDARD_GAS_VOLUME));

  rb_define_const(module, "MINUTE", rb_float_new(GSL_CONST_MKSA_MINUTE));
  rb_define_const(module, "HOUR", rb_float_new(GSL_CONST_MKSA_HOUR));
  rb_define_const(module, "DAY", rb_float_new(GSL_CONST_MKSA_DAY));
  rb_define_const(module, "WEEK", rb_float_new(GSL_CONST_MKSA_WEEK));
  rb_define_const(module, "INCH", rb_float_new(GSL_CONST_MKSA_INCH));
  rb_define_const(module, "FOOT", rb_float_new(GSL_CONST_MKSA_FOOT));
  rb_define_const(module, "YARD", rb_float_new(GSL_CONST_MKSA_YARD));
  rb_define_const(module, "MILE", rb_float_new(GSL_CONST_MKSA_MILE));
  rb_define_const(module, "NAUTICAL_MILE",
                  rb_float_new(GSL_CONST_MKSA_NAUTICAL_MILE));
  rb_define_const(module, "FATHOM", rb_float_new(GSL_CONST_MKSA_FATHOM));
  rb_define_const(module, "MIL", rb_float_new(GSL_CONST_MKSA_MIL));
  rb_define_const(module, "POINT", rb_float_new(GSL_CONST_MKSA_POINT));
  rb_define_const(module, "TEXPOINT", rb_float_new(GSL_CONST_MKSA_TEXPOINT));
  rb_define_const(module, "MICRON", rb_float_new(GSL_CONST_MKSA_MICRON));
  rb_define_const(module, "ANGSTROM", rb_float_new(GSL_CONST_MKSA_ANGSTROM));
  rb_define_const(module, "HECTARE", rb_float_new(GSL_CONST_MKSA_HECTARE));
  rb_define_const(module, "ACRE", rb_float_new(GSL_CONST_MKSA_ACRE));
  rb_define_const(module, "BARN", rb_float_new(GSL_CONST_MKSA_BARN));
  rb_define_const(module, "LITER", rb_float_new(GSL_CONST_MKSA_LITER));
  rb_define_const(module, "US_GALLON", rb_float_new(GSL_CONST_MKSA_US_GALLON));
  rb_define_const(module, "QUART", rb_float_new(GSL_CONST_MKSA_QUART));
  rb_define_const(module, "PINT", rb_float_new(GSL_CONST_MKSA_PINT));
  rb_define_const(module, "CUP", rb_float_new(GSL_CONST_MKSA_CUP));
  rb_define_const(module, "FLUID_OUNCE", rb_float_new(GSL_CONST_MKSA_FLUID_OUNCE));
  rb_define_const(module, "TABLESPOON", rb_float_new(GSL_CONST_MKSA_TABLESPOON));
  rb_define_const(module, "CANADIAN_GALLON",
                  rb_float_new(GSL_CONST_MKSA_CANADIAN_GALLON));

  rb_define_const(module, "UK_GALLON", rb_float_new(GSL_CONST_MKSA_UK_GALLON));
  rb_define_const(module, "KILOMETERS_PER_HOUR",
                  rb_float_new(GSL_CONST_MKSA_MILES_PER_HOUR));
  rb_define_const(module, "MILES_PER_HOUR",
                  rb_float_new(GSL_CONST_MKSA_KILOMETERS_PER_HOUR));
  rb_define_const(module, "KNOT", rb_float_new(GSL_CONST_MKSA_KNOT));
  rb_define_const(module, "POUND_MASS", rb_float_new(GSL_CONST_MKSA_POUND_MASS));
  rb_define_const(module, "POUND_OUNCE", rb_float_new(GSL_CONST_MKSA_OUNCE_MASS));
  rb_define_const(module, "POUND_TON", rb_float_new(GSL_CONST_MKSA_TON));
  rb_define_const(module, "POUND_METRIC_TON",
                  rb_float_new(GSL_CONST_MKSA_METRIC_TON));
  rb_define_const(module, "POUND_UK_TON", rb_float_new(GSL_CONST_MKSA_UK_TON));
  rb_define_const(module, "POUND_TROY_OUNCE",
                  rb_float_new(GSL_CONST_MKSA_TROY_OUNCE));
  rb_define_const(module, "CARAT", rb_float_new(GSL_CONST_MKSA_CARAT));
  rb_define_const(module, "UNIFIED_ATOMIC_MASS",
                  rb_float_new(GSL_CONST_MKSA_UNIFIED_ATOMIC_MASS));
  rb_define_const(module, "GRAM_FORCE", rb_float_new(GSL_CONST_MKSA_GRAM_FORCE));
  rb_define_const(module, "POUND_FORCE", rb_float_new(GSL_CONST_MKSA_POUND_FORCE));
  rb_define_const(module, "KILOPOUND_FORCE",
                  rb_float_new(GSL_CONST_MKSA_KILOPOUND_FORCE));
  rb_define_const(module, "POUNDAL", rb_float_new(GSL_CONST_MKSA_POUNDAL));
  rb_define_const(module, "CALORIE", rb_float_new(GSL_CONST_MKSA_CALORIE));
  rb_define_const(module, "BTU", rb_float_new(GSL_CONST_MKSA_BTU));
  rb_define_const(module, "THERM", rb_float_new(GSL_CONST_MKSA_THERM));
  rb_define_const(module, "HORSEPOWER", rb_float_new(GSL_CONST_MKSA_HORSEPOWER));
  rb_define_const(module, "BAR", rb_float_new(GSL_CONST_MKSA_BAR));
  rb_define_const(module, "STD_ATMOSPHERE",
                  rb_float_new(GSL_CONST_MKSA_STD_ATMOSPHERE));
  rb_define_const(module, "TORR", rb_float_new(GSL_CONST_MKSA_TORR));
  rb_define_const(module, "METER_OF_MERCURY",
                  rb_float_new(GSL_CONST_MKSA_METER_OF_MERCURY));
  rb_define_const(module, "INCH_OF_MERCURY",
                  rb_float_new(GSL_CONST_MKSA_INCH_OF_MERCURY));
  rb_define_const(module, "INCH_OF_WATER",
                  rb_float_new(GSL_CONST_MKSA_INCH_OF_WATER));
  rb_define_const(module, "PSI", rb_float_new(GSL_CONST_MKSA_PSI));
  rb_define_const(module, "POISE", rb_float_new(GSL_CONST_MKSA_POISE));
  rb_define_const(module, "STOKES", rb_float_new(GSL_CONST_MKSA_STOKES));
  rb_define_const(module, "FARADAY", rb_float_new(GSL_CONST_MKSA_FARADAY));
  rb_define_const(module, "ELECTRON_CHARGE",
                  rb_float_new(GSL_CONST_MKSA_ELECTRON_CHARGE));
  rb_define_const(module, "GAUSS", rb_float_new(GSL_CONST_MKSA_GAUSS));
  rb_define_const(module, "STILB", rb_float_new(GSL_CONST_MKSA_STILB));
  rb_define_const(module, "LUMEN", rb_float_new(GSL_CONST_MKSA_LUMEN));
  rb_define_const(module, "LUX", rb_float_new(GSL_CONST_MKSA_LUX));
  rb_define_const(module, "PHOT", rb_float_new(GSL_CONST_MKSA_PHOT));
  rb_define_const(module, "FOOTCANDLE", rb_float_new(GSL_CONST_MKSA_FOOTCANDLE));
  rb_define_const(module, "LAMBERT", rb_float_new(GSL_CONST_MKSA_LAMBERT));
  rb_define_const(module, "CURIE", rb_float_new(GSL_CONST_MKSA_CURIE));
  rb_define_const(module, "ROENTGEN", rb_float_new(GSL_CONST_MKSA_ROENTGEN));
  rb_define_const(module, "RAD", rb_float_new(GSL_CONST_MKSA_RAD));
  rb_define_const(module, "SOLAR_MASS", rb_float_new(GSL_CONST_MKSA_SOLAR_MASS));

  rb_define_const(module, "BOLTZMANN", rb_float_new(GSL_CONST_MKSA_BOLTZMANN));
  rb_define_const(module, "MOLAR_GAS", rb_float_new(GSL_CONST_MKSA_MOLAR_GAS));

  rb_define_const(module, "BOHR_RADIUS", rb_float_new(GSL_CONST_MKSA_BOHR_RADIUS));
  rb_define_const(module, "NEWTON", rb_float_new(GSL_CONST_MKSA_NEWTON));
  rb_define_const(module, "DYNE", rb_float_new(GSL_CONST_MKSA_DYNE));
  rb_define_const(module, "JOULE", rb_float_new(GSL_CONST_MKSA_JOULE));
  rb_define_const(module, "ERG", rb_float_new(GSL_CONST_MKSA_ERG));

  rb_define_const(module, "STEFAN_BOLTZMANN_CONSTANT",
                  rb_float_new(GSL_CONST_MKSA_STEFAN_BOLTZMANN_CONSTANT));
  rb_define_const(module, "THOMSON_CROSS_SECTION",
                  rb_float_new(GSL_CONST_MKSA_THOMSON_CROSS_SECTION));
  rb_define_const(module, "DEBYE", rb_float_new(GSL_CONST_MKSA_DEBYE));
}


static void rb_gsl_const_cgs(VALUE module)
{
  rb_define_const(module, "SPEED_OF_LIGHT",
                  rb_float_new(GSL_CONST_CGSM_SPEED_OF_LIGHT));
  rb_define_const(module, "GRAVITATIONAL_CONSTANT",
                  rb_float_new(GSL_CONST_CGSM_GRAVITATIONAL_CONSTANT));
  rb_define_const(module, "PLANCKS_CONSTANT_H",
                  rb_float_new(GSL_CONST_CGSM_PLANCKS_CONSTANT_H));
  rb_define_const(module, "PLANCKS_CONSTANT_HBAR",
                  rb_float_new(GSL_CONST_CGSM_PLANCKS_CONSTANT_HBAR));
  rb_define_const(module, "ASTRONOMICAL_UNIT",
                  rb_float_new(GSL_CONST_CGSM_ASTRONOMICAL_UNIT));
  rb_define_const(module, "LIGHT_YEAR",
                  rb_float_new(GSL_CONST_CGSM_LIGHT_YEAR));
  rb_define_const(module, "PARSEC",
                  rb_float_new(GSL_CONST_CGSM_PARSEC));
  rb_define_const(module, "GRAV_ACCEL",
                  rb_float_new(GSL_CONST_CGSM_GRAV_ACCEL));
  rb_define_const(module, "ELECTRON_VOLT",
                  rb_float_new(GSL_CONST_CGSM_ELECTRON_VOLT));
  rb_define_const(module, "MASS_ELECTRON",
                  rb_float_new(GSL_CONST_CGSM_MASS_ELECTRON));
  rb_define_const(module, "MASS_MUON", rb_float_new(GSL_CONST_CGSM_MASS_MUON));
  rb_define_const(module, "MASS_PROTON", rb_float_new(GSL_CONST_CGSM_MASS_PROTON));
  rb_define_const(module, "MASS_NEUTRON", rb_float_new(GSL_CONST_CGSM_MASS_NEUTRON));
  rb_define_const(module, "RYDBERG", rb_float_new(GSL_CONST_CGSM_RYDBERG));

  rb_define_const(module, "BOHR_MAGNETON",
                  rb_float_new(GSL_CONST_CGSM_BOHR_MAGNETON));

  rb_define_const(module, "NUCLEAR_MAGNETON",
                  rb_float_new(GSL_CONST_CGSM_NUCLEAR_MAGNETON));
  rb_define_const(module, "ELECTRON_MAGNETIC_MOMENT",
                  rb_float_new(GSL_CONST_CGSM_ELECTRON_MAGNETIC_MOMENT));
  rb_define_const(module, "PROTON_MAGNETIC_MOMENT",
                  rb_float_new(GSL_CONST_CGSM_PROTON_MAGNETIC_MOMENT));
  rb_define_const(module, "STANDARD_GAS_VOLUME",
                  rb_float_new(GSL_CONST_CGSM_STANDARD_GAS_VOLUME));

  rb_define_const(module, "MINUTE", rb_float_new(GSL_CONST_CGSM_MINUTE));
  rb_define_const(module, "HOUR", rb_float_new(GSL_CONST_CGSM_HOUR));
  rb_define_const(module, "DAY", rb_float_new(GSL_CONST_CGSM_DAY));
  rb_define_const(module, "WEEK", rb_float_new(GSL_CONST_CGSM_WEEK));
  rb_define_const(module, "INCH", rb_float_new(GSL_CONST_CGSM_INCH));
  rb_define_const(module, "FOOT", rb_float_new(GSL_CONST_CGSM_FOOT));
  rb_define_const(module, "YARD", rb_float_new(GSL_CONST_CGSM_YARD));
  rb_define_const(module, "MILE", rb_float_new(GSL_CONST_CGSM_MILE));
  rb_define_const(module, "NAUTICAL_MILE",
                  rb_float_new(GSL_CONST_CGSM_NAUTICAL_MILE));
  rb_define_const(module, "FATHOM", rb_float_new(GSL_CONST_CGSM_FATHOM));
  rb_define_const(module, "MIL", rb_float_new(GSL_CONST_CGSM_MIL));
  rb_define_const(module, "POINT", rb_float_new(GSL_CONST_CGSM_POINT));
  rb_define_const(module, "TEXPOINT", rb_float_new(GSL_CONST_CGSM_TEXPOINT));
  rb_define_const(module, "MICRON", rb_float_new(GSL_CONST_CGSM_MICRON));
  rb_define_const(module, "ANGSTROM", rb_float_new(GSL_CONST_CGSM_ANGSTROM));
  rb_define_const(module, "HECTARE", rb_float_new(GSL_CONST_CGSM_HECTARE));
  rb_define_const(module, "ACRE", rb_float_new(GSL_CONST_CGSM_ACRE));
  rb_define_const(module, "BARN", rb_float_new(GSL_CONST_CGSM_BARN));
  rb_define_const(module, "LITER", rb_float_new(GSL_CONST_CGSM_LITER));
  rb_define_const(module, "US_GALLON", rb_float_new(GSL_CONST_CGSM_US_GALLON));
  rb_define_const(module, "QUART", rb_float_new(GSL_CONST_CGSM_QUART));
  rb_define_const(module, "PINT", rb_float_new(GSL_CONST_CGSM_PINT));
  rb_define_const(module, "CUP", rb_float_new(GSL_CONST_CGSM_CUP));
  rb_define_const(module, "FLUID_OUNCE", rb_float_new(GSL_CONST_CGSM_FLUID_OUNCE));
  rb_define_const(module, "TABLESPOON", rb_float_new(GSL_CONST_CGSM_TABLESPOON));
  rb_define_const(module, "CANADIAN_GALLON",
                  rb_float_new(GSL_CONST_CGSM_CANADIAN_GALLON));

  rb_define_const(module, "UK_GALLON", rb_float_new(GSL_CONST_CGSM_UK_GALLON));
  rb_define_const(module, "KILOMETERS_PER_HOUR",
                  rb_float_new(GSL_CONST_CGSM_MILES_PER_HOUR));
  rb_define_const(module, "MILES_PER_HOUR",
                  rb_float_new(GSL_CONST_CGSM_KILOMETERS_PER_HOUR));
  rb_define_const(module, "KNOT", rb_float_new(GSL_CONST_CGSM_KNOT));
  rb_define_const(module, "POUND_MASS", rb_float_new(GSL_CONST_CGSM_POUND_MASS));
  rb_define_const(module, "POUND_OUNCE", rb_float_new(GSL_CONST_CGSM_OUNCE_MASS));
  rb_define_const(module, "POUND_TON", rb_float_new(GSL_CONST_CGSM_TON));
  rb_define_const(module, "POUND_METRIC_TON",
                  rb_float_new(GSL_CONST_CGSM_METRIC_TON));
  rb_define_const(module, "POUND_UK_TON", rb_float_new(GSL_CONST_CGSM_UK_TON));
  rb_define_const(module, "POUND_TROY_OUNCE",
                  rb_float_new(GSL_CONST_CGSM_TROY_OUNCE));
  rb_define_const(module, "CARAT", rb_float_new(GSL_CONST_CGSM_CARAT));
  rb_define_const(module, "UNIFIED_ATOMIC_MASS",
                  rb_float_new(GSL_CONST_CGSM_UNIFIED_ATOMIC_MASS));
  rb_define_const(module, "GRAM_FORCE", rb_float_new(GSL_CONST_CGSM_GRAM_FORCE));
  rb_define_const(module, "POUND_FORCE", rb_float_new(GSL_CONST_CGSM_POUND_FORCE));
  rb_define_const(module, "KILOPOUND_FORCE",
                  rb_float_new(GSL_CONST_CGSM_KILOPOUND_FORCE));
  rb_define_const(module, "POUNDAL", rb_float_new(GSL_CONST_CGSM_POUNDAL));
  rb_define_const(module, "CALORIE", rb_float_new(GSL_CONST_CGSM_CALORIE));
  rb_define_const(module, "BTU", rb_float_new(GSL_CONST_CGSM_BTU));
  rb_define_const(module, "THERM", rb_float_new(GSL_CONST_CGSM_THERM));
  rb_define_const(module, "HORSEPOWER", rb_float_new(GSL_CONST_CGSM_HORSEPOWER));
  rb_define_const(module, "BAR", rb_float_new(GSL_CONST_CGSM_BAR));
  rb_define_const(module, "STD_ATMOSPHERE",
                  rb_float_new(GSL_CONST_CGSM_STD_ATMOSPHERE));
  rb_define_const(module, "TORR", rb_float_new(GSL_CONST_CGSM_TORR));
  rb_define_const(module, "METER_OF_MERCURY",
                  rb_float_new(GSL_CONST_CGSM_METER_OF_MERCURY));
  rb_define_const(module, "INCH_OF_MERCURY",
                  rb_float_new(GSL_CONST_CGSM_INCH_OF_MERCURY));
  rb_define_const(module, "INCH_OF_WATER",
                  rb_float_new(GSL_CONST_CGSM_INCH_OF_WATER));
  rb_define_const(module, "PSI", rb_float_new(GSL_CONST_CGSM_PSI));
  rb_define_const(module, "POISE", rb_float_new(GSL_CONST_CGSM_POISE));
  rb_define_const(module, "STOKES", rb_float_new(GSL_CONST_CGSM_STOKES));
  rb_define_const(module, "FARADAY", rb_float_new(GSL_CONST_CGSM_FARADAY));
  rb_define_const(module, "ELECTRON_CHARGE",
                  rb_float_new(GSL_CONST_CGSM_ELECTRON_CHARGE));
  rb_define_const(module, "ELECTRON_CHARGE_ESU",
                  rb_float_new(GSL_CONST_CGSM_ELECTRON_CHARGE*GSL_CONST_CGSM_SPEED_OF_LIGHT));
  rb_define_const(module, "STILB", rb_float_new(GSL_CONST_CGSM_STILB));
  rb_define_const(module, "LUMEN", rb_float_new(GSL_CONST_CGSM_LUMEN));
  rb_define_const(module, "LUX", rb_float_new(GSL_CONST_CGSM_LUX));
  rb_define_const(module, "PHOT", rb_float_new(GSL_CONST_CGSM_PHOT));
  rb_define_const(module, "FOOTCANDLE", rb_float_new(GSL_CONST_CGSM_FOOTCANDLE));
  rb_define_const(module, "LAMBERT", rb_float_new(GSL_CONST_CGSM_LAMBERT));
  rb_define_const(module, "CURIE", rb_float_new(GSL_CONST_CGSM_CURIE));
  rb_define_const(module, "ROENTGEN", rb_float_new(GSL_CONST_CGSM_ROENTGEN));
  rb_define_const(module, "RAD", rb_float_new(GSL_CONST_CGSM_RAD));
  rb_define_const(module, "SOLAR_MASS", rb_float_new(GSL_CONST_CGSM_SOLAR_MASS));

  rb_define_const(module, "BOLTZMANN", rb_float_new(GSL_CONST_CGSM_BOLTZMANN));
  rb_define_const(module, "MOLAR_GAS", rb_float_new(GSL_CONST_CGSM_MOLAR_GAS));

  rb_define_const(module, "BOHR_RADIUS", rb_float_new(GSL_CONST_CGSM_BOHR_RADIUS));
  rb_define_const(module, "NEWTON", rb_float_new(GSL_CONST_CGSM_NEWTON));
  rb_define_const(module, "DYNE", rb_float_new(GSL_CONST_CGSM_DYNE));
  rb_define_const(module, "JOULE", rb_float_new(GSL_CONST_CGSM_JOULE));
  rb_define_const(module, "ERG", rb_float_new(GSL_CONST_CGSM_ERG));

  rb_define_const(module, "STEFAN_BOLTZMANN_CONSTANT",
                  rb_float_new(GSL_CONST_CGSM_STEFAN_BOLTZMANN_CONSTANT));
  rb_define_const(module, "THOMSON_CROSS_SECTION",
                  rb_float_new(GSL_CONST_CGSM_THOMSON_CROSS_SECTION));
}

static void rb_gsl_const_num(VALUE module)
{
  rb_define_const(module, "AVOGADRO", rb_float_new(GSL_CONST_NUM_AVOGADRO));
  rb_define_const(module, "FINE_STRUCTURE",
                  rb_float_new(GSL_CONST_NUM_FINE_STRUCTURE));
  rb_define_const(module, "YOTTA", rb_float_new(GSL_CONST_NUM_YOTTA));
  rb_define_const(module, "ZETTA", rb_float_new(GSL_CONST_NUM_ZETTA));
  rb_define_const(module, "EXA", rb_float_new(GSL_CONST_NUM_EXA));
  rb_define_const(module, "PETA", rb_float_new(GSL_CONST_NUM_PETA));
  rb_define_const(module, "TERA", rb_float_new(GSL_CONST_NUM_TERA));
  rb_define_const(module, "GIGA", rb_float_new(GSL_CONST_NUM_GIGA));
  rb_define_const(module, "MEGA", rb_float_new(GSL_CONST_NUM_MEGA));
  rb_define_const(module, "KILO", rb_float_new(GSL_CONST_NUM_KILO));
  rb_define_const(module, "MILLI", rb_float_new(GSL_CONST_NUM_MILLI));
  rb_define_const(module, "MICRO", rb_float_new(GSL_CONST_NUM_MICRO));
  rb_define_const(module, "NANO", rb_float_new(GSL_CONST_NUM_NANO));
  rb_define_const(module, "PICO", rb_float_new(GSL_CONST_NUM_PICO));
  rb_define_const(module, "FEMTO", rb_float_new(GSL_CONST_NUM_FEMTO));
  rb_define_const(module, "ATTO", rb_float_new(GSL_CONST_NUM_ATTO));
  rb_define_const(module, "ZEPTO", rb_float_new(GSL_CONST_NUM_ZEPTO));
  rb_define_const(module, "YOCTO", rb_float_new(GSL_CONST_NUM_YOCTO));
}

void Init_gsl_const(VALUE module)
{
  VALUE mgsl_const;
  VALUE mgsl_const_mks, mgsl_const_cgs, mgsl_const_num;

  mgsl_const = rb_define_module_under(module, "CONST");
  mgsl_const_mks = rb_define_module_under(mgsl_const, "MKSA");
  rb_gsl_const_mks(mgsl_const_mks);
  mgsl_const_cgs = rb_define_module_under(mgsl_const, "CGSM");
  rb_gsl_const_cgs(mgsl_const_cgs);
  mgsl_const_num = rb_define_module_under(mgsl_const, "NUM");
  rb_gsl_const_num(mgsl_const_num);
  Init_gsl_const_additional(mgsl_const_mks, mgsl_const_cgs, mgsl_const_num);
}