Calculator benchmark
|
08-08-2021, 05:42 AM
Post: #1
|
|||
|
|||
Calculator benchmark
I've written a silly benchmark for my growing calculator collection- it measures the number of keystrokes necessary to transform a table of numbers through some equations. The results are here:
Calculator Benchmark It's missing something from the HP-48 series- I just bought an HP-49g+ but I'm an RPL newbie. Is there something readily available (on the calculator by default), but better than INPUT for this task? I'm looking for a function that will prompt the user for a number that will be assigned to a variable, but it should offer to just use the old value of the variable instead- hit enter to keep the current value, something like that. It does not appear that INPUT can do this... I think it could insert the old variable value, but then you would have to backspace over it to enter a new value. Am I missing something? |
|||
08-08-2021, 04:46 PM
(This post was last modified: 08-08-2021 06:56 PM by C.Ret.)
Post: #2
|
|||
|
|||
RE: Calculator benchmark HP-28S
Hi, nice benchmark, I always notice that not all calculators, especially programmable, are easy t use. Same of them didn't spare keystroke at all.
Here how I will setup, enter the table without repetitions to get all individual X and Y results on responsible HP-28S. I presume this can be done exactly the same way on a HP-28Csince I don't use here any specific capability of the 'S' version but only setup the solver menu for interactivity and practical use with spare keystrokes. It is certainly possible to use the same trick on HP48/50 series, but I am unable to count the exact score since user interface, menu's access and keyboard are quite different on later RPL calculators. HP-28S f, [...] and (...) indicate respectively shift key, physical or soft-menu keystrokes. Code: SETUP Description Keystrokes DATA ENTRY and (X;Y) results DISPLAY through the powerful solver menu interface: Code: 3.12 (A) 2.56 (B) (LEFT=) (RIGHT=) Enter first data pair Score : 110 keystrokes EDIT: Just realize by writing this post that two more keystrokes can be spare when entering table 4th and 5th pair: Since 12.48 is 2 * 6.24, instead of typing 12.48 (A), one may spare a troke by entering A [,] A [+] (A) ( or A [SPACE] A [+](A) ). And the same trick can be used for the next entry : A [,] A [+] (A) instead of 24.96 (A) since \(24.96=2*12.48\). The final score of HP-28C/S may be reduce to 108 ! |
|||
08-08-2021, 07:26 PM
(This post was last modified: 08-18-2021 03:57 PM by C.Ret.)
Post: #3
|
|||
|
|||
RE: Calculator benchmark
I found a way to spare keystrokes on HP-15C:
HP-15C SETUP: Code: g P/R f CLEAR PRGRM Enter new program 4 TABLE ENTRY and RESULTS Display: X and Y displayed after each press of A or B key. Code: **2.56 B 3.12 A ** // [←] 2.56 B Eventual press [←] to clear ERROR 0 when non initialized register R1 (B value) is zero 10 Score : 109 In case of a full functional and awake user ! **EDIT: keystrokes count and summation corrected |
|||
08-08-2021, 08:05 PM
(This post was last modified: 08-09-2021 07:54 PM by jhallen.)
Post: #4
|
|||
|
|||
RE: Calculator benchmark
Neat! I'm going to have to get me one of these HP-28s..
I think they broke this to some degree in the HP-49G+, unless the exact solver is still available in it somewhere that I haven't found. In the NUM.SLV / "Solve equation" screen, you can enter the equation (if you hadn't STEQ'd it already), have it query for the variables, and you can hit "EXPR=" (on of the F keys) to evaluate the sides. But the results are not shown until you leave the solver (press ON, then shows left and right). Update: yeah I checked this in emu48. C.Ret's solution works on the HP-48S and HP-48SX, but does not work on HP-48G. The "improved" solver on the graphing calculators breaks it. On some calculators you can make two equations into one by using complex numbers: one equation is real, the other is imaginary. Maybe there is something with vectors to extend this further.. |
|||
08-08-2021, 08:25 PM
(This post was last modified: 08-18-2021 04:02 PM by C.Ret.)
Post: #5
|
|||
|
|||
RE: Calculator benchmark
Yes, in the HP-28S solver pressing (LEFT=), (RIGHT=) or (EXPR=) temporary display the value and its label on top of the display and enter the value in the stack where it is visible and stay here until the user drop it or clear the whole stack.
The (LEFT=) and (RIGHT=) appear only because I intentionally group the two formulae in one equality. One big advantage of the Clamshell calculators is the full keyboard for direct alphabetic characters. In contrary to later series, the [alpha] key only serve in rare and specific command-line entries. Easy activation of numerous menus with rows of six soft-menu key spare a lot of prefix key when typing, setting or launching functions. SHARP PC-1211 SETUP: Code: [MODE][MODE] 2 Enter program mode Total 42 keystrokes to enter program and setup mode. Plese note the heavy use of implicit multiplication. Code: 3.12 def-A [CL] def-A is [shift][A] in def mode, [CL] is need when B is set to zero (clear error state) Total 72 keystrokes to input table values and systematically show X and Y on one display (or print the two values on printer is connected). Score : 114 keystrokes And the two X and Y results clearly displayed on both halfs of the display after each entry. **EDIT: [CL] can be spare by entering B before A to avoid LN(0) error ! |
|||
08-08-2021, 09:57 PM
Post: #6
|
|||
|
|||
RE: Calculator benchmark
>PC-1211..
"2A": EL-512 has this, but it does not work so well. When you enter "Kn" it always multiplies, so you have to enter 1 ahead of time if you don't want it to. AREAD comand... very nice feature of PC-1211. Do the other BASIC pocket computers have this? Binding key to line label with "defm", also nice. Actually TI-59 could use this idea, just as you did with the HP-15c. But I do prefer some kind of prompting, remind me what the old values are. |
|||
08-09-2021, 08:14 PM
(This post was last modified: 08-09-2021 08:25 PM by Claudio L..)
Post: #7
|
|||
|
|||
RE: Calculator benchmark
Using newRPL on a 50g:
Entering A: 45 keystrokes Entering B: 45 keystrokes Computing X and Y: 14 keystrokes Using newRPL on a Prime G1: Computing X and Y: 10 keystrokes (because the x^2 key is not shifted and LN isn't shifted) Total: newRPL on Prime = 100 keystrokes newRPL on 50g = 104 keystrokes **EDIT**: Starting with an empty stack, creating the lists for A and B can be done using the interactive stack in 6 and 7 keystrokes respectively (instead of 9+9), lowering the count to 95 for the Prime and 99 for the 50g. Code:
PS: I think this is an interesting benchmark, should probably be moved to the general forum. I'd say if HP calculators are present in the benchmark, it's definitely HP calculator related. |
|||
08-11-2021, 04:33 AM
Post: #8
|
|||
|
|||
RE: Calculator benchmark
Trying this on my HP-49G+ in "old" RPL... immediately I run into "the + operator does not concatenate or extend lists anymore: use ADD instead". Very unfortunate that ->LIST is buried in menus. Also, Tool/View/Text.. even so, this is quite good.
I can see some of inspiration for the chosen differences in newRPL.. |
|||
08-11-2021, 05:18 AM
Post: #9
|
|||
|
|||
RE: Calculator benchmark
(08-08-2021 09:57 PM)jhallen Wrote: AREAD comand... very nice feature of PC-1211. Do the other BASIC pocket computers have this? . Well, the HP-71B has it, called DISP$. V. All My Articles & other Materials here: Valentin Albillo's HP Collection |
|||
08-11-2021, 09:00 AM
(This post was last modified: 08-11-2021 09:01 AM by OlidaBel.)
Post: #10
|
|||
|
|||
RE: Calculator benchmark
Thank you for the exercice.
https://github.com/jhallen/calculator/wiki/HP-15c "Like all good HP calculators, it has the %change operator." Are you kidding ? I never use(d) the % key, prefering typing directly hundredth. I'm not alone certainly. Probably for the same reason why this function was later hidden in a submenu. I like(d) the HP-15C very much. --- HP 48GX, Prime G2, 50G, 28S, 15c CE. SwissMicros DM42, DM15L A long time ago : 11C, 15C, 28C. |
|||
08-11-2021, 11:49 AM
Post: #11
|
|||
|
|||
RE: Calculator benchmark
Surely
Code: RCL 0 Code: RCL 0 Cheers, Werner 41CV†,42S,48GX,49G,DM42,DM41X,17BII,15CE,DM15L,12C,16CE |
|||
08-11-2021, 12:40 PM
(This post was last modified: 08-11-2021 02:19 PM by OlidaBel.)
Post: #12
|
|||
|
|||
RE: Calculator benchmark
(08-08-2021 08:05 PM)jhallen Wrote: Update: yeah I checked this in emu48. C.Ret's solution works on the HP-48S and HP-48SX, but does not work on HP-48G. The "improved" solver on the graphing calculators breaks it.HP 48GX based on C.Ret one, (flag 3 unchecked = symbolic function) [L] SOLVE [_ROOT_softkey] 3 (left SOLVE is hidden on keyboard) alpha A [L]x^2 alpha A + alpha B [R]LN - 12 alpha B [L] X^2 [R] LN [L] = 8 [L] [EQ softkey] 2 (equivalent to STO into EQ) [_SOLVR softkey] 1 (activate Solvr menu with 'white' softkeys) Total : 3+12+8+2+1 = 26 Differently and shorter : ' alpha A y^x 2 + alpha A [R]= [R]LN alpha B y^x 2 16 [L] [EQ softkey] 2 Total : 3 + 16 + 2 + 1 = 22 Regarding results : the 'EXPR=' white softkey returns tagged values on 2 lines : 2: Left: value 1: Right: value hence only one "EXPR=" white softkey is necessary for each pair of result values --- HP 48GX, Prime G2, 50G, 28S, 15c CE. SwissMicros DM42, DM15L A long time ago : 11C, 15C, 28C. |
|||
08-11-2021, 01:11 PM
Post: #13
|
|||
|
|||
RE: Calculator benchmark | |||
08-11-2021, 01:16 PM
(This post was last modified: 08-11-2021 01:25 PM by jhallen.)
Post: #14
|
|||
|
|||
RE: Calculator benchmark
Not % (which I agree is useless), but %change or delta% equivalent to: (a - b)*100/b.
BTW, I think this Sharp EL-506 also has this key (look above x^2), but later models like the EL-501P don't have it. EL-501 (08-11-2021 09:00 AM)OlidaBel Wrote: Thank you for the exercice. |
|||
08-11-2021, 01:33 PM
Post: #15
|
|||
|
|||
RE: Calculator benchmark
(08-11-2021 01:16 PM)jhallen Wrote: Not % (which I agree is useless), but %change or delta% equivalent to: (a - b)*100/b.Maybe I read to fast, you're right, I agree for the %change. --- HP 48GX, Prime G2, 50G, 28S, 15c CE. SwissMicros DM42, DM15L A long time ago : 11C, 15C, 28C. |
|||
08-11-2021, 05:14 PM
Post: #16
|
|||
|
|||
RE: Calculator benchmark
(08-11-2021 04:33 AM)jhallen Wrote: Trying this on my HP-49G+ in "old" RPL... immediately I run into "the + operator does not concatenate or extend lists anymore: use ADD instead". Very unfortunate that ->LIST is buried in menus. Also, Tool/View/Text.. even so, this is quite good. Yeah, some menus need keyboard shortcuts (List, Matrix, etc.) which are not implemented yet. Anyway, I just looked at your updated benchmark page, nice to see the 48 (49/50, etc) is still king for number crunching. The stack environment really keeps your productivity up there. There's no doubt it belongs if not at number one, among the top calculators out there, for whatever you throw at it can be done efficiently. |
|||
08-11-2021, 08:15 PM
(This post was last modified: 08-13-2021 05:39 PM by robve.)
Post: #17
|
|||
|
|||
RE: Calculator benchmark
(08-08-2021 08:25 PM)C.Ret Wrote: SHARP PC-1211 Very nice to use AREAD with the DEF-key! I used it a lot back in the 80s to chain calculations for circuitry, the last value PRINTed also feeds back into AREAD. This, together with abbreviated commands (A. for AREAD, P. for PRINT, I. for INPUT, F. for FOR, etc) saved a lot of keying. I tried your program on a PC-1250A. There is no MODE key on the PC-125x, but a mode slider. That saves 2 keystrokes (mode sliding counts as one keystroke; one click action), for a total of 110 keystrokes for the PC-1250A (and all PC-125x). On the PC-126x, PC-13xx and PC-14xx there is no support for implied multiplication syntax. This adds 4 keystrokes to the program for A*A and LN(B*B). Value 2A becomes 2*A (3 more keystrokes for three inputs) and .5B becomes B/2 (same keystrokes for two inputs), giving 117 keystrokes total for the PC-126x, PC-1350/60 and PC-14xx series (mode switching takes one keystroke or one slider click). Edit: in hindsight, the PC-14xx supports the SQU function with the [x^2] key and the LN function with the [LN] key, so takes just 13 (or 14 when comma requires SHIFT) keystrokes to enter P.[x^2]A+A-[LN]B,[LN][x^2]B instead of 19 (or 20 when comma requires SHIFT) to type out the full P.A*A+A-LNB,LN(B*B). The PC-13xx and PC-14xx have a dedicated comma key without SHIFT, thus 110 keystrokes for the PC-14xx series. The PC-126x requires SHIFT for the ( and ), thus 117+2=119 keystrokes for the PC-126x series. The PC-1250A has implied multiplication but requires SHIFT with ( and ), thus 112 keystrokes for the PC-125x(A) series. Alas, SHARP decided to get rid of the AREAD command and the DEF-key for their later models PC-E500(S) and the PC-G8xx series. - Rob "I count on old friends to remain rational" |
|||
08-12-2021, 01:42 AM
Post: #18
|
|||
|
|||
RE: Calculator benchmark
(08-08-2021 05:42 AM)jhallen Wrote: Is there something readily available (on the calculator by default), but better than INPUT for this task? Purely from a data entry perspective, my inclination would be to simply use the matrix writer for inputting the data. It's easy to activate (left-shift MTRW), and once you've established the first two entries and started the next row, it "knows" that you are entering a 2-column matrix. Subsequent entries could be entered in sequence with the enter key and possibly RS-COPY and RS-PASTE for the repeated entries if desired. A final ENTER places the resulting matrix on the stack. You could then use either the matrix commands or convert the result to a list with AXL and process the result as a list of lists. If using the list approach, a final AXL will convert the data back to matrix form. While I'm sure you could find a solution with fewer keystrokes needed for the computational part (the sheer number of commands available on the 49/50 dictates deep/lengthy menus), I'm looking at this more from a practicality standpoint than a keypress competition. When entering data, I think there's great value in seeing more of the data while doing the entries. Navigating within the matrix for copy/paste/correction is also intuitive. The matrix writer handles this nicely. |
|||
08-12-2021, 04:24 PM
(This post was last modified: 08-18-2021 04:12 PM by C.Ret.)
Post: #19
|
|||
|
|||
RE: Calculator benchmark
(08-09-2021 08:14 PM)Claudio L. Wrote: PS: I think this is an interesting benchmark, should probably be moved to the general forum. I agree with you it is a good benchmark that qualify equally the calculator and the ingenuity of the drilled user ! Your method building up the two list in the stack really impress me, that’s shame that not "list arithmetic" exist on my HP-28S ! (08-11-2021 11:49 AM)Werner Wrote: Good catch ! (08-11-2021 05:18 AM)Valentin Albillo Wrote: Well, the HP-71B has it, called DISP$. I have to admit that I have an hard time to adapt my code using the AREAD instruction to the HP-17B. I lost myself in many complicated detours and useless escape key sequences. Finally, restarting from an empty scratchpad, I get something competitive : HP-71B Setup: Code: EDIT 2 Activate new 'workfile' Note that I am not using the expected A and B keys, you will see why: Data entry and results display: Code: f USER 2 Activate USER mode Score 135 keystrokes for the HP-71B Not bad for the "Ugly Duckling" ! |
|||
08-12-2021, 09:13 PM
(This post was last modified: 08-15-2021 04:44 PM by robve.)
Post: #20
|
|||
|
|||
RE: Calculator benchmark
SHARP PC-E500(S): 106 keystrokes!
The SHARP PC-E500(S) blows most other calculators out of the water. [LN] refers the LN key and [x^2] refers to the squaring key. [BASIC] switches modes. Commands are abbreviated as usual: I. is INPUT, P. is PRINT, G. is GOTO, and R. is RUN. Colon is [2nd]; The program: Code: [BASIC] 1 enter PRO MODE The table: Code: [BASIC] 1 enter RUN mode Edit: just realized that A*A can be [x^2]A and colon is [2nd]; Edit 2: ... oh well, so apparently the browser didn't scroll the table with the PC-1211 program and inputs I looked at, so I missed some inputs (there are 12 results, not 10, for a total of 107 keystrokes). Never do this kind of thing right before dinner time Edit 3: saved one keystroke (now 106) by using function key F1 instead of R. for RUN, because F1 is by default RUN. - Rob "I count on old friends to remain rational" |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 6 Guest(s)