Post Reply 
42S statistics registers
11-20-2019, 09:03 AM
Post: #1
42S statistics registers
It's a regular niggle to me, and I wondered: is there any reason why HP didn't make access to the cumulative statistics values any easier than semi-anonymous numbered registers?

I know that it was the same on e.g. the 15C, but that at least had them printed on the back. The 42S adds another 7 more. I don't use them often enough to remember which is which, so have to keep getting out my quick-ref card to check (other than R16 being n).

It wouldn't have killed HP to add a few more keys to the STAT menu and presented them by name?

I know I could easily enough do that myself, or there's William Solano's program, which looks quite good. I'm just wondering why HP didn't add it in the first place? Because the 41 didn't have it either?

Cambridge, UK
41CL/DM41X 12/15C/16C DM15/16 17B/II/II+ 28S 42S/DM42 32SII 48GX 50g 35s WP34S PrimeG2 WP43S/pilot/C47
Casio, Rockwell 18R
Find all posts by this user
Quote this message in a reply
11-20-2019, 02:19 PM
Post: #2
RE: 42S statistics registers
(11-20-2019 09:03 AM)cdmackay Wrote:  It's a regular niggle to me, and I wondered: is there any reason why HP didn't make access to the cumulative statistics values any easier than semi-anonymous numbered registers?

I know that it was the same on e.g. the 15C, but that at least had them printed on the back. The 42S adds another 7 more. I don't use them often enough to remember which is which, so have to keep getting out my quick-ref card to check (other than R16 being n).

It wouldn't have killed HP to add a few more keys to the STAT menu and presented them by name?

I know I could easily enough do that myself, or there's William Solano's program, which looks quite good. I'm just wondering why HP didn't add it in the first place? Because the 41 didn't have it either?

I agree that adding STAT menu labels would have been a nice touch, but recall that where the Stat registers are located (which registers), can be changed by the user via the SREG command (S=Sigma char) and also that if linear mode is enabled (LINS command, again S=Sigma), only a subset of the registers are used at all. With all that flexibility, it probably doesn't make sense to do something like print them on the keyboard (as was done with several others models in the Pioneer line).

--Bob Prosperi
Find all posts by this user
Quote this message in a reply
11-20-2019, 03:20 PM
Post: #3
RE: 42S statistics registers
I have a little program that makes this trivially easy. Just XEQ the appropriate label and it will give you the summation register in X, regardless of your current stat reg location. It also spits out an error if you try to recall one of the extended sums while in linear mode. It's written so as not to disturb the stack.

Code:
00 { 239-Byte Prgm }
01▸LBL "ΣX"
02 ΣREG?
03 GTO 00
04▸LBL "ΣX↑2"
05 ΣREG?
06 GTO 01
07▸LBL "ΣY"
08 ΣREG?
09 GTO 02
10▸LBL "ΣY↑2"
11 ΣREG?
12 GTO 03
13▸LBL "ΣXY"
14 ΣREG?
15 GTO 04
16▸LBL "ΣN"
17 ΣREG?
18 GTO 05
19▸LBL "ΣLNX"
20 FS? 61
21 GTO 99
22 ΣREG?
23 GTO 06
24▸LBL "ΣLN2X"
25 FS? 61
26 GTO 99
27 ΣREG?
28 GTO 07
29▸LBL "ΣLNY"
30 FS? 62
31 GTO 99
32 ΣREG?
33 GTO 08
34▸LBL "ΣLN2Y"
35 FS? 62
36 GTO 99
37 ΣREG?
38 GTO 09
39▸LBL "ΣLXLY"
40 FS? 63
41 GTO 99
42 ΣREG?
43 GTO 10
44▸LBL "ΣXLNY"
45 FS? 62
46 GTO 99
47 ΣREG?
48 GTO 11
49▸LBL "ΣYLNX"
50 FS? 61
51 GTO 99
52 ΣREG?
53 ISG ST X
54▸LBL 11
55 ISG ST X
56▸LBL 10
57 ISG ST X
58▸LBL 09
59 ISG ST X
60▸LBL 08
61 ISG ST X
62▸LBL 07
63 ISG ST X
64▸LBL 06
65 ISG ST X
66▸LBL 05
67 ISG ST X
68▸LBL 04
69 ISG ST X
70▸LBL 03
71 ISG ST X
72▸LBL 02
73 ISG ST X
74▸LBL 01
75 ISG ST X
76▸LBL 00
77 SF 30
78 RCL IND ST X
79 RTN
80▸LBL 99
81 "Invalid"
82 AVIEW
83 END


.zip  StatRegs.zip (Size: 323 bytes / Downloads: 4)
Visit this user's website Find all posts by this user
Quote this message in a reply
11-20-2019, 04:39 PM
Post: #4
RE: 42S statistics registers
Nice program, Dave.
I do not understand the use of flags 61,62 and 63, however.
I would think flag 60 is all you need: if it is set, all 13 statistics registers are used, whatever the fitting model is that is chosen.

