Constants

Contributions to this software library are always welcome. Please ensure that you post program listings rather than .raw files. They give a reasonable idea of what your program does without having to load them into a DM42 and you can also include comments in your code. Check out the following link for a decoder/encoder: https://technical.swissmicros.com/decoders/dm42/

You can then copy/paste the listing and post it in "code" tags.
grsbanks
Posts: 1122
Joined: Tue Apr 25, 2017 11:23 am
Location: Preston, Lancs, UK
Contact:

Constants

Post by grsbanks »

A library of physical constants was asked for recently so I came up with this solution to the problem. The constants here are based on those embedded in the HP-35S:

Code: Select all

00 { 1070-Byte Prgm }
01▸LBL "CONST"
02▸LBL A
03 "c"
04 KEY 1 XEQ 01
05 "g"
06 KEY 2 XEQ 02
07 "G"
08 KEY 3 XEQ 03
09 "Vm"
10 KEY 4 XEQ 04
11 "NA"
12 KEY 5 XEQ 05
13 "Rydb"
14 KEY 6 XEQ 06
15 KEY 7 GTO G
16 KEY 8 GTO B
17 KEY 9 GTO I
18 MENU
19 STOP
20 GTO A
21▸LBL I
22 EXITALL
23 STOP
24 GTO A
25▸LBL 01
26 299792458
27 RTN
28▸LBL 02
29 9.80665
30 RTN
31▸LBL 03
32 6673ᴇ-14
33 RTN
34▸LBL 04
35 0.022413996
36 RTN
37▸LBL 05
38 602214199ᴇ15
39 RTN
40▸LBL 06
41 10973731.5685
42 RTN
43▸LBL B
44 "eV"
45 KEY 1 XEQ 11
46 "me"
47 KEY 2 XEQ 12
48 "mp"
49 KEY 3 XEQ 13
50 "mn"
51 KEY 4 XEQ 14
52 "mμ"
53 KEY 5 XEQ 15
54 "k"
55 KEY 6 XEQ 16
56 KEY 7 GTO A
57 KEY 8 GTO C
58 KEY 9 GTO I
59 MENU
60 STOP
61 GTO B
62▸LBL 11
63 1602176462ᴇ-28
64 RTN
65▸LBL 12
66 910938188ᴇ23
67 RTN
68▸LBL 13
69 167262158ᴇ-35
70 RTN
71▸LBL 14
72 167492716ᴇ-35
73 RTN
74▸LBL 15
75 188353109ᴇ-36
76 RTN
77▸LBL 16
78 13806503ᴇ-30
79 RTN
80▸LBL C
81 "h"
82 KEY 1 XEQ 21
83 "MagFQ"
84 KEY 2 XEQ 22
85 "ao"
86 KEY 3 XEQ 23
87 "ᴇo"
88 KEY 4 XEQ 24
89 "R"
90 KEY 5 XEQ 25
91 "F"
92 KEY 6 XEQ 26
93 KEY 7 GTO B
94 KEY 8 GTO D
95 KEY 9 GTO I
96 MENU
97 STOP
98 GTO C
99▸LBL 21
100 662606876ᴇ-42
101 RTN
102▸LBL 22
103 2067833636ᴇ-24
104 RTN
105▸LBL 23
106 5291772083ᴇ-20
107 RTN
108▸LBL 24
109 8854187817ᴇ-21
110 RTN
111▸LBL 25
112 8.314472
113 RTN
114▸LBL 26
115 96485.3415
116 RTN
117▸LBL D
118 "u"
119 KEY 1 XEQ 31
120 "μo"
121 KEY 2 XEQ 32
122 "μB"
123 KEY 3 XEQ 33
124 "μN"
125 KEY 4 XEQ 34
126 "μP"
127 KEY 5 XEQ 35
128 "μe"
129 KEY 6 XEQ 36
130 KEY 7 GTO C
131 KEY 8 GTO E
132 KEY 9 GTO I
133 MENU
134 STOP
135 GTO D
136▸LBL 31
137 166053873ᴇ-35
138 RTN
139▸LBL 32
140 1.2566370614ᴇ-6
141 RTN
142▸LBL 33
143 927400899ᴇ-32
144 RTN
145▸LBL 34
146 505078317ᴇ-35
147 RTN
148▸LBL 35
149 1410606633ᴇ-35
150 RTN
151▸LBL 36
152 -928476362ᴇ-32
153 RTN
154▸LBL E
155 "μn"
156 KEY 1 XEQ 41
157 "μμ"
158 KEY 2 XEQ 42
159 "re"
160 KEY 3 XEQ 43
161 "Zo"
162 KEY 4 XEQ 44
163 "/\c"
164 KEY 5 XEQ 45
165 "/\cn"
166 KEY 6 XEQ 46
167 KEY 7 GTO D
168 KEY 8 GTO F
169 KEY 9 GTO I
170 MENU
171 STOP
172 GTO E
173▸LBL 41
174 -9662364ᴇ-33
175 RTN
176▸LBL 42
177 -449044813ᴇ-34
178 RTN
179▸LBL 43
180 2817940285ᴇ-24
181 RTN
182▸LBL 44
183 376.730313461
184 RTN
185▸LBL 45
186 2426310215ᴇ-21
187 RTN
188▸LBL 46
189 1319590898ᴇ-24
190 RTN
191▸LBL F
192 "/\cp"
193 KEY 1 XEQ 51
194 "a"
195 KEY 2 XEQ 52
196 "s"
197 KEY 3 XEQ 53
198 "t"
199 KEY 4 XEQ 54
200 "atm"
201 KEY 5 XEQ 55
202 "gP"
203 KEY 6 XEQ 56
204 KEY 7 GTO E
205 KEY 8 GTO G
206 KEY 9 GTO I
207 MENU
208 STOP
209 GTO F
210▸LBL 51
211 1321409847ᴇ-24
212 RTN
213▸LBL 52
214 0.007297352533
215 RTN
216▸LBL 53
217 5.6704ᴇ-8
218 RTN
219▸LBL 54
220 273.15
221 RTN
222▸LBL 55
223 101325
224 RTN
225▸LBL 56
226 267522212
227 RTN
228▸LBL G
229 CLMENU
230 "C1"
231 KEY 1 XEQ 61
232 "C2"
233 KEY 2 XEQ 62
234 "Go"
235 KEY 3 XEQ 63
236 "e"
237 KEY 4 XEQ 64
238 KEY 7 GTO F
239 KEY 8 GTO A
240 KEY 9 GTO I
241 MENU
242 STOP
243 GTO G
244▸LBL 61
245 374177107ᴇ-24
246 RTN
247▸LBL 62
248 0.014387752
249 RTN
250▸LBL 63
251 7.748091696ᴇ-5
252 RTN
253▸LBL 64
254 2.71828182846
255 RTN
256 END
The raw file of this is available at http://howto-pages.org/SwissMicros/const.raw
There are only 10 kinds of people in the world: those who understand binary and those who do not.
Bernd
Posts: 13
Joined: Sat Jul 22, 2017 10:17 pm

Re: Constants

Post by Bernd »

Hello grsbanks,
Thanks for programming the constants library. I like it very much. I have updated the constants from the latest CODATA set (2015).
See attached listing. I hope that they will be useful for somebody else.

