WP43 - Experience, tips & tricks

This area is for discussion about these families of custom high-end Scientific Calculator applications for SwissMicros devices.
DA74254
Posts: 193
Joined: Tue Oct 03, 2017 11:20 pm
Location: Norway/Latvia

WP43 - Experience, tips & tricks

Post by DA74254 »

Don't know if this post will be surplus or, but I thought making a post where findings, tips & tricks can be shared. This in order to not "bog down" the "debug/beta test post".

Ok, so I "ported" my DM42 program for calculating Relative humidity and dew point to the WP43.
I had to redo a few progam steps, d.t not having the same program features (or I didn't find them).
AlL set up, 63 code lines - aand it didn't work (Dew point at -295°c :roll: ).
Went through te program steps line by line, comparing. Couldn't find any errors.
Well, I found the culprit (mostly me) - I have set my calc to 8 level stack, thus having X, Y, Z, T, A, B, C, D. When I stored a variable in "B", which gets instantly repopulated d.t stack lift, the "stored" variable became, well, varable.

So, for programming, when storing named variables, it's beneficial to name stored variables/values with two or more letters (or locally I presume). After redoing "STO 'B'" to "STO 'Ba'", the program run flawlessly.

Now I only wait for the "WriteP" to be coded. So only way to "port" the code here is to write by hand.
Here goes:

Code: Select all

0000: { Prgm #2: 278 bytes / 63 steps }
0001:▸LBL 'RHD'
0002: FIX 02
0003: INPUT 'Tw'
0004: STO 'Tw'
0005: INPUT 'Td'
0006: STO 'Td'
0007: INPUT 'mB'
0008: STO 'mB'
0009: CLSTK
0010: 17.27
0011: RCL× 'Td'
0012: 237.3
0013: RCL+ 'Td'
0014: /
0015: E↑X
0016: 6.108
0017: ×
0018: STO 'Es'
0019: 17.27
0020: RCL× 'Tw'
0021: 237.3
0022: RCL+ 'Tw'
0023: /
0024: E↑X
0025: 6.108
0026: ×
0027: STO 'Ew'
0028: 115E-5
0029: RCL× 'Tw'
0030: 1
0031: +
0032: RCL 'Td'
0033: RCL- 'Tw'
0034: ×
0035: RCL× 'mB'
0036: 66E-5
0037: ×
0038: +/-
0039: RCL+ 'Ew'
0040: STO 'Ea'
0041: RCL 'Ea'
0042: RCL 'Es'
0043: /
0044: 100
0045: ×
0046: STO 'RH'
0047: RCL 'Ea'
0048: 6.108
0049: /
0050: LN
0051: 17.27
0052: /
0053: STO 'Ba'
0054: 237.3
0055: RCL× 'Ba'
0056: 1
0057: RCL- 'Ba'
0058: /
0059: STO 'Dew'
0060: CLSTK
0061: RCL 'RH'
0062: RCL 'Dew'
0063: END
I would like a tip if possible or how to display a recalled variable by name=value.
As in:
Stack Y shows "RH = {value}"
Stack X shows "Dew = {value}
(It's probably in the OM, which I've read, all 350 pages, but cant remember whether tis was described)
Esben
DM42 SN: 00245, WP43 Pilot SN:00002, DM32 SN: 00045 (Listed in obtained order).
dlachieze
Posts: 613
Joined: Thu May 04, 2017 12:20 pm
Location: France

Re: WP43 - Experience, tips & tricks

Post by dlachieze »

Thanks for sharing your experience !
DA74254 wrote:
Fri May 19, 2023 6:10 pm
I had to redo a few progam steps, d.t not having the same program features (or I didn't find them).
Which program features were not the same? This may be also interesting to know for other people reading this topic, as well as how you replaced them.
DA74254 wrote:
Fri May 19, 2023 6:10 pm

I would like a tip if possible or how to display a recalled variable by name=value.
As in:
Stack Y shows "RH = {value}"
Stack X shows "Dew = {value}
(It's probably in the OM, which I've read, all 350 pages, but cant remember whether tis was described)
"RH = "
RCL+ <variable1>
"Dew = "
RCL+ <variable2>

The plus operation with a string concatenate the string and the other argument into a string.

Note: after INPUT <var> you don’t need STO <var>, it’s included in the INPUT instruction.
DM42: 00425 - DM41X: β00066 - WP43: 00042
DA74254
Posts: 193
Joined: Tue Oct 03, 2017 11:20 pm
Location: Norway/Latvia

Re: WP43 - Experience, tips & tricks

Post by DA74254 »

dlachieze wrote:
Fri May 19, 2023 6:26 pm
Thanks for sharing your experience !
DA74254 wrote:
Fri May 19, 2023 6:10 pm
I had to redo a few progam steps, d.t not having the same program features (or I didn't find them).
Which program features were not the same? This may be also interesting to know for other people reading this topic, as well as how you replaced them.
I replaced the last bit:

Code: Select all

47 "RH %"
48 ARCL ST X
49 AVIEW
50 STOP
51 RCL "E"
52 6.108
53 ÷
54 LN
55 17.27
56 ÷
57 STO "B"
58 237.3
59 RCL× "B"
60 1
61 RCL- "B"
62 ÷
63 "Dew Point"
64 ARCL ST X
65 AVIEW
66 STOP
Mainly because I didn't remember what "ARCL" was and I didn't find "AVIEW" and "STOP". (It's probably there, but I didn't look thoroughly)
So instead, I redid the last part by storing the values, clearing the stack and recalling the desired values:

Code: Select all

0046: STO 'RH'
0047: RCL 'Ea'
0048: 6.108
0049: /
0050: LN
0051: 17.27
0052: /
0053: STO 'Ba'
0054: 237.3
0055: RCL× 'Ba'
0056: 1
0057: RCL- 'Ba'
0058: /
0059: STO 'Dew'
0060: CLSTK
0061: RCL 'RH'
0062: RCL 'Dew'
0063: END
Also, in the beginning of the SM42 program, there is a "PROMPT", which I replaced with "INPUT".
dlachieze wrote:
Fri May 19, 2023 6:26 pm
DA74254 wrote:
Fri May 19, 2023 6:10 pm

I would like a tip if possible or how to display a recalled variable by name=value.
As in:
Stack Y shows "RH = {value}"
Stack X shows "Dew = {value}
(It's probably in the OM, which I've read, all 350 pages, but cant remember whether tis was described)
"RH = "
RCL+ <variable1>
"Dew = "
RCL+ <variable2>

The plus operation with a string concatenate the string and the other argument into a string.

Note: after INPUT <var> you don’t need STO <var>, it’s included in the INPUT instruction.
Thank you. I've updated the program, removing the "STO" in the beginning and added your suggestion.

Edit2:
The "extra" STO after INPUT was one of my first fault tracing when the program didn't work. After renaming "B" to "Ba" and "E" to "Ea", it worked, and I didn't remove the STO. (Done now, though :) )
Esben
DM42 SN: 00245, WP43 Pilot SN:00002, DM32 SN: 00045 (Listed in obtained order).
User avatar
Walter
Posts: 3070
Joined: Tue May 02, 2017 11:13 am
Location: On a mission close to DRS, Germany

Re: WP43 - Experience, tips & tricks

Post by Walter »

Please look at the ReM and you'll find there isn't any AVIEW or ARCL anymore (cf. the IOI and p. 182/320) and why.
You'll also find in the IOI that STOP is entered via [R/S] (p. 70/320).
WP43 SN00000, 34S, and 31S for obvious reasons; HP-35, 45, ..., 35S, 15CE, DM16L S/N# 00093, DM42β SN:00041
DA74254
Posts: 193
Joined: Tue Oct 03, 2017 11:20 pm
Location: Norway/Latvia

Re: WP43 - Experience, tips & tricks

Post by DA74254 »

Thank you Walter.
I have to admit, that after reading the full 350 pages of the OM in two days, I kind of "skimmed the essence" in ReM. I'll go through it, but probably at a bit slower pace.
Esben
DM42 SN: 00245, WP43 Pilot SN:00002, DM32 SN: 00045 (Listed in obtained order).
User avatar
Walter
Posts: 3070
Joined: Tue May 02, 2017 11:13 am
Location: On a mission close to DRS, Germany

Re: WP43 - Experience, tips & tricks

Post by Walter »

The ReM is meant for reference (surprise!) - not meant to be read from end to end. Just check the Table of Contents and pick what you're interested in.
WP43 SN00000, 34S, and 31S for obvious reasons; HP-35, 45, ..., 35S, 15CE, DM16L S/N# 00093, DM42β SN:00041
DA74254
Posts: 193
Joined: Tue Oct 03, 2017 11:20 pm
Location: Norway/Latvia

Re: WP43 - Experience, tips & tricks

Post by DA74254 »

I am I.M.P.R.E.S.S.E.D! :)
I just used the "big factorial" from the example on p131 in OM, to calculate Googol! (1x10^100!).
Aand, comparing with Wolfram Alpha, it calculates it correctly in what I precieve as 1/10th of a second or less.

Edit:
The result is a number consisting of 99,5 Googol digits.
Esben
DM42 SN: 00245, WP43 Pilot SN:00002, DM32 SN: 00045 (Listed in obtained order).
DA74254
Posts: 193
Joined: Tue Oct 03, 2017 11:20 pm
Location: Norway/Latvia

Re: WP43 - Experience, tips & tricks

Post by DA74254 »

Probably a stupid question, and I've probably already read it in the manual..

How do I enter the summation/expression from the screenshot of my HP Prime (Which cannot evaluate this expression d.t out of memory/range) into the WP43? Or is it even possible?
Euler.png
Euler.png (25.47 KiB) Viewed 1063 times
Esben
DM42 SN: 00245, WP43 Pilot SN:00002, DM32 SN: 00045 (Listed in obtained order).
dlachieze
Posts: 613
Joined: Thu May 04, 2017 12:20 pm
Location: France

Re: WP43 - Experience, tips & tricks

Post by dlachieze »

See the programmable sum Σn page 253 of the Owner’s Manual.

You have to write a program for the function you want to sum. For example:

Code: Select all

001 LBL ‘1/n!’
002 x!
003 1/x
004 END
Then you enter the upper limit for ex. 99 in X (in this case this should be enough as an infinity approximation), and press [f] [ADV] [Σn] [PROG] [1/n!]

The fractional part of 99 being 0 this means that the lower limit is 0 and the step is 1 by default.
DM42: 00425 - DM41X: β00066 - WP43: 00042
User avatar
Walter
Posts: 3070
Joined: Tue May 02, 2017 11:13 am
Location: On a mission close to DRS, Germany

Re: WP43 - Experience, tips & tricks

Post by Walter »

dlachieze wrote:
Sun May 28, 2023 11:44 am
Then you enter the upper limit for ex. 99 in X (in this case this should be enough as an infinity approximation), ...
Here, already 30 is sufficient. 8-)
And a label Σ1/n! is allowed as well...
WP43 SN00000, 34S, and 31S for obvious reasons; HP-35, 45, ..., 35S, 15CE, DM16L S/N# 00093, DM42β SN:00041
Post Reply