And I would’ve written
Code:
Rv
RCL IND ST T
instead of
Code:
SF 30
RCL IND ST X

Cheers, Werner

41CV†,42S,48GX,49G,DM42,DM41X,17BII,15CE,DM15L,12C,16CE
Find all posts by this user
Quote this message in a reply
11-20-2019, 05:50 PM
Post: #5
RE: 42S statistics registers
(11-20-2019 04:39 PM)Werner Wrote:  Nice program, Dave.
I do not understand the use of flags 61,62 and 63, however.
I would think flag 60 is all you need: if it is set, all 13 statistics registers are used, whatever the fitting model is that is chosen.

And I would’ve written
Code:
Rv
RCL IND ST T
instead of
Code:
SF 30
RCL IND ST X

Cheers, Werner

Flags 61, 62, and 63 indicate which of the different models/sums are invalid based on the data you've entered. If you supply a zero for any of the X or Y values, then the sums that take the logarithm of those values are no longer valid. These flags are checked to prevent returning that invalid/incorrect data.
Visit this user's website Find all posts by this user
Quote this message in a reply
11-20-2019, 06:52 PM
Post: #6
RE: 42S statistics registers
thanks very much Bob, and Dave for the excellent program and explanation; marvellous!

Cambridge, UK
41CL/DM41X 12/15C/16C DM15/16 17B/II/II+ 28S 42S/DM42 32SII 48GX 50g 35s WP34S PrimeG2 WP43S/pilot/C47
Casio, Rockwell 18R
Find all posts by this user
Quote this message in a reply
11-20-2019, 09:03 PM
Post: #7
RE: 42S statistics registers
(11-20-2019 05:50 PM)Dave Britten Wrote:  Flags 61, 62, and 63 indicate which of the different models/sums are invalid based on the data you've entered. If you supply a zero for any of the X or Y values, then the sums that take the logarithm of those values are no longer valid. These flags are checked to prevent returning that invalid/incorrect data.

Never too old to learn ;-)
Thanks for the explanation!
Werner

41CV†,42S,48GX,49G,DM42,DM41X,17BII,15CE,DM15L,12C,16CE
Find all posts by this user
Quote this message in a reply
11-21-2019, 12:04 PM
Post: #8
RE: 42S statistics registers
One more thing: if you enable LINΣ mode, the 7 ln-type registers are not valid either.
Flags 61, 62 and 63 will however only be set the first time you use Σ+.
So I shamelessly (but gratefully) copied your program, but I use
Code:
 FS? 60
 FS? 61 (62,63 as appropriate)
 GTO 99
to test for Invalid recall requests.

BTW where did you find this info on flags 61-63?

Cheers, Werner

41CV†,42S,48GX,49G,DM42,DM41X,17BII,15CE,DM15L,12C,16CE
Find all posts by this user
Quote this message in a reply
11-21-2019, 12:21 PM
Post: #9
RE: 42S statistics registers
(11-21-2019 12:04 PM)Werner Wrote:  One more thing: if you enable LINΣ mode, the 7 ln-type registers are not valid either.
Flags 61, 62 and 63 will however only be set the first time you use Σ+.
So I shamelessly (but gratefully) copied your program, but I use
Code:
 FS? 60
 FS? 61 (62,63 as appropriate)
 GTO 99
to test for Invalid recall requests.

BTW where did you find this info on flags 61-63?

Cheers, Werner

That's a good point. Note that you'll need to change the flag tests like this if you want an "or" condition that goes to 99 if either flag is set:

Code:
FC? 60
FS? 61
GTO 99

I believe I got the flag info from the 42S manual, bottom of page 279, as well as by experimenting to see exactly how those flags behaved.
Visit this user's website Find all posts by this user
Quote this message in a reply
11-21-2019, 01:20 PM
Post: #10
RE: 42S statistics registers
(11-21-2019 12:21 PM)Dave Britten Wrote:  Note that you'll need to change the flag tests like this if you want an "or" condition that goes to 99 if either flag is set:
Code:
FC? 60
FS? 61
GTO 99

But I have to go to 99 when F60 is clear, meaning LINΣ is selected.

Cheers, Werner

41CV†,42S,48GX,49G,DM42,DM41X,17BII,15CE,DM15L,12C,16CE
Find all posts by this user
Quote this message in a reply
11-21-2019, 01:34 PM
Post: #11
RE: 42S statistics registers
(11-21-2019 01:20 PM)Werner Wrote:  
(11-21-2019 12:21 PM)Dave Britten Wrote:  Note that you'll need to change the flag tests like this if you want an "or" condition that goes to 99 if either flag is set:
Code:
FC? 60
FS? 61
GTO 99

But I have to go to 99 when F60 is clear, meaning LINΣ is selected.

Cheers, Werner

Oh right, I mistakenly inverted the meaning of flag 60 there. Smile
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 




User(s) browsing this thread: 4 Guest(s)