Code: Select all

00 { 1069-Byte Prgm }
01▸LBL "CONST"
02▸LBL A
03 "c"
04 KEY 1 XEQ 01
05 "g"
06 KEY 2 XEQ 02
07 "G"
08 KEY 3 XEQ 03
09 "Vm"
10 KEY 4 XEQ 04
11 "NA"
12 KEY 5 XEQ 05
13 "Rydb"
14 KEY 6 XEQ 06
15 KEY 7 GTO G
16 KEY 8 GTO B
17 KEY 9 GTO I
18 MENU
19 STOP
20 GTO A
21▸LBL I
22 EXITALL
23 STOP
24 GTO A
25▸LBL 01
26 299792458
27 RTN
28▸LBL 02
29 9.80665
30 RTN
31▸LBL 03
32 667408ᴇ-16
33 RTN
34▸LBL 04
35 0.022710947
36 ENTER
37 RTN
38▸LBL 05
39 6022140857ᴇ14
40 RTN
41▸LBL 06
42 10973731.568508
43 RTN
44▸LBL B
45 "eV"
46 KEY 1 XEQ 11
47 "me"
48 KEY 2 XEQ 12
49 "mp"
50 KEY 3 XEQ 13
51 "mn"
52 KEY 4 XEQ 14
53 "mμ"
54 KEY 5 XEQ 15
55 "k"
56 KEY 6 XEQ 16
57 KEY 7 GTO A
58 KEY 8 GTO C
59 KEY 9 GTO I
60 MENU
61 STOP
62 GTO B
63▸LBL 11
64 16021766208ᴇ-29
65 RTN
66▸LBL 12
67 910938356ᴇ-39
68 RTN
69▸LBL 13
70 1672621898ᴇ-36
71 RTN
72▸LBL 14
73 1674927471ᴇ-36
74 ENTER
75 RTN
76▸LBL 15
77 1883531594ᴇ-37
78 RTN
79▸LBL 16
80 138064852ᴇ-31
81 RTN
82▸LBL C
83 "h"
84 KEY 1 XEQ 21
85 "MagFQ"
86 KEY 2 XEQ 22
87 "ao"
88 KEY 3 XEQ 23
89 "ᴇo"
90 KEY 4 XEQ 24
91 "R"
92 KEY 5 XEQ 25
93 "F"
94 KEY 6 XEQ 26
95 KEY 7 GTO B
96 KEY 8 GTO D
97 KEY 9 GTO I
98 MENU
99 STOP
100 GTO C
101▸LBL 21
102 662607004ᴇ-42
103 RTN
104▸LBL 22
105 2067833831ᴇ-24
106 RTN
107▸LBL 23
108 52917721067ᴇ-21
109 RTN
110▸LBL 24
111 XEQ 32
112 XEQ 01
113 X↑2
114 ×
115 1/X
116 RTN
117▸LBL 25
118 8.3144598
119 RTN
120▸LBL 26
121 96485.33289
122 RTN
123▸LBL D
124 "u"
125 KEY 1 XEQ 31
126 "μo"
127 KEY 2 XEQ 32
128 "μB"
129 KEY 3 XEQ 33
130 "μN"
131 KEY 4 XEQ 34
132 "μP"
133 KEY 5 XEQ 35
134 "μe"
135 KEY 6 XEQ 36
136 KEY 7 GTO C
137 KEY 8 GTO E
138 KEY 9 GTO I
139 MENU
140 STOP
141 GTO D
142▸LBL 31
143 166053904ᴇ-35
144 RTN
145▸LBL 32
146 4ᴇ-7
147 PI
148 ×
149 RTN
150▸LBL 33
151 9274009994ᴇ-33
152 RTN
153▸LBL 34
154 5050783699ᴇ-36
155 RTN
156▸LBL 35
157 14106067873ᴇ-36
158 RTN
159▸LBL 36
160 -928476462ᴇ-32
161 RTN
162▸LBL E
163 "μn"
164 KEY 1 XEQ 41
165 "μμ"
166 KEY 2 XEQ 42
167 "re"
168 KEY 3 XEQ 43
169 "Zo"
170 KEY 4 XEQ 44
171 "/\c"
172 KEY 5 XEQ 45
173 "/\cn"
174 KEY 6 XEQ 46
175 KEY 7 GTO D
176 KEY 8 GTO F
177 KEY 9 GTO I
178 MENU
179 STOP
180 GTO E
181▸LBL 41
182 -9662365ᴇ-33
183 RTN
184▸LBL 42
185 -449044826ᴇ-34
186 RTN
187▸LBL 43
188 28179403227ᴇ-25
189 RTN
190▸LBL 44
191 XEQ 01
192 XEQ 32
193 ×
194 RTN
195▸LBL 45
196 24263102367ᴇ-22
197 RTN
198▸LBL 46
199 131959090481ᴇ-26
200 RTN
201▸LBL F
202 "/\cp"
203 KEY 1 XEQ 51
204 "a"
205 KEY 2 XEQ 52
206 "s"
207 KEY 3 XEQ 53
208 "t"
209 KEY 4 XEQ 54
210 "atm"
211 KEY 5 XEQ 55
212 "gP"
213 KEY 6 XEQ 56
214 KEY 7 GTO E
215 KEY 8 GTO G
216 KEY 9 GTO I
217 MENU
218 STOP
219 GTO F
220▸LBL 51
221 132140985396ᴇ-26
222 RTN
223▸LBL 52
224 0.0072973525664
225 RTN
226▸LBL 53
227 5.670367ᴇ-8
228 RTN
229▸LBL 54
230 273.15
231 RTN
232▸LBL 55
233 101325
234 RTN
235▸LBL 56
236 2.6752219ᴇ-8
237 RTN
238▸LBL G
239 CLMENU
240 "C1"
241 KEY 1 XEQ 61
242 "C2"
243 KEY 2 XEQ 62
244 "Go"
245 KEY 3 XEQ 63
246 "e"
247 KEY 4 XEQ 64
248 KEY 7 GTO F
249 KEY 8 GTO A
250 KEY 9 GTO I
251 MENU
252 STOP
253 GTO G
254▸LBL 61
255 374177179ᴇ-24
256 RTN
257▸LBL 62
258 0.0143877736
259 RTN
260▸LBL 63
261 7.748091731ᴇ-5
262 RTN
263▸LBL 64
264 1
265 E↑X
266 RTN
267 END
Attachments
const.zip
(922 Bytes) Downloaded 427 times
User avatar
salvomic
Posts: 186
Joined: Sat Dec 30, 2017 10:09 am
Location: Ragusa, Sicily
Contact:

Re: Constants

Post by salvomic »

thank you both, very appreciated!

Please, could put here a list to explicate better the abbreviations (some not so clear at a glance: i.e. /\c for λc ...)?
There is no ℏ? In the HP35s catalog there is.
Ok, I could do [h] π 2 x ÷, I know...

However, it is a very useful program, I just installed it in my new DM42 :)

