-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconsts.h
308 lines (291 loc) · 7.09 KB
/
consts.h
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
/* This file is part of 34S.
*
* 34S is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* 34S is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with 34S. If not, see <http://www.gnu.org/licenses/>.
*
*
* This file is automatically generated.
* Changes will not be preserved.
*/
#ifndef __CONSTS_H__
#define __CONSTS_H__
#include "xeq.h"
#define CONST_NAMELEN 4
#define METRIC_NAMELEN 2
#define IMPERIAL_NAMELEN 6
struct cnsts {
unsigned char index;
const char cname[CONST_NAMELEN];
#if ! defined(REALBUILD) || defined(COMPILE_CATALOGUES)
const char *alias;
#endif
};
/* Table of user visible constants */
extern const struct cnsts cnsts[];
#define NUM_CONSTS_CAT 76
#define NUM_CONSTS 89
#define CONSTANT(n) ((decimal64 *) get_const(n, 0))
#define CONSTANT_DBL(n) ((decimal128 *) get_const(n, 1))
#define CONST(n) RARG(RARG_CONST, n)
#define CONST_CMPLX(n) RARG(RARG_CONST_CMPLX, n)
enum {
OP_HALF = 0,
OP_PC_a,
OP_PC_a0,
OP_PC_SM_luna,
OP_PC_SM_terra,
OP_PC_C,
OP_PC_C1,
OP_PC_C2,
OP_PC_eV,
OP_CNSTE,
OP_PC_F,
OP_PC_F_alpha,
OP_PC_F_delta,
OP_PC_g,
OP_PC_G,
OP_PC_Go,
OP_PC_catalan,
OP_PC_Ge,
OP_PC_WGS_GM,
OP_PC_PLANK,
OP_PC_hon2PI,
OP_PC_k,
OP_PC_Jk,
OP_PC_PlanckL,
OP_PC_me,
OP_PC_M_luna,
OP_PC_mn,
OP_PC_mp,
OP_PC_PlanckM,
OP_PC_mu,
OP_PC_muc2,
OP_PC_mMu,
OP_PC_M_sol,
OP_PC_M_terra,
OP_PC_Na,
OP_NAN,
OP_PC_atm,
OP_PC_PlanckQ,
OP_PC_R,
OP_PC_Re,
OP_PC_Rk,
OP_PC_R_luna,
OP_PC_Rinf,
OP_PC_R_sol,
OP_PC_R_terra,
OP_PC_WGS_A,
OP_PC_WGS_B,
OP_PC_WGS_E2,
OP_PC_WGS_ES2,
OP_PC_WGS_F,
OP_PC_t,
OP_PC_tp,
OP_PC_PlanckTh,
OP_PC_Vm,
OP_PC_Zo,
OP_PC_alpha,
OP_EULER,
OP_PC_gamP,
OP_PC_eps0,
OP_PC_lamC,
OP_PC_lamCn,
OP_PC_lamCp,
OP_PC_mu0,
OP_PC_muB,
OP_PC_muE,
OP_PC_mun,
OP_PC_muP,
OP_PC_mu_u,
OP_PC_mumu,
OP_PC_sigma,
OP_PHI,
OP_PC_phi0,
OP_PC_WGS_OMEGA,
OP_NEGINF,
OP_INF,
OP_ZERO,
OP_ONE,
OP_HIGH_RECIP_E,
OP_LOW_RECIP_E,
OP_RECIP_SQRT5,
OP_RECIP_SQRTPI,
OP_POINT_2214,
OP_RECIPLN10,
OP_LN2,
OP_RECIPLN2,
OP_PI,
OP_PIon2,
OP_SQRT_2_PI,
OP_INT_R_BOUNDS,
};
extern const decimal64 cnsts_d64[];
extern const decimal128 cnsts_d128[];
struct cnsts_conv {
decimal64 x;
const char metric[METRIC_NAMELEN];
const char imperial[IMPERIAL_NAMELEN];
};
/* Table of metric/imperial conversion constants */
extern const struct cnsts_conv cnsts_conv[];
#define NUM_CONSTS_CONV 38
#define CONSTANT_CONV(n) (cnsts_conv[n].x)
enum {
OP_KG_LBM = 0,
OP_KG_STONE,
OP_KG_CWT,
OP_KG_SHCWT,
OP_G_OZ,
OP_G_TOZ,
OP_L_GALUK,
OP_L_GALUS,
OP_L_CUBFT,
OP_ML_FLOZUK,
OP_ML_FLOZUS,
OP_CM_INCH,
OP_M_FATHOM,
OP_M_FEET,
OP_M_FEETUS,
OP_M_YARD,
OP_KM_MILE,
OP_KM_LY,
OP_KM_PC,
OP_KM_AU,
OP_KM_NMI,
OP_HA_ACREUK,
OP_HA_ACREUS,
OP_N_LBF,
OP_J_BTU,
OP_J_CAL,
OP_J_kWh,
OP_Pa_ATM,
OP_Pa_bar,
OP_Pa_mmHg,
OP_Pa_psi,
OP_Pa_inhg,
OP_Pa_torr,
OP_W_HP550,
OP_W_HP,
OP_W_HPe,
OP_T_TON,
OP_T_SHTON,
};
#define CONST_CONV(n) RARG(RARG_CONST_CONV, n)
extern const decNumber const_NaN;
extern const decNumber const_inf;
extern const decNumber const__inf;
extern const decNumber const__3;
extern const decNumber const__2;
extern const decNumber const__1;
extern const decNumber const__0;
extern const decNumber const_0;
extern const decNumber const_1;
extern const decNumber const_2;
extern const decNumber const_3;
extern const decNumber const_4;
extern const decNumber const_5;
extern const decNumber const_6;
extern const decNumber const_7;
extern const decNumber const_8;
extern const decNumber const_9;
extern const decNumber const_10;
extern const decNumber const_15;
extern const decNumber const_16;
extern const decNumber const_20;
extern const decNumber const_21;
extern const decNumber const_32;
extern const decNumber const_60;
extern const decNumber const_90;
extern const decNumber const_100;
extern const decNumber const_150;
extern const decNumber const_256;
extern const decNumber const_300;
extern const decNumber const_360;
extern const decNumber const_400;
extern const decNumber const_500;
extern const decNumber const_9000;
extern const decNumber const_36000;
extern const decNumber const_100000;
extern const decNumber const_1e_32;
extern const decNumber const_1e_37;
extern const decNumber const_1e_10000;
extern const decNumber const_1e_24;
extern const decNumber const_1e_14;
extern const decNumber const_hms_threshold;
extern const decNumber const_0_0001;
extern const decNumber const_0_001;
extern const decNumber const_0_1;
extern const decNumber const_0_0195;
extern const decNumber const_0_2;
extern const decNumber const_0_2214;
extern const decNumber const_0_25;
extern const decNumber const_0_04;
extern const decNumber const_0_05;
extern const decNumber const_0_4;
extern const decNumber const_0_5;
extern const decNumber const__0_5;
extern const decNumber const_0_6;
extern const decNumber const_0_665;
extern const decNumber const_0_75;
extern const decNumber const_0_85;
extern const decNumber const_0_9;
extern const decNumber const_0_97;
extern const decNumber const_0_995;
extern const decNumber const_2on3;
extern const decNumber const_5on6;
extern const decNumber const_1on60;
extern const decNumber const_1_3;
extern const decNumber const_1_5;
extern const decNumber const_1_7;
extern const decNumber const_9on5;
extern const decNumber const_2_326;
extern const decNumber const_root2on2;
extern const decNumber const_e;
extern const decNumber const_PI;
extern const decNumber const_2PI;
extern const decNumber const_sqrt2PI;
extern const decNumber const_recipsqrt2PI;
extern const decNumber const_PIon2;
extern const decNumber const_PIon180;
extern const decNumber const_PIon200;
extern const decNumber const_ln2;
extern const decNumber const_ln10;
extern const decNumber const_phi;
extern const decNumber const_egamma;
extern const decNumber const__1onPI;
extern const decNumber const_2pow64;
extern const decNumber const_randfac;
extern const decNumber const_gammaR;
extern const decNumber const_gammaC00;
extern const decNumber const_gammaC01;
extern const decNumber const_gammaC02;
extern const decNumber const_gammaC03;
extern const decNumber const_gammaC04;
extern const decNumber const_gammaC05;
extern const decNumber const_gammaC06;
extern const decNumber const_gammaC07;
extern const decNumber const_gammaC08;
extern const decNumber const_gammaC09;
extern const decNumber const_gammaC10;
extern const decNumber const_gammaC11;
extern const decNumber const_gammaC12;
extern const decNumber const_gammaC13;
extern const decNumber const_gammaC14;
extern const decNumber const_gammaC15;
extern const decNumber const_gammaC16;
extern const decNumber const_gammaC17;
extern const decNumber const_gammaC18;
extern const decNumber const_gammaC19;
extern const decNumber const_gammaC20;
extern const decNumber const_gammaC21;
#endif