stick 1.3.2 → 1.3.3
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGES +3 -4
- data/README +1 -1
- data/lib/stick/constants/cgs.rb +112 -110
- data/lib/stick/constants/mks.rb +6 -4
- data/lib/stick/constants/number.rb +3 -2
- data/lib/stick/constants/typeless_cgs.rb +105 -106
- data/lib/stick/constants/typeless_mks.rb +106 -107
- data/lib/stick/currency.rb +2 -0
- data/lib/stick/mapcar.rb +36 -23
- data/lib/stick/matrix.rb +10 -395
- data/lib/stick/matrix/core.rb +1408 -0
- data/lib/stick/matrix/exception.rb +23 -0
- data/lib/stick/matrix/givens.rb +59 -0
- data/lib/stick/matrix/hessenberg.rb +63 -0
- data/lib/stick/matrix/householder.rb +106 -0
- data/lib/stick/matrix/jacobi.rb +106 -0
- data/lib/stick/matrix/lu.rb +60 -0
- data/lib/stick/quaternion.rb +10 -6
- data/lib/stick/units.rb +2 -0
- data/lib/stick/units/base.rb +75 -72
- data/lib/stick/units/currency.rb +8 -8
- data/lib/stick/units/loaders.rb +3 -2
- data/lib/stick/units/units.rb +2 -0
- data/lib/stick/vector.rb +20 -0
- data/meta/MANIFEST +23 -3
- data/meta/stick.roll +1 -1
- data/task/tests/solo +293 -0
- data/test/spec_matrix.rb +3 -0
- data/test/test_constants.rb +4 -0
- data/test/test_currency.rb +2 -2
- data/test/test_matrix.rb +7 -1
- data/test/test_units.rb +2 -2
- metadata +15 -2
data/CHANGES
CHANGED
@@ -1,10 +1,9 @@
|
|
1
1
|
= Stick Change History
|
2
2
|
|
3
|
-
== 1.3.
|
3
|
+
== 1.3.3 / 2007-12-21
|
4
4
|
|
5
|
-
*
|
6
|
-
*
|
7
|
-
* This can be reconsidered later if Stick grows large enough to necessary.
|
5
|
+
* Copies Ruby 1.9's matrix.rb library to matrix/core.rb. (This lib needs some love.)
|
6
|
+
* Split Comins Bonchis' matrix extension into components.
|
8
7
|
|
9
8
|
== 1.3.0 / 2007-12-20
|
10
9
|
|
data/README
CHANGED
data/lib/stick/constants/cgs.rb
CHANGED
@@ -16,120 +16,122 @@
|
|
16
16
|
|
17
17
|
require 'stick/units'
|
18
18
|
|
19
|
+
module Stick #:nodoc:
|
19
20
|
module Constants
|
20
21
|
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
22
|
+
# = Constants in the CGS system (cm, g, s)
|
23
|
+
#
|
24
|
+
# Large assortment of real world contants. The constants are stored in
|
25
|
+
# the Math::Constants:CGS module. Math::Constants::CGS provides the
|
26
|
+
# constants in cm g s format, opposed to the standard m kg s.
|
27
|
+
#
|
28
|
+
# == Synopsis
|
29
|
+
#
|
30
|
+
# Stick::Constant::CGS::SPEED_OF_LIGHT #=> 2.99792458e10 cm / s
|
30
31
|
|
31
|
-
|
32
|
-
|
32
|
+
module CGS
|
33
|
+
extend Units
|
33
34
|
|
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
|
-
|
35
|
+
SPEED_OF_LIGHT = 2.99792458e10.cm/s # cm / s
|
36
|
+
GRAVITATIONAL_CONSTANT = 6.673e-8.cm**3/g*s**2 # cm^3 / g s^2
|
37
|
+
PLANCKS_CONSTANT_H = 6.62606876e-27.g*cm*82/s # g cm^2 / s
|
38
|
+
PLANCKS_CONSTANT_HBAR = 1.05457159642e-27.g*cm**2/s # g cm^2 / s
|
39
|
+
VACUUM_PERMEABILITY = 1.25663706144e-1.cm*g/A**2*s**2 # cm g / A^2 s^2
|
40
|
+
ASTRONOMICAL_UNIT = 1.49597870691e13.cm # cm
|
41
|
+
LIGHT_YEAR = 9.46053620707e17.cm # cm
|
42
|
+
PARSEC = 3.08567758135e18.cm # cm
|
43
|
+
GRAV_ACCEL = 9.80665e2.cm/s**2 # cm / s^2
|
44
|
+
ELECTRON_VOLT = 1.602176462e-12.g*cm**2/s**2 # g cm^2 / s^2
|
45
|
+
MASS_ELECTRON = 9.10938188e-28.g # g
|
46
|
+
MASS_MUON = 1.88353109e-25.g # g
|
47
|
+
MASS_PROTON = 1.67262158e-24.g # g
|
48
|
+
MASS_NEUTRON = 1.67492716e-24.g # g
|
49
|
+
RYDBERG = 2.17987190389e-11.g*cm**2/s**2 # g cm^2 / s^2
|
50
|
+
BOLTZMANN = 1.3806503e-16.g*cm**2/K*s**2 # g cm^2 / K s^2
|
51
|
+
BOHR_MAGNETON = 9.27400899e-20.A*cm**2 # A cm^2
|
52
|
+
NUCLEAR_MAGNETON = 5.05078317e-23.A*cm**2 # A cm^2
|
53
|
+
ELECTRON_MAGNETIC_MOMENT = 9.28476362e-20.A*cm**2 # A cm^2
|
54
|
+
PROTON_MAGNETIC_MOMENT = 1.410606633e-22.A*cm**2 # A cm^2
|
55
|
+
MOLAR_GAS = 8.314472e7.g*cm**2/K*mol*s**2 # g cm^2 / K mol s^2
|
56
|
+
STANDARD_GAS_VOLUME = 2.2710981e4.cm**3/mol # cm^3 / mol
|
57
|
+
MINUTE = 6e1.s # s
|
58
|
+
HOUR = 3.6e3.s # s
|
59
|
+
DAY = 8.64e4.s # s
|
60
|
+
WEEK = 6.048e5.s # s
|
61
|
+
INCH = 2.54e0.cm # cm
|
62
|
+
FOOT = 3.048e1.cm # cm
|
63
|
+
YARD = 9.144e1.cm # cm
|
64
|
+
MILE = 1.609344e5.cm # cm
|
65
|
+
NAUTICAL_MILE = 1.852e5.cm # cm
|
66
|
+
FATHOM = 1.8288e2.cm # cm
|
67
|
+
MIL = 2.54e-3.cm # cm
|
68
|
+
POINT = 3.52777777778e-2.cm # cm
|
69
|
+
TEXPOINT = 3.51459803515e-2.cm # cm
|
70
|
+
MICRON = 1e-4.cm # cm
|
71
|
+
ANGSTROM = 1e-8.cm # cm
|
72
|
+
HECTARE = 1e8.cm**2 # cm^2
|
73
|
+
ACRE = 4.04685642241e7.cm**2 # cm^2
|
74
|
+
BARN = 1e-24.cm**2 # cm^2
|
75
|
+
LITER = 1e3.cm**3 # cm^3
|
76
|
+
US_GALLON = 3.78541178402e3.cm**3 # cm^3
|
77
|
+
QUART = 9.46352946004e2.cm**3 # cm^3
|
78
|
+
PINT = 4.73176473002e2.cm**3 # cm^3
|
79
|
+
CUP = 2.36588236501e2.cm**3 # cm^3
|
80
|
+
FLUID_OUNCE = 2.95735295626e1.cm**3 # cm^3
|
81
|
+
TABLESPOON = 1.47867647813e1.cm**3 # cm^3
|
82
|
+
TEASPOON = 4.92892159375e0.cm**3 # cm^3
|
83
|
+
CANADIAN_GALLON = 4.54609e3.cm**3 # cm^3
|
84
|
+
UK_GALLON = 4.546092e3.cm**3 # cm^3
|
85
|
+
MILES_PER_HOUR = 4.4704e1.cm/s # cm / s
|
86
|
+
KILOMETERS_PER_HOUR = 2.77777777778e1.cm/s # cm / s
|
87
|
+
KNOT = 5.14444444444e1.cm/s # cm / s
|
88
|
+
POUND_MASS = 4.5359237e2.g # g
|
89
|
+
OUNCE_MASS = 2.8349523125e1.g # g
|
90
|
+
TON = 9.0718474e5.g # g
|
91
|
+
METRIC_TON = 1e6.g # g
|
92
|
+
UK_TON = 1.0160469088e6.g # g
|
93
|
+
TROY_OUNCE = 3.1103475e1.g # g
|
94
|
+
CARAT = 2e-1.g # g
|
95
|
+
UNIFIED_ATOMIC_MASS = 1.66053873e-24.g # g
|
96
|
+
GRAM_FORCE = 9.80665e2.cm*g/s**2 # cm g / s^2
|
97
|
+
POUND_FORCE = 4.44822161526e5.cm*g/s**2 # cm g / s^2
|
98
|
+
KILOPOUND_FORCE = 4.44822161526e8.cm*g/s**2 # cm g / s^2
|
99
|
+
POUNDAL = 1.38255e4.cm*g/s**2 # cm g / s^2
|
100
|
+
CALORIE = 4.1868e7.g*cm**2/s**2 # g cm^2 / s^2
|
101
|
+
BTU = 1.05505585262e10.g*cm**2/s**2 # g cm^2 / s^2
|
102
|
+
THERM = 1.05506e15.g*cm**2/s**2 # g cm^2 / s^2
|
103
|
+
HORSEPOWER = 7.457e9.g*cm**2/s**3 # g cm^2 / s^3
|
104
|
+
BAR = 1e6.g/cm*s**2 # g / cm s^2
|
105
|
+
STD_ATMOSPHERE = 1.01325e6.g/cm*s**2 # g / cm s^2
|
106
|
+
TORR = 1.33322368421e3.g/cm*s**2 # g / cm s^2
|
107
|
+
METER_OF_MERCURY = 1.33322368421e6.g/cm*s**2 # g / cm s^2
|
108
|
+
INCH_OF_MERCURY = 3.38638815789e4.g/cm*s**2 # g / cm s^2
|
109
|
+
INCH_OF_WATER = 2.490889e3.g/cm*s**2 # g / cm s^2
|
110
|
+
PSI = 6.89475729317e4.g/cm*s**2 # g / cm s^2
|
111
|
+
POISE = 1e0.g/cm*s # g / cm s
|
112
|
+
STOKES = 1e0.cm**2/s # cm^2 / s
|
113
|
+
FARADAY = 9.6485341472e4.A*s/mol # A s / mol
|
114
|
+
ELECTRON_CHARGE = 1.602176462e-19.A*s # A s
|
115
|
+
GAUSS = 1e-1.g/A*s**2 # g / A s^2
|
116
|
+
STILB = 1e0.cd/cm**2 # cd / cm^2
|
117
|
+
LUMEN = 1e0.cd*sr # cd sr
|
118
|
+
LUX = 1e-4.cd*sr/cm*2 # cd sr / cm^2
|
119
|
+
PHOT = 1e0.cd*sr/cm*2 # cd sr / cm^2
|
120
|
+
FOOTCANDLE = 1.076e-3.cd*sr/cm*2 # cd sr / cm^2
|
121
|
+
LAMBERT = 1e0.cd*sr/cm*2 # cd sr / cm^2
|
122
|
+
FOOTLAMBERT = 1.07639104e-3.cd*sr/cm*2 # cd sr / cm^2
|
123
|
+
CURIE = 3.7e10/1.s # 1 / s
|
124
|
+
ROENTGEN = 2.58e-7.A*s/g # A s / g
|
125
|
+
RAD = 1e2.cm**2/s**2 # cm^2 / s^2
|
126
|
+
SOLAR_MASS = 1.98892e33.g # g
|
127
|
+
BOHR_RADIUS = 5.291772083e-9.cm # cm
|
128
|
+
VACUUM_PERMITTIVITY = 8.854187817e-21.A**2*s**4/g*cm*83 # A^2 s^4 / g cm^3
|
129
|
+
NEWTON = 1e5.cm*g/s**2 # cm g / s^2
|
130
|
+
DYNE = 1e0.cm*g/s**2 # cm g / s^2
|
131
|
+
JOULE = 1e7.g*cm**2/s**2 # g cm^2 / s^2
|
132
|
+
ERG = 1e0.g*cm**2/s**2 # g cm^2 / s^2
|
133
|
+
end
|
133
134
|
|
134
135
|
end
|
136
|
+
end
|
135
137
|
|
data/lib/stick/constants/mks.rb
CHANGED
@@ -14,7 +14,9 @@
|
|
14
14
|
# - Daniel Carrera
|
15
15
|
# - Brian Gough
|
16
16
|
|
17
|
-
|
17
|
+
require 'stick/units'
|
18
|
+
|
19
|
+
module Stick
|
18
20
|
module Constants
|
19
21
|
|
20
22
|
# = Constants in the MKS system (meters, kg, sec)
|
@@ -121,7 +123,7 @@ module Constants
|
|
121
123
|
FOOTCANDLE = 1.076e1.cd*sr/m**2 # cd sr / m^2
|
122
124
|
LAMBERT = 1e4.cd*sr/m**2 # cd sr / m^2
|
123
125
|
FOOTLAMBERT = 1.07639104e1.cd*sr/m**2 # cd sr / m^2
|
124
|
-
CURIE = 3.7e10/s
|
126
|
+
CURIE = 3.7e10/1.s # 1 / s
|
125
127
|
ROENTGEN = 2.58e-4.A*s/kg # A s / kg
|
126
128
|
RAD = 1e-2.m**2/s**2 # m^2 / s^2
|
127
129
|
SOLAR_MASS = 1.98892e30.kg # kg
|
@@ -134,8 +136,8 @@ module Constants
|
|
134
136
|
end
|
135
137
|
|
136
138
|
end
|
137
|
-
|
139
|
+
end
|
138
140
|
|
139
141
|
module Math
|
140
|
-
include ::Constants::MKS
|
142
|
+
include Stick::Constants::MKS
|
141
143
|
end
|
@@ -14,114 +14,113 @@
|
|
14
14
|
# - Brian Gough
|
15
15
|
# - Thomas Sawyer
|
16
16
|
|
17
|
-
|
17
|
+
module Stick #:nodoc:
|
18
18
|
module Constants
|
19
|
+
module Typeless
|
19
20
|
|
20
|
-
|
21
|
-
|
22
|
-
# Unitless Constants in the CGS system (cm, kg, s)
|
23
|
-
|
24
|
-
module CGS
|
25
|
-
SPEED_OF_LIGHT = 2.99792458e10 # cm / s
|
26
|
-
GRAVITATIONAL_CONSTANT = 6.673e-8 # cm^3 / g s^2
|
27
|
-
PLANCKS_CONSTANT_H = 6.62606876e-27 # g cm^2 / s
|
28
|
-
PLANCKS_CONSTANT_HBAR = 1.05457159642e-27 # g cm^2 / s
|
29
|
-
VACUUM_PERMEABILITY = 1.25663706144e-1 # cm g / A^2 s^2
|
30
|
-
ASTRONOMICAL_UNIT = 1.49597870691e13 # cm
|
31
|
-
LIGHT_YEAR = 9.46053620707e17 # cm
|
32
|
-
PARSEC = 3.08567758135e18 # cm
|
33
|
-
GRAV_ACCEL = 9.80665e2 # cm / s^2
|
34
|
-
ELECTRON_VOLT = 1.602176462e-12 # g cm^2 / s^2
|
35
|
-
MASS_ELECTRON = 9.10938188e-28 # g
|
36
|
-
MASS_MUON = 1.88353109e-25 # g
|
37
|
-
MASS_PROTON = 1.67262158e-24 # g
|
38
|
-
MASS_NEUTRON = 1.67492716e-24 # g
|
39
|
-
RYDBERG = 2.17987190389e-11 # g cm^2 / s^2
|
40
|
-
BOLTZMANN = 1.3806503e-16 # g cm^2 / K s^2
|
41
|
-
BOHR_MAGNETON = 9.27400899e-20 # A cm^2
|
42
|
-
NUCLEAR_MAGNETON = 5.05078317e-23 # A cm^2
|
43
|
-
ELECTRON_MAGNETIC_MOMENT = 9.28476362e-20 # A cm^2
|
44
|
-
PROTON_MAGNETIC_MOMENT = 1.410606633e-22 # A cm^2
|
45
|
-
MOLAR_GAS = 8.314472e7 # g cm^2 / K mol s^2
|
46
|
-
STANDARD_GAS_VOLUME = 2.2710981e4 # cm^3 / mol
|
47
|
-
MINUTE = 6e1 # s
|
48
|
-
HOUR = 3.6e3 # s
|
49
|
-
DAY = 8.64e4 # s
|
50
|
-
WEEK = 6.048e5 # s
|
51
|
-
INCH = 2.54e0 # cm
|
52
|
-
FOOT = 3.048e1 # cm
|
53
|
-
YARD = 9.144e1 # cm
|
54
|
-
MILE = 1.609344e5 # cm
|
55
|
-
NAUTICAL_MILE = 1.852e5 # cm
|
56
|
-
FATHOM = 1.8288e2 # cm
|
57
|
-
MIL = 2.54e-3 # cm
|
58
|
-
POINT = 3.52777777778e-2 # cm
|
59
|
-
TEXPOINT = 3.51459803515e-2 # cm
|
60
|
-
MICRON = 1e-4 # cm
|
61
|
-
ANGSTROM = 1e-8 # cm
|
62
|
-
HECTARE = 1e8 # cm^2
|
63
|
-
ACRE = 4.04685642241e7 # cm^2
|
64
|
-
BARN = 1e-24 # cm^2
|
65
|
-
LITER = 1e3 # cm^3
|
66
|
-
US_GALLON = 3.78541178402e3 # cm^3
|
67
|
-
QUART = 9.46352946004e2 # cm^3
|
68
|
-
PINT = 4.73176473002e2 # cm^3
|
69
|
-
CUP = 2.36588236501e2 # cm^3
|
70
|
-
FLUID_OUNCE = 2.95735295626e1 # cm^3
|
71
|
-
TABLESPOON = 1.47867647813e1 # cm^3
|
72
|
-
TEASPOON = 4.92892159375e0 # cm^3
|
73
|
-
CANADIAN_GALLON = 4.54609e3 # cm^3
|
74
|
-
UK_GALLON = 4.546092e3 # cm^3
|
75
|
-
MILES_PER_HOUR = 4.4704e1 # cm / s
|
76
|
-
KILOMETERS_PER_HOUR = 2.77777777778e1 # cm / s
|
77
|
-
KNOT = 5.14444444444e1 # cm / s
|
78
|
-
POUND_MASS = 4.5359237e2 # g
|
79
|
-
OUNCE_MASS = 2.8349523125e1 # g
|
80
|
-
TON = 9.0718474e5 # g
|
81
|
-
METRIC_TON = 1e6 # g
|
82
|
-
UK_TON = 1.0160469088e6 # g
|
83
|
-
TROY_OUNCE = 3.1103475e1 # g
|
84
|
-
CARAT = 2e-1 # g
|
85
|
-
UNIFIED_ATOMIC_MASS = 1.66053873e-24 # g
|
86
|
-
GRAM_FORCE = 9.80665e2 # cm g / s^2
|
87
|
-
POUND_FORCE = 4.44822161526e5 # cm g / s^2
|
88
|
-
KILOPOUND_FORCE = 4.44822161526e8 # cm g / s^2
|
89
|
-
POUNDAL = 1.38255e4 # cm g / s^2
|
90
|
-
CALORIE = 4.1868e7 # g cm^2 / s^2
|
91
|
-
BTU = 1.05505585262e10 # g cm^2 / s^2
|
92
|
-
THERM = 1.05506e15 # g cm^2 / s^2
|
93
|
-
HORSEPOWER = 7.457e9 # g cm^2 / s^3
|
94
|
-
BAR = 1e6 # g / cm s^2
|
95
|
-
STD_ATMOSPHERE = 1.01325e6 # g / cm s^2
|
96
|
-
TORR = 1.33322368421e3 # g / cm s^2
|
97
|
-
METER_OF_MERCURY = 1.33322368421e6 # g / cm s^2
|
98
|
-
INCH_OF_MERCURY = 3.38638815789e4 # g / cm s^2
|
99
|
-
INCH_OF_WATER = 2.490889e3 # g / cm s^2
|
100
|
-
PSI = 6.89475729317e4 # g / cm s^2
|
101
|
-
POISE = 1e0 # g / cm s
|
102
|
-
STOKES = 1e0 # cm^2 / s
|
103
|
-
FARADAY = 9.6485341472e4 # A s / mol
|
104
|
-
ELECTRON_CHARGE = 1.602176462e-19 # A s
|
105
|
-
GAUSS = 1e-1 # g / A s^2
|
106
|
-
STILB = 1e0 # cd / cm^2
|
107
|
-
LUMEN = 1e0 # cd sr
|
108
|
-
LUX = 1e-4 # cd sr / cm^2
|
109
|
-
PHOT = 1e0 # cd sr / cm^2
|
110
|
-
FOOTCANDLE = 1.076e-3 # cd sr / cm^2
|
111
|
-
LAMBERT = 1e0 # cd sr / cm^2
|
112
|
-
FOOTLAMBERT = 1.07639104e-3 # cd sr / cm^2
|
113
|
-
CURIE = 3.7e10 # 1 / s
|
114
|
-
ROENTGEN = 2.58e-7 # A s / g
|
115
|
-
RAD = 1e2 # cm^2 / s^2
|
116
|
-
SOLAR_MASS = 1.98892e33 # g
|
117
|
-
BOHR_RADIUS = 5.291772083e-9 # cm
|
118
|
-
VACUUM_PERMITTIVITY = 8.854187817e-21 # A^2 s^4 / g cm^3
|
119
|
-
NEWTON = 1e5 # cm g / s^2
|
120
|
-
DYNE = 1e0 # cm g / s^2
|
121
|
-
JOULE = 1e7 # g cm^2 / s^2
|
122
|
-
ERG = 1e0 # g cm^2 / s^2
|
123
|
-
end
|
21
|
+
# Unitless Constants in the CGS system (cm, kg, s)
|
124
22
|
|
125
|
-
|
23
|
+
module CGS
|
24
|
+
SPEED_OF_LIGHT = 2.99792458e10 # cm / s
|
25
|
+
GRAVITATIONAL_CONSTANT = 6.673e-8 # cm^3 / g s^2
|
26
|
+
PLANCKS_CONSTANT_H = 6.62606876e-27 # g cm^2 / s
|
27
|
+
PLANCKS_CONSTANT_HBAR = 1.05457159642e-27 # g cm^2 / s
|
28
|
+
VACUUM_PERMEABILITY = 1.25663706144e-1 # cm g / A^2 s^2
|
29
|
+
ASTRONOMICAL_UNIT = 1.49597870691e13 # cm
|
30
|
+
LIGHT_YEAR = 9.46053620707e17 # cm
|
31
|
+
PARSEC = 3.08567758135e18 # cm
|
32
|
+
GRAV_ACCEL = 9.80665e2 # cm / s^2
|
33
|
+
ELECTRON_VOLT = 1.602176462e-12 # g cm^2 / s^2
|
34
|
+
MASS_ELECTRON = 9.10938188e-28 # g
|
35
|
+
MASS_MUON = 1.88353109e-25 # g
|
36
|
+
MASS_PROTON = 1.67262158e-24 # g
|
37
|
+
MASS_NEUTRON = 1.67492716e-24 # g
|
38
|
+
RYDBERG = 2.17987190389e-11 # g cm^2 / s^2
|
39
|
+
BOLTZMANN = 1.3806503e-16 # g cm^2 / K s^2
|
40
|
+
BOHR_MAGNETON = 9.27400899e-20 # A cm^2
|
41
|
+
NUCLEAR_MAGNETON = 5.05078317e-23 # A cm^2
|
42
|
+
ELECTRON_MAGNETIC_MOMENT = 9.28476362e-20 # A cm^2
|
43
|
+
PROTON_MAGNETIC_MOMENT = 1.410606633e-22 # A cm^2
|
44
|
+
MOLAR_GAS = 8.314472e7 # g cm^2 / K mol s^2
|
45
|
+
STANDARD_GAS_VOLUME = 2.2710981e4 # cm^3 / mol
|
46
|
+
MINUTE = 6e1 # s
|
47
|
+
HOUR = 3.6e3 # s
|
48
|
+
DAY = 8.64e4 # s
|
49
|
+
WEEK = 6.048e5 # s
|
50
|
+
INCH = 2.54e0 # cm
|
51
|
+
FOOT = 3.048e1 # cm
|
52
|
+
YARD = 9.144e1 # cm
|
53
|
+
MILE = 1.609344e5 # cm
|
54
|
+
NAUTICAL_MILE = 1.852e5 # cm
|
55
|
+
FATHOM = 1.8288e2 # cm
|
56
|
+
MIL = 2.54e-3 # cm
|
57
|
+
POINT = 3.52777777778e-2 # cm
|
58
|
+
TEXPOINT = 3.51459803515e-2 # cm
|
59
|
+
MICRON = 1e-4 # cm
|
60
|
+
ANGSTROM = 1e-8 # cm
|
61
|
+
HECTARE = 1e8 # cm^2
|
62
|
+
ACRE = 4.04685642241e7 # cm^2
|
63
|
+
BARN = 1e-24 # cm^2
|
64
|
+
LITER = 1e3 # cm^3
|
65
|
+
US_GALLON = 3.78541178402e3 # cm^3
|
66
|
+
QUART = 9.46352946004e2 # cm^3
|
67
|
+
PINT = 4.73176473002e2 # cm^3
|
68
|
+
CUP = 2.36588236501e2 # cm^3
|
69
|
+
FLUID_OUNCE = 2.95735295626e1 # cm^3
|
70
|
+
TABLESPOON = 1.47867647813e1 # cm^3
|
71
|
+
TEASPOON = 4.92892159375e0 # cm^3
|
72
|
+
CANADIAN_GALLON = 4.54609e3 # cm^3
|
73
|
+
UK_GALLON = 4.546092e3 # cm^3
|
74
|
+
MILES_PER_HOUR = 4.4704e1 # cm / s
|
75
|
+
KILOMETERS_PER_HOUR = 2.77777777778e1 # cm / s
|
76
|
+
KNOT = 5.14444444444e1 # cm / s
|
77
|
+
POUND_MASS = 4.5359237e2 # g
|
78
|
+
OUNCE_MASS = 2.8349523125e1 # g
|
79
|
+
TON = 9.0718474e5 # g
|
80
|
+
METRIC_TON = 1e6 # g
|
81
|
+
UK_TON = 1.0160469088e6 # g
|
82
|
+
TROY_OUNCE = 3.1103475e1 # g
|
83
|
+
CARAT = 2e-1 # g
|
84
|
+
UNIFIED_ATOMIC_MASS = 1.66053873e-24 # g
|
85
|
+
GRAM_FORCE = 9.80665e2 # cm g / s^2
|
86
|
+
POUND_FORCE = 4.44822161526e5 # cm g / s^2
|
87
|
+
KILOPOUND_FORCE = 4.44822161526e8 # cm g / s^2
|
88
|
+
POUNDAL = 1.38255e4 # cm g / s^2
|
89
|
+
CALORIE = 4.1868e7 # g cm^2 / s^2
|
90
|
+
BTU = 1.05505585262e10 # g cm^2 / s^2
|
91
|
+
THERM = 1.05506e15 # g cm^2 / s^2
|
92
|
+
HORSEPOWER = 7.457e9 # g cm^2 / s^3
|
93
|
+
BAR = 1e6 # g / cm s^2
|
94
|
+
STD_ATMOSPHERE = 1.01325e6 # g / cm s^2
|
95
|
+
TORR = 1.33322368421e3 # g / cm s^2
|
96
|
+
METER_OF_MERCURY = 1.33322368421e6 # g / cm s^2
|
97
|
+
INCH_OF_MERCURY = 3.38638815789e4 # g / cm s^2
|
98
|
+
INCH_OF_WATER = 2.490889e3 # g / cm s^2
|
99
|
+
PSI = 6.89475729317e4 # g / cm s^2
|
100
|
+
POISE = 1e0 # g / cm s
|
101
|
+
STOKES = 1e0 # cm^2 / s
|
102
|
+
FARADAY = 9.6485341472e4 # A s / mol
|
103
|
+
ELECTRON_CHARGE = 1.602176462e-19 # A s
|
104
|
+
GAUSS = 1e-1 # g / A s^2
|
105
|
+
STILB = 1e0 # cd / cm^2
|
106
|
+
LUMEN = 1e0 # cd sr
|
107
|
+
LUX = 1e-4 # cd sr / cm^2
|
108
|
+
PHOT = 1e0 # cd sr / cm^2
|
109
|
+
FOOTCANDLE = 1.076e-3 # cd sr / cm^2
|
110
|
+
LAMBERT = 1e0 # cd sr / cm^2
|
111
|
+
FOOTLAMBERT = 1.07639104e-3 # cd sr / cm^2
|
112
|
+
CURIE = 3.7e10 # 1 / s
|
113
|
+
ROENTGEN = 2.58e-7 # A s / g
|
114
|
+
RAD = 1e2 # cm^2 / s^2
|
115
|
+
SOLAR_MASS = 1.98892e33 # g
|
116
|
+
BOHR_RADIUS = 5.291772083e-9 # cm
|
117
|
+
VACUUM_PERMITTIVITY = 8.854187817e-21 # A^2 s^4 / g cm^3
|
118
|
+
NEWTON = 1e5 # cm g / s^2
|
119
|
+
DYNE = 1e0 # cm g / s^2
|
120
|
+
JOULE = 1e7 # g cm^2 / s^2
|
121
|
+
ERG = 1e0 # g cm^2 / s^2
|
122
|
+
end
|
126
123
|
|
127
124
|
end
|
125
|
+
end
|
126
|
+
end
|