Salvo
∫aL√0mic (IT9CLU) :: DM42 (SN: 00881), DM41X (SN 00523), DM16, HP Prime, 50g, 41CX, 42s, 71b, 15C, 12C, 35s, WP34s -- Free42
Olaf
Posts: 30
Joined: Fri Nov 03, 2017 10:15 am
Location: France

Re: Constants

Post by Olaf »

I'm not sure many have had the chance to see my post in another thread viewtopic.php?f=15&t=280&p=4528#p452 about extending the help viewer as a very convenient constants library (with description, units, greek symbols...), supporting a copy-to-keyboard function to export constant value to the stack...

I still think it could be great to have these constant values together with textual explanation of the physical/chemical/mathematical backgrounds, and a way to easily make use of the constant when selected. Being based on HTML, it could offer a proper categorization of constants, with dedicated tables for each field of use.
I even think about equation lib being available in nearly the same way. Select an EQ and a new program containing your equation, ready to be SOLVEd , is stored (similar to file load from usb storage).

What do you DM42 users think about it ?
Is it worth asking Michael & David about this ? (suggested answer: of course !!)

Regards,

Olivier
-----------------------------------------------------------------
HP48G, DM42 (# 276), a slide rule and a C compiler :-)
User avatar
salvomic
Posts: 186
Joined: Sat Dec 30, 2017 10:09 am
Location: Ragusa, Sicily
Contact:

Re: Constants

Post by salvomic »

thanks Olivier.
However the list of the HP-35s constants is here (scroll about at mean of the page).

Salvo
∫aL√0mic (IT9CLU) :: DM42 (SN: 00881), DM41X (SN 00523), DM16, HP Prime, 50g, 41CX, 42s, 71b, 15C, 12C, 35s, WP34s -- Free42
keithdalby
Posts: 564
Joined: Mon Apr 24, 2017 8:38 pm

Re: Constants

Post by keithdalby »

Thank you grsbanks. Your program inspired me to make one for the A Level Physics constants from here.

Code: Select all

00 { 671-Byte Prgm }
01▸LBL "CONSTS"
02▸LBL 01
03 "mu0"
04 KEY 1 GTO 51
05 "eps0"
06 KEY 2 GTO 52
07 "h"
08 KEY 3 GTO 53
09 "G"
10 KEY 4 GTO 54
11 "NA"
12 KEY 5 GTO 55
13 "R"
14 KEY 6 GTO 56
15 KEY 7 GTO 05
16 KEY 8 GTO 02
17 KEY 9 GTO 09
18 MENU
19 STOP
20 GTO 01
21▸LBL 09
22 EXITALL
23 STOP
24 GTO "CONSTS"
25▸LBL 02
26 "k"
27 KEY 1 GTO 57
28 "me"
29 KEY 2 GTO 58
30 "e/me"
31 KEY 3 GTO 59
32 "mp"
33 KEY 4 GTO 60
34 "e/mp"
35 KEY 5 GTO 61
36 "mn"
37 KEY 6 GTO 62
38 KEY 7 GTO 01
39 KEY 8 GTO 03
40 KEY 9 GTO 09
41 MENU
42 STOP
43 GTO 02
44▸LBL 03
45 "u"
46 KEY 1 GTO 63
47 "msun"
48 KEY 2 GTO 64
49 "rsun"
50 KEY 3 GTO 65
51 "mear"
52 KEY 4 GTO 66
53 "rear"
54 KEY 5 GTO 67
55 "eMeV"
56 KEY 6 GTO 68
57 KEY 7 GTO 02
58 KEY 8 GTO 04
59 KEY 9 GTO 09
60 MENU
61 STOP
62 GTO 03
63▸LBL 04
64 "muMeV"
65 KEY 1 GTO 69
66 "piMeV"
67 KEY 2 GTO 70
68 "p0MeV"
69 KEY 3 GTO 71
70 "KMeV"
71 KEY 4 GTO 72
72 "K0MeV"
73 KEY 5 GTO 73
74 "pMeV"
75 KEY 6 GTO 74
76 KEY 7 GTO 03
77 KEY 8 GTO 05
78 KEY 9 GTO 09
79 MENU
80 STOP
81 GTO 04
82▸LBL 05
83 "nMeV"
84 KEY 1 GTO 75
85 "uMeV"
86 KEY 2 GTO 76
87 CLA
88 KEY 3 GTO 05
89 KEY 4 GTO 05
90 "e"
91 KEY 5 GTO 77
92 "g"
93 KEY 6 GTO 78
94 KEY 7 GTO 04
95 KEY 8 GTO 01
96 KEY 9 GTO 09
97 MENU
98 STOP
99 GTO 05
100▸LBL 51
101 1.256637061435917295385057353311801ᴇ-6
102 RTN
103▸LBL 52
104 885ᴇ-14
105 RTN
106▸LBL 53
107 663ᴇ-36
108 RTN
109▸LBL 54
110 667ᴇ-13
111 RTN
112▸LBL 55
113 602ᴇ21
114 RTN
115▸LBL 56
116 8.31
117 RTN
118▸LBL 57
119 138ᴇ-25
120 RTN
121▸LBL 58
122 911ᴇ-33
123 RTN
124▸LBL 59
125 176ᴇ9
126 RTN
127▸LBL 60
128 1673ᴇ-30
129 RTN
130▸LBL 61
131 958ᴇ5
132 RTN
133▸LBL 62
134 1675ᴇ-30
135 RTN
136▸LBL 63
137 1661ᴇ-30
138 RTN
139▸LBL 64
140 199ᴇ28
141 RTN
142▸LBL 65
143 696ᴇ6
144 RTN
145▸LBL 66
146 598ᴇ22
147 RTN
148▸LBL 67
149 637ᴇ4
150 RTN
151▸LBL 68
152 0.510999
153 RTN
154▸LBL 69
155 105.659
156 RTN
157▸LBL 70
158 139.576
159 RTN
160▸LBL 71
161 134.972
162 RTN
163▸LBL 72
164 493.821
165 RTN
166▸LBL 73
167 497.762
168 RTN
169▸LBL 74
170 938.257
171 RTN
172▸LBL 75
173 939.551
174 RTN
175▸LBL 76
176 931.3
177 ENTER
178 RTN
179▸LBL 77
180 16ᴇ-20
181 RTN
182▸LBL 78
183 9.81
184 RTN
185 END
I left the speed of light off, not sure why, might add it later anyway. The file is here:
consts.zip
(590 Bytes) Downloaded 350 times
User avatar
pica
Posts: 70
Joined: Fri Mar 30, 2018 11:36 am
Location: Eswatini

Re: Constants

Post by pica »

Here is another way of doing constants. They are all in an nx2 matrix called Const.
As the DM42 cannot import a matrix directly, the program generates the constants matrix.
I usually edit it on a PC for ease of copying and pasting long numbers.
There is a short wrapper routine at the end to index the matrix and open it in the editor.
Scroll through the matrix, and the desired constant is left on the X-register on exit.
The program regenerates the matrix on each run, so any damage to it will be temporary.

The program is designed to be easily customised for the constants you like most.

Many of the constants are from NIST: https://physics.nist.gov/cuu/Constants/ ... lascii.txt

Code: Select all

00 { 496-Byte Prgm }
01▸LBL "Const" @ Prepare the matrix Const
02 2
03 ENTER
04 NEWMAT
05 STO "Const"
06 R↓ @ Helps keep X and Y registers intact
07 INDEX "Const"
08 GROW
09 "c" @ List of constants starts here
10 XEQ 01
11 299792458
12 XEQ 02
13 "Na"
14 XEQ 01
15 6.022140857ᴇ23
16 XEQ 02
17 "Vm"
18 XEQ 01
19 22.413962
20 XEQ 02
21 "atm"
22 XEQ 01
23 101.325
24 XEQ 02
25 "T"
26 XEQ 01
27 273.15
28 XEQ 02
29 "g"
30 XEQ 01
31 9.80665
32 XEQ 02
33 "h"
34 XEQ 01
35 6.626070040ᴇ-34
36 XEQ 02
37 "h/2pi"
38 XEQ 01
39 1.054571800ᴇ-34
40 XEQ 02
41 "e"
42 XEQ 01
43 1.6021766208ᴇ-19
44 XEQ 02
45 "G"
46 XEQ 01
47 6.67408ᴇ-11
48 XEQ 02
49 "e/m"
50 XEQ 01
51 -1.758820024ᴇ11
52 XEQ 02
53 "me"
54 XEQ 01
55 9.10938356ᴇ-31
56 XEQ 02
57 "mp"
58 XEQ 01
59 1.672621898ᴇ-27
60 XEQ 02
61 "mn"
62 XEQ 01
63 1.674927471ᴇ-27
64 XEQ 02
65 "Ee"
66 XEQ 01
67 8.18710565ᴇ-14
68 XEQ 02
69 "Ep"
70 XEQ 01
71 1.503277593ᴇ-10
72 XEQ 02
73 "En"
74 XEQ 01
75 1.505349739ᴇ-10
76 XEQ 02
77 "inch"
78 XEQ 01
79 2.54
80 XEQ 02
81 "LtYr"
82 XEQ 01
83 9461ᴇ12
84 XEQ 02
85 "pound"
86 XEQ 01
87 0.45359237 @ The last constant should not open a new row so do not execute LBL 02
88 STOEL
89▸LBL 03 @ Wrapper to read Const matrix. Could be a stand-alone routine.
90 INDEX "Const"
91 EDITN "Const"
92 RTN
93▸LBL 01
94 R↑ @ Helps keep X and Y regs intact
95 ASTO ST X
96▸LBL 02
97 STOEL
98 →
99 R↓ @ Helps keep X and Y regs intact
100 RTN
HP50G HP35s Free42 DM42.
Testing WP43S, C43.
User avatar
wiljea
Posts: 14
Joined: Tue Sep 04, 2018 6:20 pm

Re: Constants - local variables - stack save

Post by wiljea »

UPDATE OF PHYSICAL CONSTANTS & calculations with SAVED STACK using LOCAL VARIABLES
(The following work is also relevant for LSTO illustrations and Local Stack Save examples)

My goal was initially to make a simple exhaustive update of 42 physical constants (including some simple calculations of derived values and conversion coefficients) complying with the latest officially accepted values according to the CODATA (2018) complete data table : https://pml.nist.gov/cuu/Constants/Table/allascii.txt.

I started with the interesting program from Mr. Grsbanks which already provided a direct access to 40 physical constants (as in the HP-35s) through their respective keys, distributed on a 7 row’s menu: an explicit demonstration of these Key/Menu features of the DM42/Free42/HP42. I updated all the values and then realize that some derived quantity (like the proton Compton wavelength or other conversion coefficients) could be easily computed within the program itself (using internal calls, as it was done also in the Mr. Bernd's version, as I understood it afterward). However, differing from a single entry to the X register (or executing a single number function), the drawback was that such intermediate calculations would potentially corrupt the top of the stack with unwanted repeated numbers which may turn out to be inconvenient in any other RPN-context scientific calculations.

An evident solution was to create some Push and Pop subroutines to reinstate the unperturbed remaining stack (Y, Z, T and LastX registers). But then, why not try to do this through the powerful use of local variables (thanks to the LSTO implementation of Mr. Thomas Okken). Due to the consecutive RTN order precedencies, this posed however an interesting challenge because to retain the local variables (“Ys”, “Zs”, “Ts” and “Ls”) up to the end, it required that the “PopST” final call had been performed after but through the initial call of the “PshST” subroutine where, in between, the desired calculations would have been achieved using an indirectly addressed subroutine (having the numeric label “xx”). And finally, the retained solution works correctly as I chose to pass the indirect value “xx” (identifying the specific calculation) in another local variableLBLxx”, performing then the indirect call XEQ IND “LBLxx” at the end of “PshST”, and thus, before the final invoking of “PopST” which terminates the subroutine “LBLxx”. “Et voilà, le tour est joué !” Anyway, a look at the code will probably explain more clearly my approach. Here, I applied successfully the technique for the calculations of λcn = h/(c mn), λcp = h/(c mp), e = exp(1) [with full 34 digits precision] and for the conversion coefficients “MeV/u” (in nuclear physics: c^2 ≈ 931,49 MeV/u ) and “eV*nm” (for the photoelectric effect: Eph[eV] ≈ 1240/ λ[nm]). Prolonging the Mr. Grsbanks design, it would be easy to add even 18 more entries to suit all your needs. And this stack local-preservation-technique is easily adaptable to many other programs.

Finally, It was a fun exercise because as the code is executed, it is simply captivating to follow 1) the sudden creation of local variables, 2) all achieving their specific tasks, 3) and completing them before they happen to disappear 4) just in time to avoid any side effect or corruption 5) even between consecutive calls within the same program (I suspect that this might also work recursively according to an example provided by Mr. Thomas Okken on his site [Is it indeed the case?]). This on-demand dynamic memory management (creating and freeing local variables “in flight”) provides a new and quite powerful tool for the development of your future programs specifically in the DM42/Free42 environment (with the hope that the 43S will soon share a similar behavior, as previously inaugurated with the WP34S). Let us know about your initiatives on this subject of dynamic memory!

