File: const.c

package info (click to toggle)
ruby-gsl 1.15.3%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 5,528 kB
  • ctags: 6,328
  • sloc: ansic: 62,164; ruby: 17,917; makefile: 18; sh: 15
file content (673 lines) | stat: -rw-r--r-- 36,910 bytes parent folder | download | duplicates (3)
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
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
/*
  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 "rb_gsl_config.h"
#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);

#ifdef GSL_CONST_OLD
static void rb_gsl_const_mks(VALUE module)
{
  rb_define_const(module, "SPEED_OF_LIGHT", 
		  rb_float_new(GSL_CONST_MKS_SPEED_OF_LIGHT));
  rb_define_const(module, "GRAVITATIONAL_CONSTANT", 
		  rb_float_new(GSL_CONST_MKS_GRAVITATIONAL_CONSTANT));
  rb_define_const(module, "PLANCKS_CONSTANT_H", 
		  rb_float_new(GSL_CONST_MKS_PLANCKS_CONSTANT_H));
  rb_define_const(module, "PLANCKS_CONSTANT_HBAR", 
		  rb_float_new(GSL_CONST_MKS_PLANCKS_CONSTANT_HBAR));
  rb_define_const(module, "VACUUM_PERMEABILITY", 
		  rb_float_new(GSL_CONST_MKS_VACUUM_PERMEABILITY));
  rb_define_const(module, "ASTRONOMICAL_UNIT", 
		  rb_float_new(GSL_CONST_MKS_ASTRONOMICAL_UNIT));
  rb_define_const(module, "LIGHT_YEAR", rb_float_new(GSL_CONST_MKS_LIGHT_YEAR));
  rb_define_const(module, "PARSEC", rb_float_new(GSL_CONST_MKS_PARSEC));
  rb_define_const(module, "GRAV_ACCEL", rb_float_new(GSL_CONST_MKS_GRAV_ACCEL));
  rb_define_const(module, "ELECTRON_VOLT", 
		  rb_float_new(GSL_CONST_MKS_ELECTRON_VOLT));
  rb_define_const(module, "MASS_ELECTRON", 
		  rb_float_new(GSL_CONST_MKS_MASS_ELECTRON));
  rb_define_const(module, "MASS_MUON", rb_float_new(GSL_CONST_MKS_MASS_MUON));
  rb_define_const(module, "MASS_PROTON", rb_float_new(GSL_CONST_MKS_MASS_PROTON));
  rb_define_const(module, "MASS_NEUTRON", rb_float_new(GSL_CONST_MKS_MASS_NEUTRON));
  rb_define_const(module, "RYDBERG", rb_float_new(GSL_CONST_MKS_RYDBERG));
  rb_define_const(module, "BOLTZMANN", rb_float_new(GSL_CONST_MKS_BOLTZMANN));
  rb_define_const(module, "MOLAR_GAS", rb_float_new(GSL_CONST_MKS_MOLAR_GAS));
  rb_define_const(module, "BOHR_MAGNETON", 
		  rb_float_new(GSL_CONST_MKS_BOHR_MAGNETON));
  rb_define_const(module, "NUCLEAR_MAGNETON",
		  rb_float_new(GSL_CONST_MKS_NUCLEAR_MAGNETON));
  rb_define_const(module, "ELECTRON_MAGNETIC_MOMENT", 
		  rb_float_new(GSL_CONST_MKS_ELECTRON_MAGNETIC_MOMENT));
  rb_define_const(module, "PROTON_MAGNETIC_MOMENT", 
		  rb_float_new(GSL_CONST_MKS_PROTON_MAGNETIC_MOMENT));
  rb_define_const(module, "STANDARD_GAS_VOLUME", 
		  rb_float_new(GSL_CONST_MKS_STANDARD_GAS_VOLUME));

  rb_define_const(module, "MINUTE", rb_float_new(GSL_CONST_MKS_MINUTE));
  rb_define_const(module, "HOUR", rb_float_new(GSL_CONST_MKS_HOUR));
  rb_define_const(module, "DAY", rb_float_new(GSL_CONST_MKS_DAY));
  rb_define_const(module, "WEEK", rb_float_new(GSL_CONST_MKS_WEEK));
  rb_define_const(module, "INCH", rb_float_new(GSL_CONST_MKS_INCH));
  rb_define_const(module, "FOOT", rb_float_new(GSL_CONST_MKS_FOOT));
  rb_define_const(module, "YARD", rb_float_new(GSL_CONST_MKS_YARD));
  rb_define_const(module, "MILE", rb_float_new(GSL_CONST_MKS_MILE));
  rb_define_const(module, "NAUTICAL_MILE", rb_float_new(GSL_CONST_MKS_NAUTICAL_MILE));
  rb_define_const(module, "FATHOM", rb_float_new(GSL_CONST_MKS_FATHOM));
  rb_define_const(module, "MIL", rb_float_new(GSL_CONST_MKS_MIL));
  rb_define_const(module, "POINT", rb_float_new(GSL_CONST_MKS_POINT));
  rb_define_const(module, "TEXPOINT", rb_float_new(GSL_CONST_MKS_TEXPOINT));
  rb_define_const(module, "MICRON", rb_float_new(GSL_CONST_MKS_MICRON));
  rb_define_const(module, "ANGSTROM", rb_float_new(GSL_CONST_MKS_ANGSTROM));
  rb_define_const(module, "HECTARE", rb_float_new(GSL_CONST_MKS_HECTARE));
  rb_define_const(module, "ACRE", rb_float_new(GSL_CONST_MKS_ACRE));
#ifdef GSL_0_9_4_LATER
  rb_define_const(module, "BARN", rb_float_new(GSL_CONST_MKS_BARN));
  rb_define_const(module, "BTU", rb_float_new(GSL_CONST_MKS_BTU));
  rb_define_const(module, "SOLAR_MASS", rb_float_new(GSL_CONST_MKS_SOLAR_MASS));
#else
  rb_define_const(module, "BARN", rb_float_new(1.0e-28));
  rb_define_const(module, "BTU", rb_float_new(1.05505585262e3));
#endif
  rb_define_const(module, "LITER", rb_float_new(GSL_CONST_MKS_LITER));
  rb_define_const(module, "US_GALLON", rb_float_new(GSL_CONST_MKS_US_GALLON));
  rb_define_const(module, "QUART", rb_float_new(GSL_CONST_MKS_QUART));
  rb_define_const(module, "PINT", rb_float_new(GSL_CONST_MKS_PINT));
  rb_define_const(module, "CUP", rb_float_new(GSL_CONST_MKS_CUP));
  rb_define_const(module, "FLUID_OUNCE", rb_float_new(GSL_CONST_MKS_FLUID_OUNCE));
  rb_define_const(module, "TABLESPOON", rb_float_new(GSL_CONST_MKS_TABLESPOON));
  rb_define_const(module, "CANADIAN_GALLON", 
		  rb_float_new(GSL_CONST_MKS_CANADIAN_GALLON));

  rb_define_const(module, "UK_GALLON", rb_float_new(GSL_CONST_MKS_UK_GALLON));
  rb_define_const(module, "KILOMETERS_PER_HOUR", 
		  rb_float_new(GSL_CONST_MKS_MILES_PER_HOUR));  
  rb_define_const(module, "MILES_PER_HOUR", 
		  rb_float_new(GSL_CONST_MKS_KILOMETERS_PER_HOUR));
  rb_define_const(module, "KNOT", rb_float_new(GSL_CONST_MKS_KNOT));
  rb_define_const(module, "POUND_MASS", rb_float_new(GSL_CONST_MKS_POUND_MASS));
  rb_define_const(module, "POUND_OUNCE", rb_float_new(GSL_CONST_MKS_OUNCE_MASS));
  rb_define_const(module, "POUND_TON", rb_float_new(GSL_CONST_MKS_TON));
  rb_define_const(module, "POUND_METRIC_TON", 
		  rb_float_new(GSL_CONST_MKS_METRIC_TON));
  rb_define_const(module, "POUND_UK_TON", rb_float_new(GSL_CONST_MKS_UK_TON));
  rb_define_const(module, "POUND_TROY_OUNCE", 
		  rb_float_new(GSL_CONST_MKS_TROY_OUNCE));
  rb_define_const(module, "CARAT", rb_float_new(GSL_CONST_MKS_CARAT));
  rb_define_const(module, "UNIFIED_ATOMIC_MASS", 
		  rb_float_new(GSL_CONST_MKS_UNIFIED_ATOMIC_MASS));
  rb_define_const(module, "GRAM_FORCE", rb_float_new(GSL_CONST_MKS_GRAM_FORCE));
  rb_define_const(module, "POUND_FORCE", rb_float_new(GSL_CONST_MKS_POUND_FORCE));
  rb_define_const(module, "KILOPOUND_FORCE", 
		  rb_float_new(GSL_CONST_MKS_KILOPOUND_FORCE));
  rb_define_const(module, "POUNDAL", rb_float_new(GSL_CONST_MKS_POUNDAL));
  rb_define_const(module, "CALORIE", rb_float_new(GSL_CONST_MKS_CALORIE));
  rb_define_const(module, "THERM", rb_float_new(GSL_CONST_MKS_THERM));
  rb_define_const(module, "HORSEPOWER", rb_float_new(GSL_CONST_MKS_HORSEPOWER));
  rb_define_const(module, "BAR", rb_float_new(GSL_CONST_MKS_BAR));
  rb_define_const(module, "STD_ATMOSPHERE", 
		  rb_float_new(GSL_CONST_MKS_STD_ATMOSPHERE));
  rb_define_const(module, "TORR", rb_float_new(GSL_CONST_MKS_TORR));
  rb_define_const(module, "METER_OF_MERCURY", 
		  rb_float_new(GSL_CONST_MKS_METER_OF_MERCURY));
  rb_define_const(module, "INCH_OF_MERCURY", 
		  rb_float_new(GSL_CONST_MKS_INCH_OF_MERCURY));
  rb_define_const(module, "INCH_OF_WATER", 
		  rb_float_new(GSL_CONST_MKS_INCH_OF_WATER));
  rb_define_const(module, "PSI", rb_float_new(GSL_CONST_MKS_PSI));
  rb_define_const(module, "POISE", rb_float_new(GSL_CONST_MKS_POISE));
  rb_define_const(module, "STOKES", rb_float_new(GSL_CONST_MKS_STOKES));
  rb_define_const(module, "FARADAY", rb_float_new(GSL_CONST_MKS_FARADAY));
  rb_define_const(module, "ELECTRON_CHARGE", 
		  rb_float_new(GSL_CONST_MKS_ELECTRON_CHARGE));
  rb_define_const(module, "GAUSS", rb_float_new(GSL_CONST_MKS_GAUSS));
  rb_define_const(module, "STILB", rb_float_new(GSL_CONST_MKS_STILB));
  rb_define_const(module, "LUMEN", rb_float_new(GSL_CONST_MKS_LUMEN));
  rb_define_const(module, "LUX", rb_float_new(GSL_CONST_MKS_LUX));
  rb_define_const(module, "PHOT", rb_float_new(GSL_CONST_MKS_PHOT));
  rb_define_const(module, "FOOTCANDLE", rb_float_new(GSL_CONST_MKS_FOOTCANDLE));
  rb_define_const(module, "LAMBERT", rb_float_new(GSL_CONST_MKS_LAMBERT));
  rb_define_const(module, "CURIE", rb_float_new(GSL_CONST_MKS_CURIE));
  rb_define_const(module, "ROENTGEN", rb_float_new(GSL_CONST_MKS_ROENTGEN));
  rb_define_const(module, "RAD", rb_float_new(GSL_CONST_MKS_RAD));

#ifdef GSL_1_1_LATER
  rb_define_const(module, "VACUUM_PERMITTIVITY", 
		  rb_float_new(GSL_CONST_MKS_VACUUM_PERMITTIVITY));
  rb_define_const(module, "BOHR_RADIUS", rb_float_new(GSL_CONST_MKS_BOHR_RADIUS));
#endif

#ifdef GSL_1_2_LATER
  rb_define_const(module, "NEWTON", rb_float_new(GSL_CONST_MKS_NEWTON));
  rb_define_const(module, "DYNE", rb_float_new(GSL_CONST_MKS_DYNE));
  rb_define_const(module, "JOULE", rb_float_new(GSL_CONST_MKS_JOULE));
  rb_define_const(module, "ERG", rb_float_new(GSL_CONST_MKS_ERG));
#endif

#ifdef GSL_1_8_LATER
  rb_define_const(module, "DEBYE", rb_float_new(GSL_CONST_MKS_DEBYE));
#endif

}

static void rb_gsl_const_cgs(VALUE module)
{
  rb_define_const(module, "SPEED_OF_LIGHT", 
		  rb_float_new(GSL_CONST_CGS_SPEED_OF_LIGHT));
  rb_define_const(module, "GRAVITATIONAL_CONSTANT", 
		  rb_float_new(GSL_CONST_CGS_GRAVITATIONAL_CONSTANT));
  rb_define_const(module, "PLANCKS_CONSTANT_H", 
		  rb_float_new(GSL_CONST_CGS_PLANCKS_CONSTANT_H));
  rb_define_const(module, "PLANCKS_CONSTANT_HBAR", 
		  rb_float_new(GSL_CONST_CGS_PLANCKS_CONSTANT_HBAR));
  rb_define_const(module, "ASTRONOMICAL_UNIT", 
		  rb_float_new(GSL_CONST_CGS_ASTRONOMICAL_UNIT));
  rb_define_const(module, "LIGHT_YEAR", rb_float_new(GSL_CONST_CGS_LIGHT_YEAR));
  rb_define_const(module, "PARSEC", rb_float_new(GSL_CONST_CGS_PARSEC));
  rb_define_const(module, "GRAV_ACCEL", rb_float_new(GSL_CONST_CGS_GRAV_ACCEL));
  rb_define_const(module, "ELECTRON_VOLT", 
		  rb_float_new(GSL_CONST_CGS_ELECTRON_VOLT));
  rb_define_const(module, "MASS_ELECTRON", 
		  rb_float_new(GSL_CONST_CGS_MASS_ELECTRON));
  rb_define_const(module, "MASS_MUON", rb_float_new(GSL_CONST_CGS_MASS_MUON));
  rb_define_const(module, "MASS_PROTON", 
		  rb_float_new(GSL_CONST_CGS_MASS_PROTON));
  rb_define_const(module, "MASS_NEUTRON", rb_float_new(GSL_CONST_CGS_MASS_NEUTRON));
  rb_define_const(module, "RYDBERG", rb_float_new(GSL_CONST_CGS_RYDBERG));
  rb_define_const(module, "BOHR_MAGNETON", 
		  rb_float_new(GSL_CONST_CGS_BOHR_MAGNETON));

  rb_define_const(module, "NUCLEAR_MAGNETON", 
		  rb_float_new(GSL_CONST_CGS_NUCLEAR_MAGNETON));
  rb_define_const(module, "ELECTRON_MAGNETIC_MOMENT", 
		  rb_float_new(GSL_CONST_CGS_ELECTRON_MAGNETIC_MOMENT));
  rb_define_const(module, "PROTON_MAGNETIC_MOMENT", 
		  rb_float_new(GSL_CONST_CGS_PROTON_MAGNETIC_MOMENT));
  rb_define_const(module, "STANDARD_GAS_VOLUME", 
		  rb_float_new(GSL_CONST_CGS_STANDARD_GAS_VOLUME));

  rb_define_const(module, "MINUTE", rb_float_new(GSL_CONST_CGS_MINUTE));
  rb_define_const(module, "HOUR", rb_float_new(GSL_CONST_CGS_HOUR));
  rb_define_const(module, "DAY", rb_float_new(GSL_CONST_CGS_DAY));
  rb_define_const(module, "WEEK", rb_float_new(GSL_CONST_CGS_WEEK));
  rb_define_const(module, "INCH", rb_float_new(GSL_CONST_CGS_INCH));
  rb_define_const(module, "FOOT", rb_float_new(GSL_CONST_CGS_FOOT));
  rb_define_const(module, "YARD", rb_float_new(GSL_CONST_CGS_YARD));
  rb_define_const(module, "MILE", rb_float_new(GSL_CONST_CGS_MILE));
  rb_define_const(module, "NAUTICAL_MILE", 
		  rb_float_new(GSL_CONST_CGS_NAUTICAL_MILE));
  rb_define_const(module, "FATHOM", rb_float_new(GSL_CONST_CGS_FATHOM));
  rb_define_const(module, "MIL", rb_float_new(GSL_CONST_CGS_MIL));
  rb_define_const(module, "POINT", rb_float_new(GSL_CONST_CGS_POINT));
  rb_define_const(module, "TEXPOINT", rb_float_new(GSL_CONST_CGS_TEXPOINT));
  rb_define_const(module, "MICRON", rb_float_new(GSL_CONST_CGS_MICRON));
  rb_define_const(module, "ANGSTROM", rb_float_new(GSL_CONST_CGS_ANGSTROM));
  rb_define_const(module, "HECTARE", rb_float_new(GSL_CONST_CGS_HECTARE));
  rb_define_const(module, "ACRE", rb_float_new(GSL_CONST_CGS_ACRE));
#ifdef GSL_0_9_4_LATER
  rb_define_const(module, "BARN", rb_float_new(GSL_CONST_CGS_BARN));
  rb_define_const(module, "BTU", rb_float_new(GSL_CONST_CGS_BTU));
  rb_define_const(module, "SOLAR_MASS", rb_float_new(GSL_CONST_CGS_SOLAR_MASS));
#else
  rb_define_const(module, "BARN", rb_float_new(1e-24));
  rb_define_const(module, "BTU", rb_float_new(1.05505585262e10));
#endif
  rb_define_const(module, "LITER", rb_float_new(GSL_CONST_CGS_LITER));
  rb_define_const(module, "US_GALLON", rb_float_new(GSL_CONST_CGS_US_GALLON));
  rb_define_const(module, "QUART", rb_float_new(GSL_CONST_CGS_QUART));
  rb_define_const(module, "PINT", rb_float_new(GSL_CONST_CGS_PINT));
  rb_define_const(module, "CUP", rb_float_new(GSL_CONST_CGS_CUP));
  rb_define_const(module, "FLUID_OUNCE", rb_float_new(GSL_CONST_CGS_FLUID_OUNCE));
  rb_define_const(module, "TABLESPOON", rb_float_new(GSL_CONST_CGS_TABLESPOON));
  rb_define_const(module, "CANADIAN_GALLON", 
		  rb_float_new(GSL_CONST_CGS_CANADIAN_GALLON));

  rb_define_const(module, "UK_GALLON", rb_float_new(GSL_CONST_CGS_UK_GALLON));
  rb_define_const(module, "KILOMETERS_PER_HOUR", 
		  rb_float_new(GSL_CONST_CGS_MILES_PER_HOUR)); 
  rb_define_const(module, "MILES_PER_HOUR", 
		  rb_float_new(GSL_CONST_CGS_KILOMETERS_PER_HOUR));
  rb_define_const(module, "KNOT", rb_float_new(GSL_CONST_CGS_KNOT));
  rb_define_const(module, "POUND_MASS", rb_float_new(GSL_CONST_CGS_POUND_MASS));
  rb_define_const(module, "POUND_OUNCE", rb_float_new(GSL_CONST_CGS_OUNCE_MASS));
  rb_define_const(module, "POUND_TON", rb_float_new(GSL_CONST_CGS_TON));
  rb_define_const(module, "POUND_METRIC_TON", 
		  rb_float_new(GSL_CONST_CGS_METRIC_TON));
  rb_define_const(module, "POUND_UK_TON", rb_float_new(GSL_CONST_CGS_UK_TON));
  rb_define_const(module, "POUND_TROY_OUNCE", 
		  rb_float_new(GSL_CONST_CGS_TROY_OUNCE));
  rb_define_const(module, "CARAT", rb_float_new(GSL_CONST_CGS_CARAT));
  rb_define_const(module, "UNIFIED_ATOMIC_MASS", 
		  rb_float_new(GSL_CONST_CGS_UNIFIED_ATOMIC_MASS));
  rb_define_const(module, "GRAM_FORCE", rb_float_new(GSL_CONST_CGS_GRAM_FORCE));
  rb_define_const(module, "POUND_FORCE", rb_float_new(GSL_CONST_CGS_POUND_FORCE));
  rb_define_const(module, "KILOPOUND_FORCE", 
		  rb_float_new(GSL_CONST_CGS_KILOPOUND_FORCE));
  rb_define_const(module, "POUNDAL", rb_float_new(GSL_CONST_CGS_POUNDAL));
  rb_define_const(module, "CALORIE", rb_float_new(GSL_CONST_CGS_CALORIE));
  rb_define_const(module, "THERM", rb_float_new(GSL_CONST_CGS_THERM));
  rb_define_const(module, "HORSEPOWER", rb_float_new(GSL_CONST_CGS_HORSEPOWER));
  rb_define_const(module, "BAR", rb_float_new(GSL_CONST_CGS_BAR));
  rb_define_const(module, "STD_ATMOSPHERE", 
		  rb_float_new(GSL_CONST_CGS_STD_ATMOSPHERE));
  rb_define_const(module, "TORR", rb_float_new(GSL_CONST_CGS_TORR));
  rb_define_const(module, "METER_OF_MERCURY",
		  rb_float_new(GSL_CONST_CGS_METER_OF_MERCURY));
  rb_define_const(module, "INCH_OF_MERCURY", 
		  rb_float_new(GSL_CONST_CGS_INCH_OF_MERCURY));
  rb_define_const(module, "INCH_OF_WATER", 
		  rb_float_new(GSL_CONST_CGS_INCH_OF_WATER));
  rb_define_const(module, "PSI", rb_float_new(GSL_CONST_CGS_PSI));
  rb_define_const(module, "POISE", rb_float_new(GSL_CONST_CGS_POISE));
  rb_define_const(module, "STOKES", rb_float_new(GSL_CONST_CGS_STOKES));
  rb_define_const(module, "FARADAY", rb_float_new(GSL_CONST_CGS_FARADAY));
  rb_define_const(module, "ELECTRON_CHARGE", 
		  rb_float_new(GSL_CONST_CGS_ELECTRON_CHARGE));
  rb_define_const(module, "ELECTRON_CHARGE_ESU",
		  rb_float_new(GSL_CONST_CGS_ELECTRON_CHARGE*GSL_CONST_CGS_SPEED_OF_LIGHT));
  rb_define_const(module, "GAUSS", rb_float_new(GSL_CONST_CGS_GAUSS));
  rb_define_const(module, "STILB", rb_float_new(GSL_CONST_CGS_STILB));
  rb_define_const(module, "LUMEN", rb_float_new(GSL_CONST_CGS_LUMEN));
  rb_define_const(module, "LUX", rb_float_new(GSL_CONST_CGS_LUX));
  rb_define_const(module, "PHOT", rb_float_new(GSL_CONST_CGS_PHOT));
  rb_define_const(module, "FOOTCANDLE", rb_float_new(GSL_CONST_CGS_FOOTCANDLE));
  rb_define_const(module, "LAMBERT", rb_float_new(GSL_CONST_CGS_LAMBERT));
  rb_define_const(module, "CURIE", rb_float_new(GSL_CONST_CGS_CURIE));
  rb_define_const(module, "ROENTGEN", rb_float_new(GSL_CONST_CGS_ROENTGEN));
  rb_define_const(module, "RAD", rb_float_new(GSL_CONST_CGS_RAD));

  rb_define_const(module, "BOLTZMANN", rb_float_new(GSL_CONST_CGS_BOLTZMANN));
  rb_define_const(module, "MOLAR_GAS", rb_float_new(GSL_CONST_CGS_MOLAR_GAS));

#ifdef GSL_1_1_LATER
  rb_define_const(module, "BOHR_RADIUS", rb_float_new(GSL_CONST_CGS_BOHR_RADIUS));
#endif
#ifdef GSL_1_2_LATER
  rb_define_const(module, "NEWTON", rb_float_new(GSL_CONST_CGS_NEWTON));
  rb_define_const(module, "DYNE", rb_float_new(GSL_CONST_CGS_DYNE));
  rb_define_const(module, "JOULE", rb_float_new(GSL_CONST_CGS_JOULE));
  rb_define_const(module, "ERG", rb_float_new(GSL_CONST_CGS_ERG));
#endif

}

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));
#ifdef GSL_1_2_LATER
  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));
#endif
}

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);
}

#else

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));

#ifdef GSL_1_4_9_LATER
  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));
#endif


#ifdef GSL_1_8_LATER
  rb_define_const(module, "DEBYE", rb_float_new(GSL_CONST_MKSA_DEBYE));
#endif

}


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));
#ifndef GSL_1_13_LATER
  rb_define_const(module, "GAUSS", rb_float_new(GSL_CONST_CGSM_GAUSS));
#endif
  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));

#ifdef GSL_1_4_9_LATER
  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));
#endif
}

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);
}
#endif