Code: Select all

00 { 1372-Byte Prgm }
01▸LBL "ConstL"
02▸LBL A
03 "c"
04 KEY 1 XEQ 01
05 "g"
06 KEY 2 XEQ 02
07 "G"
08 KEY 3 XEQ 03
09 "Vm"
10 KEY 4 XEQ 04
11 "NA"
12 KEY 5 XEQ 05
13 "Rydb"
14 KEY 6 XEQ 06
15 KEY 7 GTO G
16 KEY 8 GTO B
17 KEY 9 GTO I
18 MENU
19 STOP
20 GTO A
21▸LBL I
22 EXITALL
23 STOP
24 GTO A
25▸LBL 01
26 299792458
27 RTN
28▸LBL 02
29 9.80665
30 RTN
31▸LBL 03
32 66743ᴇ-15
33 RTN
34▸LBL 04
35 0.022413996
36 RTN
37▸LBL 05
38 602214076ᴇ15
39 RTN
40▸LBL 06
41 10973731.56816
42 RTN
43▸LBL B
44 "eV"
45 KEY 1 XEQ 11
46 "me"
47 KEY 2 XEQ 12
48 "mp"
49 KEY 3 XEQ 13
50 "mn"
51 KEY 4 XEQ 14
52 "mμ"
53 KEY 5 XEQ 15
54 "k"
55 KEY 6 XEQ 16
56 KEY 7 GTO A
57 KEY 8 GTO C
58 KEY 9 GTO I
59 MENU
60 STOP
61 GTO B
62▸LBL 11
63 1602176634ᴇ-28
64 RTN
65▸LBL 12
66 91093837015ᴇ-41
67 RTN
68▸LBL 13
69 167262192369ᴇ-38
70 RTN
71▸LBL 14
72 167492749805ᴇ-38
73 RTN
74▸LBL 15
75 188353162739ᴇ-39
76 RTN
77▸LBL 16
78 1380649ᴇ-29
79 RTN
80▸LBL C
81 "h"
82 KEY 1 XEQ 21
83 "MagFQ"
84 KEY 2 XEQ 22
85 "ao"
86 KEY 3 XEQ 23
87 "ᴇo"
88 KEY 4 XEQ 24
89 "R"
90 KEY 5 XEQ 25
91 "F"
92 KEY 6 XEQ 26
93 KEY 7 GTO B
94 KEY 8 GTO D
95 KEY 9 GTO I
96 MENU
97 STOP
98 GTO C
99▸LBL 21
100 662607015ᴇ-42
101 RTN
102▸LBL 22
103 2067833848ᴇ-24
104 RTN
105▸LBL 23
106 529177210903ᴇ-22
107 RTN
108▸LBL 24
109 88541878128ᴇ-22
110 RTN
111▸LBL 25
112 8.314462618
113 RTN
114▸LBL 26
115 96485.33212
116 RTN
117▸LBL D
118 "u"
119 KEY 1 XEQ 31
120 "μo"
121 KEY 2 XEQ 32
122 "μB"
123 KEY 3 XEQ 33
124 "μN"
125 KEY 4 XEQ 34
126 "μP"
127 KEY 5 XEQ 35
128 "μe"
129 KEY 6 XEQ 36
130 KEY 7 GTO C
131 KEY 8 GTO E
132 KEY 9 GTO I
133 MENU
134 STOP
135 GTO D
136▸LBL 31
137 16605390666ᴇ-37
138 RTN
139▸LBL 32
140 1.25663706212ᴇ-6
141 RTN
142▸LBL 33
143 92740100783ᴇ-34
144 RTN
145▸LBL 34
146 50507837461ᴇ-37
147 RTN
148▸LBL 35
149 141060679736ᴇ-37
150 RTN
151▸LBL 36
152 -92847647043ᴇ-34
153 RTN
154▸LBL E
155 "μn"
156 KEY 1 XEQ 41
157 "μμ"
158 KEY 2 XEQ 42
159 "re"
160 KEY 3 XEQ 43
161 "Zo"
162 KEY 4 XEQ 44
163 "/\c"
164 KEY 5 XEQ 45
165 "/\cn"
166 KEY 6 XEQ "x46"
167 KEY 7 GTO D
168 KEY 8 GTO F
169 KEY 9 GTO I
170 MENU
171 STOP
172 GTO E
173▸LBL 41
174 -96623651ᴇ-34
175 RTN
176▸LBL 42
177 -4490448301ᴇ-35
178 RTN
179▸LBL 43
180 28179403262ᴇ-25
181 RTN
182▸LBL 44
183 376.730313668
184 RTN
185▸LBL 45
186 242631023867ᴇ-23
187 RTN
188▸LBL "x46"
189 46
190 XEQ "PshST"
191 RTN
192▸LBL 46
193 XEQ 21
194 XEQ 01
195 ÷
196 XEQ 14
197 ÷
198 XEQ "PopST"
199 RTN
200▸LBL F
201 "/\cp"
202 KEY 1 XEQ "x51"
203 "a"
204 KEY 2 XEQ 52
205 "s"
206 KEY 3 XEQ 53
207 "t"
208 KEY 4 XEQ 54
209 "atm"
210 KEY 5 XEQ 55
211 "gP"
212 KEY 6 XEQ 56
213 KEY 7 GTO E
214 KEY 8 GTO G
215 KEY 9 GTO I
216 MENU
217 STOP
218 GTO F
219▸LBL "x51"
220 51
221 XEQ "PshST"
222 RTN
223▸LBL 51
224 XEQ 21
225 XEQ 01
226 ÷
227 XEQ 13
228 ÷
229 XEQ "PopST"
230 RTN
231▸LBL 52
232 0.0072973525693
233 RTN
234▸LBL 53
235 5.670374419ᴇ-8
236 RTN
237▸LBL 54
238 273.15
239 RTN
240▸LBL 55
241 101325
242 RTN
243▸LBL 56
244 267522187.44
245 RTN
246▸LBL G
247 CLMENU
248 "C1"
249 KEY 1 XEQ 61
250 "C2"
251 KEY 2 XEQ 62
252 "Go"
253 KEY 3 XEQ 63
254 "e"
255 KEY 4 XEQ "x64"
256 "MeV/u"
257 KEY 5 XEQ "x65"
258 "eV*nm"
259 KEY 6 XEQ "x66"
260 KEY 7 GTO F
261 KEY 8 GTO A
262 KEY 9 GTO I
263 MENU
264 STOP
265 GTO G
266▸LBL 61
267 3741771852ᴇ-25
268 RTN
269▸LBL 62
270 0.01438776877
271 RTN
272▸LBL 63
273 7.748091729ᴇ-5
274 RTN
275▸LBL "x64"
276 64
277 XEQ "PshST"
278 RTN
279▸LBL 64
280 1
281 E↑X
282 XEQ "PopST"
283 RTN
284▸LBL "x65"
285 65
286 XEQ "PshST"
287 RTN
288▸LBL 65
289 XEQ 01
290 X↑2
291 XEQ 31
292 ×
293 XEQ 11
294 ÷
295 1ᴇ6
296 ÷
297 XEQ "PopST"
298 RTN
299▸LBL "x66"
300 66
301 XEQ "PshST"
302 RTN
303▸LBL 66
304 XEQ 21
305 XEQ 01
306 ×
307 XEQ 11
308 ÷
309 1ᴇ9
310 ×
311 XEQ "PopST"
312 RTN
313▸LBL "PshST"
314 LSTO "LBLxx"
315 R↓
316 LSTO "Ys"
317 R↓
318 LSTO "Zs"
319 R↓
320 LSTO "Ts"
321 R↓
322 CLX
323 LASTX
324 LSTO "Ls"
325 R↓
326 XEQ IND "LBLxx"
327 RTN
328▸LBL "PopST"
329 RCL "Ls"
330 STO ST L
331 RCL ST Y
332 RCL "Ts"
333 RCL "Zs"
334 RCL "Ys"
335 R↑
336 RTN
337 END
Attachments
ConstL.raw
Raw file
(1.34 KiB) Downloaded 235 times
ConstL_new.zip
Listing in Word
& Raw file
(16.04 KiB) Downloaded 238 times
DM42 SN: 03090
HP-29C, HP-41C, HP-15C, HP-33s, HP-35s, WP 34S, Free42, DM42
(Fortran, C++, Mathematica, Maple, Python, …) Physics aficionado
User avatar
wiljea
Posts: 14
Joined: Tue Sep 04, 2018 6:20 pm

Re: Physical constants - with units & description

Post by wiljea »

NEW: PHYSICAL CONSTANTS with units & short descriptions
conform to last official SI revisions (2019)

Here is my latest (quite longer) version of the former program with this new desirable feature of showing explicitly (through the alpha register) at the same time both physical units and a very short description. Moreover, I didn’t realise until recently how profound was the last revision of the SI base units featuring now a more exhaustive logic and straightforward coherence in the fact that many physical constants are from now on more precisely interrelated. To my best knowledge and after close examination, this program seems to adequately comply with the most recent SI revisions (including the newly introduced exact definitions & other resulting fixed values, as of May 20, 2019) according to:
https://www.bipm.org/utils/common/pdf/s ... hure-9.pdf &
https://en.wikipedia.org/wiki/2019_rede ... base_units.

Adding the required descriptions, I reorganised the subroutines (with better positions for εo, kE, h, hbar, etc. in various units, all rapidly accessible near the end of the row menus sequence). This version includes now 9 x 6 = 54 constants, whom 23 of them are calculated internally (using the corresponding fixed value derivations) without disturbing the stack or any other user-allocable register, which is useful when one must do many consecutive RPN calculations in physics or engineering.

The internal calls to Pop & Push subroutines (using volatile local variables) work fine recursively (reinstating every intermediate stacks) without risk of memory corruption. Apparently, each nested set of local variables is distinctly tagged with its own parenting RTN address even if successive sets share the same local names (they differ only by their origins in the program flow, before being flushed out as each corresponding subroutine ends).

ADDED NOTE (Nov 17, 2019): as a clear detailed illustration of 3 levels nesting in my program, look at the calculation of the Planch time tP which starts by XEQ “x75”. The corresponding subroutine LBL “x75” calls PshST for a first time to preserve the user’s initial stack. The Planck length LP is then called through XEQ “x74” saving once again momentarily the intermediate stack at the beginning of LBL “x74”. Finally, the execution flow encounters XEQ “x83” to calculate the reduced Planck hbar in LBL “x83” where a third intermediate stack is also locally saved. Each nested subroutine invokes PopST after completion of the required calculation, just before writing to the alpha register and then returning the control to the calling subroutine reinstating the required intermediate stack. At the end, the user recovers the last writing to the alpha register together with its unperturbed initial stack with no trace of all intermediate local variables. If I understood well, according to Mr. Thomas Okken, this can be eventually repeated up to 1024 times due to fine RTN addresses management. Quite impressive actually as it works very well also in both DM42 & Free42 environments !

Feel free to comment, correct or adapt this program to fit your own scientific needs. Let us know.

Code: Select all

00 { 3582-Byte Prgm }
01▸LBL "Const0"
02▸LBL A
03 "c"
04 KEY 1 XEQ 01
05 "g"
06 KEY 2 XEQ 02
07 "G"
08 KEY 3 XEQ 03
09 "Vm"
10 KEY 4 XEQ "x04"
11 "NA"
12 KEY 5 XEQ 05
13 "Rydb"
14 KEY 6 XEQ 06
15 KEY 7 GTO I
16 KEY 8 GTO B
17 KEY 9 GTO a
18 MENU
19 STOP
20 GTO A
21▸LBL a
22 EXITALL
23 STOP
24 GTO A
25▸LBL b
26 ARCL ST X
27 AVIEW
28 RTN
29▸LBL "PshST"
30 LSTO "LBLxx"
31 R↓
32 LSTO "Ys"
33 R↓
34 LSTO "Zs"
35 R↓
36 LSTO "Ts"
37 R↓
38 CLX
39 LASTX
40 LSTO "Ls"
41 R↓
42 XEQ IND "LBLxx"
43 RTN
44▸LBL "PopST"
45 RCL "Ls"
46 STO ST L
47 RCL ST Y
48 RCL "Ts"
49 RCL "Zs"
50 RCL "Ys"
51 R↑
52 RTN
53▸LBL 01
54 299792458
55 "Speed of light"
56 ├" c(m/s)="
57 XEQ b
58 RTN
59▸LBL 02
60 9.80665
61 "Std grav acc g("
62 ├"m/s↑2)="
63 XEQ b
64 RTN
65▸LBL 03
66 66743ᴇ-15
67 "Newton univ gra"
68 ├"v G(m↑3/kg/s↑2"
69 ├")="
70 XEQ b
71 RTN
72▸LBL "x04"
73 4
74 XEQ "PshST"
75 RTN
76▸LBL 04
77 XEQ "x25"
78 XEQ 54
79 ×
80 XEQ 55
81 ÷
82 XEQ "PopST"
83 "Molar V @STP Vm"
84 ├"(m↑3/mol)="
85 XEQ b
86 RTN
87▸LBL 05
88 602214076ᴇ15
89 "Avogadro# NA(1/"
90 ├"mol)="
91 XEQ b
92 RTN
93▸LBL 06
94 10973731.56816
95 "Rydberg Rinf(1/"
96 ├"m)="
97 XEQ b
98 RTN
99▸LBL B
100 "eV"
101 KEY 1 XEQ 11
102 "me"
103 KEY 2 XEQ 12
104 "mp"
105 KEY 3 XEQ 13
106 "mn"
107 KEY 4 XEQ 14
108 "mμ"
109 KEY 5 XEQ 15
110 "kB"
111 KEY 6 XEQ 16
112 KEY 7 GTO A
113 KEY 8 GTO C
114 KEY 9 GTO a
115 MENU
116 STOP
117 GTO B
118▸LBL 11
119 1602176634ᴇ-28
120 "Energy eV(J) o"
121 ├"r charge e(C)="
122 XEQ b
123 RTN
124▸LBL 12
125 91093837015ᴇ-41
126 "e-mass me(kg)="
127 XEQ b
128 RTN
129▸LBL 13
130 167262192369ᴇ-38
131 "p-mass mp(kg)="
132 XEQ b
133 RTN
134▸LBL 14
135 167492749804ᴇ-38
136 "n-mass mn(kg)="
137 XEQ b
138 RTN
139▸LBL 15
140 1883531627ᴇ-37
141 "μ-mass mμ(kg)="
142 XEQ b
143 RTN
144▸LBL 16
145 1380649ᴇ-29
146 "Boltzmann kB(J/"
147 ├"K)="
148 XEQ b
149 RTN
150▸LBL C
151 "Df-Cs"
152 KEY 1 XEQ 21
153 "MagFQ"
154 KEY 2 XEQ "x22"
155 "ao"
156 KEY 3 XEQ 23
157 "WienC"
158 KEY 4 XEQ 24
159 "R"
160 KEY 5 XEQ "x25"
161 "F"
162 KEY 6 XEQ "x26"
163 KEY 7 GTO B
164 KEY 8 GTO D
165 KEY 9 GTO a
166 MENU
167 STOP
168 GTO C
169▸LBL 21
170 9192631770
171 "Cs freq STD Df-"
172 ├"Cs(Hz)="
173 XEQ b
174 RTN
175▸LBL "x22"
176 22
177 XEQ "PshST"
178 RTN
179▸LBL 22
180 XEQ 81
181 2
182 ÷
183 XEQ 11
184 ÷
185 XEQ "PopST"
186 "Mag flux Qtm M"
187 ├"agFQ(Wb)="
188 XEQ b
189 RTN
190▸LBL 23
191 529177210903ᴇ-22
192 "Bohr radius ao("
193 ├"m)="
194 XEQ b
195 RTN
196▸LBL 24
197 2897.771955185172
198 "Wien's dsplcmnt"
199 ├" WienC(mK)="
200 XEQ b
201 RTN
202▸LBL "x25"
203 25
204 XEQ "PshST"
205 RTN
206▸LBL 25
207 XEQ 05
208 XEQ 16
209 ×
210 XEQ "PopST"
211 "Molar ideal gas"
212 ├" R(J/K/mol)="
213 XEQ b
214 RTN
215▸LBL "x26"
216 26
217 XEQ "PshST"
218 RTN
219▸LBL 26
220 XEQ 05
221 XEQ 11
222 ×
223 XEQ "PopST"
224 "Faraday F(C/mol"
225 ├")="
226 XEQ b
227 RTN
228▸LBL D
229 "u"
230 KEY 1 XEQ 31
231 "μo"
232 KEY 2 XEQ 32
233 "μB"
234 KEY 3 XEQ 33
235 "μN"
236 KEY 4 XEQ 34
237 "μP"
238 KEY 5 XEQ 35
239 "μe"
240 KEY 6 XEQ 36
241 KEY 7 GTO C
242 KEY 8 GTO E
243 KEY 9 GTO a
244 MENU
245 STOP
246 GTO D
247▸LBL 31
248 16605390666ᴇ-37
249 "amu u(kg)="
250 XEQ b
251 RTN
252▸LBL 32
253 1.25663706212ᴇ-6
254 "Mag permeabilit"
255 ├"y μo(N/A↑2)="
256 XEQ b
257 RTN
258▸LBL 33
259 92740100783ᴇ-34
260 "Bohr mgtn μB(J/"
261 ├"T)="
262 XEQ b
263 RTN
264▸LBL 34
265 50507837461ᴇ-37
266 "Nucl mgtn μN(J/"
267 ├"T)="
268 XEQ b
269 RTN
270▸LBL 35
271 141060679736ᴇ-37
272 "p-mag mmt μP(J/"
273 ├"T)="
274 XEQ b
275 RTN
276▸LBL 36
277 -92847647043ᴇ-34
278 "e-mag mmt μe(J/"
279 ├"T)="
280 XEQ b
281 RTN
282▸LBL E
283 "μn"
284 KEY 1 XEQ 41
285 "μμ"
286 KEY 2 XEQ 42
287 "re"
288 KEY 3 XEQ "x43"
289 "Zo"
290 KEY 4 XEQ 44
291 "/\ce"
292 KEY 5 XEQ 45
293 "/\cn"
294 KEY 6 XEQ "x46"
295 KEY 7 GTO D
296 KEY 8 GTO F
297 KEY 9 GTO a
298 MENU
299 STOP
300 GTO E
301▸LBL 41
302 -96623651ᴇ-34
303 "n-mag mmt μn(J/"
304 ├"T)="
305 XEQ b
306 RTN
307▸LBL 42
308 -44904483ᴇ-33
309 "μ-mag mmt μμ(J/"
310 ├"T)="
311 XEQ b
312 RTN
313▸LBL "x43"
314 43
315 XEQ "PshST"
316 RTN
317▸LBL 43
318 XEQ 11
319 XEQ 01
320 ÷
321 X↑2
322 XEQ "x72"
323 ×
324 XEQ 12
325 ÷
326 XEQ "PopST"
327 "Class e-radius "
328 ├"re(m)="
329 XEQ b
330 RTN
331▸LBL 44
332 376.730313668
333 "Vacuum imped Zo"
334 ├"(ohm)="
335 XEQ b
336 RTN
337▸LBL 45
338 242631023867ᴇ-23
339 "e-/\Cptn(m)="
340 XEQ b
341 RTN
342▸LBL "x46"
343 46
344 XEQ "PshST"
345 RTN
346▸LBL 46
347 XEQ 81
348 XEQ 01
349 ÷
350 XEQ 14
351 ÷
352 XEQ "PopST"
353 "n-/\Cptn(m)="
354 XEQ b
355 RTN
356▸LBL F
357 "/\cp"
358 KEY 1 XEQ "x51"
359 "a"
360 KEY 2 XEQ "x52"
361 "s"
362 KEY 3 XEQ "x53"
363 "T°ice"
364 KEY 4 XEQ 54
365 "atm"
366 KEY 5 XEQ 55
367 "gP"
368 KEY 6 XEQ 56
369 KEY 7 GTO E
370 KEY 8 GTO G
371 KEY 9 GTO a
372 MENU
373 STOP
374 GTO F
375▸LBL "x51"
376 51
377 XEQ "PshST"
378 RTN
379▸LBL 51
380 XEQ 81
381 XEQ 01
382 ÷
383 XEQ 13
384 ÷
385 XEQ "PopST"
386 "p-/\Cptn(m)="
387 XEQ b
388 RTN
389▸LBL "x52"
390 52
391 XEQ "PshST"
392 RTN
393▸LBL 52
394 XEQ 01
395 XEQ 11
396 X↑2
397 ×
398 XEQ 32
399 ×
400 2
401 ÷
402 XEQ 81
403 ÷
404 XEQ "PopST"
405 "Fine-struc cst "
406 ├"alpha="
407 XEQ b
408 RTN
409▸LBL "x53"
410 53
411 XEQ "PshST"
412 RTN
413▸LBL 53
414 XEQ 16
415 X↑2
416 PI
417 ×
418 XEQ 01
419 ÷
420 X↑2
421 60
422 ÷
423 XEQ "x83"
424 3
425 Y↑X
426 ÷
427 XEQ "PopST"
428 "Stfn-Bltzn s(W/"
429 ├"m↑2/K↑4)="
430 XEQ b
431 RTN
432▸LBL 54
433 273.15
434 "Ice melt pt @ST"
435 ├"P T°(K)="
436 XEQ b
437 RTN
438▸LBL 55
439 101325
440 "Atm pres @STP p"
441 ├"o(Pa)="
442 XEQ b
443 RTN
444▸LBL 56
445 267522187.44
446 "p-gyromag gP(1/"
447 ├"s/T)="
448 XEQ b
449 RTN
450▸LBL G
451 CLMENU
452 "C1"
453 KEY 1 XEQ "x61"
454 "C2"
455 KEY 2 XEQ "x62"
456 "Go"
457 KEY 3 XEQ "x63"
458 "e"
459 KEY 4 XEQ "x64"
460 "MeV/u"
461 KEY 5 XEQ "x65"
462 "eV*nm"
463 KEY 6 XEQ "x66"
464 KEY 7 GTO F
465 KEY 8 GTO H
466 KEY 9 GTO a
467 MENU
468 STOP
469 GTO G
470▸LBL "x61"
471 61
472 XEQ "PshST"
473 RTN
474▸LBL 61
475 XEQ 01
476 X↑2
477 XEQ 81
478 ×
479 2
480 ×
481 PI
482 ×
483 XEQ "PopST"
484 "1st radiatn C1"
485 ├"(Wm↑2)="
486 XEQ b
487 RTN
488▸LBL "x62"
489 62
490 XEQ "PshST"
491 RTN
492▸LBL 62
493 XEQ 01
494 XEQ 81
495 ×
496 XEQ 16
497 ÷
498 XEQ "PopST"
499 "2nd radiatn C2"
500 ├"(mK)="
501 XEQ b
502 RTN
503▸LBL "x63"
504 63
505 XEQ "PshST"
506 RTN
507▸LBL 63
508 XEQ 11
509 X↑2
510 2
511 ×
512 XEQ 81
513 ÷
514 XEQ "PopST"
515 "Conductance Qt"
516 ├"m Go(S)="
517 XEQ b
518 RTN
519▸LBL "x64"
520 64
521 XEQ "PshST"
522 RTN
523▸LBL 64
524 1
525 E↑X
526 XEQ "PopST"
527 "e [Euler]="
528 XEQ b
529 RTN
530▸LBL "x65"
531 65
532 XEQ "PshST"
533 RTN
534▸LBL 65
535 XEQ 01
536 X↑2
537 XEQ 31
538 ×
539 XEQ 11
540 ÷
541 1ᴇ6
542 ÷
543 XEQ "PopST"
544 "Mass-energy equ"
545 ├"iv c↑2(MeV/u)="
546 XEQ b
547 RTN
548▸LBL "x66"
549 66
550 XEQ "PshST"
551 RTN
552▸LBL 66
553 XEQ 81
554 XEQ 01
555 ×
556 XEQ 11
557 ÷
558 1ᴇ9
559 ×
560 XEQ "PopST"
561 "Photon E×/\ coe"
562 ├"ff(eV*nm)="
563 XEQ b
564 RTN
565▸LBL H
566 CLMENU
567 "Eo"
568 KEY 1 XEQ 71
569 "kE"
570 KEY 2 XEQ "x72"
571 "KCD"
572 KEY 3 XEQ 73
573 "Lp"
574 KEY 4 XEQ "x74"
575 "tp"
576 KEY 5 XEQ "x75"
577 "Mp"
578 KEY 6 XEQ "x76"
579 KEY 7 GTO G
580 KEY 8 GTO I
581 KEY 9 GTO a
582 MENU
583 STOP
584 GTO H
585▸LBL 71
586 88541878128ᴇ-22
587 "Elec permittivi"
588 ├"ty Eo(F/m)="
589 XEQ b
590 RTN
591▸LBL "x72"
592 72
593 XEQ "PshST"
594 RTN
595▸LBL 72
596 XEQ 71
597 4
598 ×
599 PI
600 ×
601 1/X
602 XEQ "PopST"
603 "Coulomb elec k"
604 ├"E(Nm↑2/C↑2)="
605 XEQ b
606 RTN
607▸LBL 73
608 683
609 "Lum eff @ 540 "
610 ├"THz KCD(lm/W)="
611 XEQ b
612 RTN
613▸LBL "x74"
614 74
615 XEQ "PshST"
616 RTN
617▸LBL 74
618 XEQ "x83"
619 XEQ 03
620 ×
621 XEQ 01
622 3
623 Y↑X
624 ÷
625 SQRT
626 XEQ "PopST"
627 "Planck length "
628 ├"Lp(m)="
629 XEQ b
630 RTN
631▸LBL "x75"
632 75
633 XEQ "PshST"
634 RTN
635▸LBL 75
636 XEQ "x74"
637 XEQ 01
638 ÷
639 XEQ "PopST"
640 "Planck time "
641 ├"tp(s)="
642 XEQ b
643 RTN
644▸LBL "x76"
645 76
646 XEQ "PshST"
647 RTN
648▸LBL 76
649 XEQ "x83"
650 XEQ 01
651 ×
652 XEQ 03
653 ÷
654 SQRT
655 XEQ "PopST"
656 "Planck mass "
657 ├"Mp(kg)="
658 XEQ b
659 RTN
660▸LBL I
661 CLMENU
662 "h-Js"
663 KEY 1 XEQ 81
664 "h-eVs"
665 KEY 2 XEQ "x82"
666 "hb-Js"
667 KEY 3 XEQ "x83"
668 "hbeVs"
669 KEY 4 XEQ "x84"
670 "Mu"
671 KEY 5 XEQ 85
672 "KJ"
673 KEY 6 XEQ "x86"
674 KEY 7 GTO H
675 KEY 8 GTO A
676 KEY 9 GTO a
677 MENU
678 STOP
679 GTO I
680▸LBL 81
681 662607015ᴇ-42
682 "Planck SI h(Js"
683 ├")="
684 XEQ b
685 RTN
686▸LBL "x82"
687 82
688 XEQ "PshST"
689 RTN
690▸LBL 82
691 XEQ 81
692 XEQ 11
693 ÷
694 XEQ "PopST"
695 "Planck atom h("
696 ├"eVs)="
697 XEQ b
698 RTN
699▸LBL "x83"
700 83
701 XEQ "PshST"
702 RTN
703▸LBL 83
704 XEQ 81
705 2
706 ÷
707 PI
708 ÷
709 XEQ "PopST"
710 "Reduced Planck"
711 ├" SI hbar(Js)="
712 XEQ b
713 RTN
714▸LBL "x84"
715 84
716 XEQ "PshST"
717 RTN
718▸LBL 84
719 XEQ "x83"
720 XEQ 11
721 ÷
722 XEQ "PopST"
723 "Rdcd Planck ato"
724 ├"m hbar(eVs)="
725 XEQ b
726 RTN
727▸LBL 85
728 0.99999999965
729 "Molar mass cst "
730 ├"M/A=Mu(g/mol)="
731 XEQ b
732 RTN
733▸LBL "x86"
734 86
735 XEQ "PshST"
736 RTN
737▸LBL 86
738 XEQ "x22"
739 1/X
740 XEQ "PopST"
741 "Josephson cst K"
742 ├"J(Hz/V)="
743 XEQ b
744 RTN
745 END
Attachments
Const0.zip
Program & Listing (Word)
(25.3 KiB) Downloaded 282 times
Const0.raw
Program
(3.5 KiB) Downloaded 290 times
Last edited by wiljea on Sun Nov 17, 2019 3:31 pm, edited 8 times in total.
DM42 SN: 03090
HP-29C, HP-41C, HP-15C, HP-33s, HP-35s, WP 34S, Free42, DM42
(Fortran, C++, Mathematica, Maple, Python, …) Physics aficionado
cdmackay
Posts: 281
Joined: Fri Oct 05, 2018 8:33 pm
Location: Cambridge, UK
Contact:

Re: Constants

Post by cdmackay »

super! thanks very much indeed; the Alpha additions are very useful.
Cambridge, UK
41CL/DM41X 12/15C/16C DM15/16 17B/II/II+ 28S 42S/DM42 32SII 48GX 50g 35s WP34S PrimeG2 WP43S/pilot
Casio, Rockwell 18R
Post Reply