Calculator benchmark
|
08-20-2021, 03:34 AM
Post: #41
|
|||
|
|||
RE: Calculator benchmark
I just tried this, I still have Shift Setup F2 for line I/O mode.. maybe the firmware version is different? I have 3.11.0202
(08-13-2021 02:16 PM)robve Wrote: Just my 2c: the keystrokes for the Casio fx-cg50 aren't the same as Casio fx-9750GIII (I own the former, not the latter). There is no Shift Setup F2 to switch to line I/O mode (it selects COORD instead) and EXE works differently. Use Shift Prgm and keep the FN menu to enter Prgm symbols. AEXE inserts a newline/carriage return [NL] symbol for the next statement: |
|||
08-20-2021, 02:49 PM
(This post was last modified: 08-20-2021 05:56 PM by robve.)
Post: #42
|
|||
|
|||
RE: Calculator benchmark
(08-20-2021 03:34 AM)jhallen Wrote: I just tried this, I still have Shift Setup F2 for line I/O mode.. maybe the firmware version is different? I have 3.11.0202 I should have mentioned that I used the Program app (B from the menu) not the Run-Matrix mode. My mistake. I thought you used the Program app for the setup and execution, but that's not the case. Activating the Prgm function keys helps to reduce the number of keystrokes for the entire setup. In the Program app: Code: F3 5 EXE New program name [Q] Full setup with a new program: 39 keystrokes EXIT EXIT EXE to exit the editor and run. When running the program, it appears that the input allows you to enter A, B, 2A, B/2 etc to reuse previous values, which reduces the number of keystrokes (my previous keystroke score is too high). I think it is 77 (it's tedious, need to double check). Edit: I got hold of the Casio. The execution is 77 plus the 23 EXE (12+11 EXE since we don't need the last EXE) thet are necessary for the display progress. This brings the total to 39+3+77+12+11=142. - Rob "I count on old friends to remain rational" |
|||
08-20-2021, 02:58 PM
Post: #43
|
|||
|
|||
RE: Calculator benchmark
(08-19-2021 11:31 PM)Valentin Albillo Wrote: there's again a simple optimization that will reduce your 101 score by no less than 4 keystrokes, leaving the new score as 97 ! ... I can do it in 90. I'm not at all familiar with the 15C, however, so I may have made a mistake. The idea is to do as much as possible in the setup. So, A: calculates and shows the 2 numbers, R/S: doubles REG 1 & A B: halves REG 2 & A setup: total 41 Code: (2) g P/R calc: total 49 (last two entries are calculated in reverse order) Code: (13) 3.12 STO 1 2.56 STO 2 A Cheers, Werner 41CV†,42S,48GX,49G,DM42,DM41X,17BII,15CE,DM15L,12C,16CE |
|||
08-20-2021, 06:12 PM
Post: #44
|
|||
|
|||
RE: Calculator benchmark
(08-20-2021 03:34 AM)jhallen Wrote: I just tried this, I still have Shift Setup F2 for line I/O mode.. maybe the firmware version is different? I have 3.11.0202 I thought of a neat trick to get two outputs at the same time on the Casio by displaying the X,Y pair as a complex number. Entering 3.12[EXE] and 2.56[EXE] displays: 11.91439274 +1.880014517i This avoids the extra EXE to display both results, thus saving 12 EXE keystrokes. The program is 2 keystrokes longer to enter i with Shift 0 (note: + replaces the triangle): Code: F3 5 EXE New program name [Q] setup: 41 run: 3 (EXIT EXIT EXE to run) execution: 88 (since 77 + 11 EXE) total: 132 - Rob "I count on old friends to remain rational" |
|||
08-20-2021, 08:26 PM
(This post was last modified: 08-20-2021 08:30 PM by jhallen.)
Post: #45
|
|||
|
|||
RE: Calculator benchmark
(08-20-2021 06:12 PM)robve Wrote: I thought of a neat trick to get two outputs at the same time on the Casio by displaying the X,Y pair as a complex number. I just used this trick for the TI-30X Pro / TI-36X Pro. I had to "fix" the results to 5 digits because otherwise complex numbers go off the edge of the display (so you could scroll it, but lots of extra keystrokes). I have an old TI-68 that I think this will work for also. But really Casio should add a way to print without waiting, and more intelligent prompting... I have the feeling that their recent development focus, at least on these calculators, has not been on programming. I'm curious about fx-GC500, and have one on order. I watched a video suggesting that it is now the best calculator for EEs because its Laplace transform capability is built-in (unlike TI-nSpire CAS) and matches the way it's taught (uses s and t, unlike HP-Prime which uses x). |
|||
08-22-2021, 10:29 AM
(This post was last modified: 08-22-2021 06:31 PM by C.Ret.)
Post: #46
|
|||
|
|||
RE: Calculator benchmark
(08-19-2021 11:31 PM)Valentin Albillo Wrote: See if you can find it (I'm sure you will). Yes, but too late, I found same ways to spare a few strokes but not the 4 strokes you were waiting for ! Werner propose a much economic solution, but I think we reach a limit in clarity. Especially when he changes the order of results not following at the original table order. I try to optimize a bit more his code trying to include all the process into a unique code run. But I am not satisfy with the solution I come to. It is far too much confusing and the user certainly will be completely lost. That why I was looking for a much more secure way to do this job Quote: I think this is a fairly representative calculator problem- perhaps you have collected some data from an experiment, and need to transform this data before presenting it. Imagine you have to present the results to your boss or an examination committee; any confusing results, mistake or erroneous transcription would certainly bring you in big troubles ! Fortunately, I found a device that will be a easy and secure to use: HP-19C PROGRAM Code: (3) [.PRGM.] f Clear PRGM This PRINT the complete and unambiguous listing where labels X Y Z & T indicate respectively X Y B & A values: R/S 3.1200 T 2.5600 Z 1.8800 Y 11.9144 X 3.1200 T 1.2800 Z 0.4937 Y 12.6075 X 3.1200 T 0.6400 Z -0.8926 Y 13.3007 X 6.2400 T 0.6400 Z -0.8926 Y 45.6239 X 12.4800 T 0.6400 Z -0.8926 Y 168.6767 X 24.9600 T 0.3200 Z -2.2789 Y 649.1010 X 24.9600 T 0.1600 Z -3.6652 Y 649.7942 X 24.9600 T 1.3200 Z 0.5553 Y 647.6840 X 18.5600 T 1.3200 Z 0.5553 Y 362.7560 X 17.6300 T 1.3200 Z 0.5553 Y 328.1693 X 17.6300 T 2.6400 Z 1.9416 Y 327.4761 X 17.6300 T 5.2800 Z 3.3279 Y 326.7838 X SCORE 110 for the honorable and practical HP-19C pocket printing calculator. |
|||
08-22-2021, 06:42 PM
Post: #47
|
|||
|
|||
RE: Calculator benchmark
I've made an attempt on the NUMWORKS calculator. Score is not great, but it gives you an idea of using microPython. I don't have this calculator, but there is an Android app that emulates it.
https://github.com/jhallen/calculator/wiki/NUMWORKS |
|||
08-23-2021, 10:51 PM
Post: #48
|
|||
|
|||
RE: Calculator benchmark
I came up with a slightly shorter 103 keystroke solution for the SHARP PC-E500, saving 10 keystrokes for the execution by extending the program, adding 7 keystrokes. The program assigns B/2 to C so that C can be entered as a shortcut for B/2.
I hesitated to post this, because the method is slightly less generic than the one posted before that had no assumptions whatsoever on the values entered during execution, which is really nice. The more a method deviates from generality by implementing specific shortcuts for this problem posted by the OP, the less useful the benchmark may become to estimate how well a calculator performs for this type of problem (i.e. not this specific problem). Setup takes 38 keystrokes: Code: [BASIC] 1 enter PRO MODE Execution takes 65 keystrokes: Code: [BASIC] 1 enter RUN mode SHARP PC-E500 score: 103 keystrokes SHARP PC-G850(V)(S) score: 104 keystrokes The program and execution for the SHARP PC-G850(V)(S) is the same, but takes one more keystroke for R. (RUN) instead of F1. - Rob "I count on old friends to remain rational" |
|||
09-22-2021, 06:14 PM
(This post was last modified: 09-23-2021 01:22 AM by robve.)
Post: #49
|
|||
|
|||
RE: Calculator benchmark
I just bought a used Sharp EL-5100S in excellent condition to play with while I'm out of town. The EL-5100 was first produced in 1979 (Eddie's blog post). The EL-5100 is the first calculator with algebraic entry and dot matrix display (virtual museum of calculators). It not only looks great, it is awesome to use too.
So the first thing I tried with my "new" machine is AER (Algebraic Expression Reserve) to store and run the benchmark formula. Code: AER-switch 1 switch to AER mode Setup: 18 keystrokes This assumes the AER space was empty or can be typed over. To clear AER, press [2ndF][CA]. Code: COMP-switch 1 switch to comp mode Execution: 81 keystrokes Sharp EL-5100(S): 99 keystrokes The execution shows prompts for the A=? and B=? values. The results displayed are shown with ANS 1 and ANS 2. This makes it easy to keep track of the values entered and the results produced. I haven't used any shortcuts for this specific benchmark in the setup, i.e. this result is representative of the general performance of this calculator for this type of problem, not for this specific benchmark. Just my 2c: shortcuts in the setup, such as pre-defining specific "user" key sequences to shorten the execution produce results that are only specific for the specific sequence of values entered in this benchmark. Adding shortcuts reminds me of CPU benchmark cheating (google it), where the machine recognizes the benchmark application to activate shortcuts and specific optimizations that aren't generally applied to other applications. EDIT: corrected typo in "Eddie's blog post". - Rob "I count on old friends to remain rational" |
|||
09-25-2021, 01:25 AM
(This post was last modified: 09-26-2021 06:36 PM by robve.)
Post: #50
|
|||
|
|||
RE: Calculator benchmark
(09-22-2021 06:14 PM)robve Wrote: Sharp EL-5100(S): 99 keystrokes With a cheat, ahem, "performance shortcut" for this specific problem: Sharp EL-5100(S): 93 keystrokes I'll buy the first person who finds this keystroke sequence a beer. If no one found it in 7 days, then I'll report the solution next week anyway. PS (edit): just 92 keystrokes is also possible. So I have to restate the challenge slightly: the first person who finds a keystroke sequence of 93 or less gets a beer. - Rob "I count on old friends to remain rational" |
|||
10-02-2021, 10:08 PM
(This post was last modified: 05-07-2022 07:27 PM by robve.)
Post: #51
|
|||
|
|||
RE: Calculator benchmark
(09-25-2021 01:25 AM)robve Wrote: Sharp EL-5100(S): 93 keystrokes Alas, no submitted solutions. A solution with 91 keystrokes saves the value B/2 in M in the AER setup. Instead of typing B/2 in the execution, the RM key suffices to obtain B/2: AER-switch 1 AER mode [2ndF][f()=]AB= 5 enter formula LHS /2[=>M] 3 save B/2 in M A[x^2]+A-[LN]B,[LN]B[x^2] 11 enter formula RHS Setup: 20 keystrokes. Code: COMP-switch 1 comp mode Execution: 71 keystrokes. Sharp EL-5100(S): 91 keystrokes The EL-5100(S) was the first calculator to introduce algebraic notation. The expression syntax is internally still handled by the traditional operand and operator stacks combined with an X register to hold the last result. This means that /2[=>M] is legal, because /2 takes the last value stored in register X then divides it by 2. In this case X holds the last value entered. Because an internal register X is used to hold the last value and the syntax of infix and postfix operators allows omitting the first operand, a slew of tricks and hacks is possible to reduce the size of AER formulas and, consequently, reduce keystrokes. There appears to be no requirement to use a comma in an AER formula to chain multiple expressions, despite what the SHARP manual says. The comma produces a value, which is not always desirable. Omitting the comma in a formula simply continues executing the next expression in the AER formula. This is what you would normally expect a simple calculator to do. Perhaps SHARP didn't want to reveal that the implementation of algebraic expression evaluation is a simple "shunting yard" algorithm to parse expressions. Below is a list of EL-5100(S) tricks and hacks. Most aren't documented by SHARP or posted elsewhere: Code: After STO ⇒M M+ the last value is still usable as an operand for the next Some examples to demonstrate these hacks. Simpson's rule of integration: Code: 1;f(ABC)=0 STO I 1 STO J 2 STO H A STO E B-A)÷C STO D◣ erf() approximation with maximum relative error 0.00013 (note that (-) means unary minus): Code: 1;f(A)=² STO B √B÷A×√(1-e((-)B×(4÷π+.147B)÷(1+.147B GCD(A,B): Code: 1;A-(A÷B+ᴱ10-ᴱ10)B STO C B STO A C STO B Rational approximation by continued fractions: Code: 1;E+ᴱ10-ᴱ10 STO D E-D STO E BD+J STO F B STO J F STO B CD+I STO F C STO I F STO C B÷C STO D E⁻¹ STO E A-D◣ Complex arithmetic: Code: 1;f(BJ)=A+B STO A,I+J STO I◣ t-test: Code: 1;f(A)=F÷E-A)÷√((G-E×(F÷E)²)÷(E²-E Numerical differentiation: Code: 1;f(A)=√A²+ᴱ‐9)×ᴱ‐4 STO H A+H÷2 STO A 0 STO D◣ Sterling's Gamma approximation: Code: 1;f(A)=√2π×AYˣ(A-.5)×e(1÷12A-A These fun concoctions are mine, except the last one, which is based on the Gamma function shown in http://rskey.org/el5100 Edit: after posting I noticed that the HP forum "machinery" replaced the E exponent symbol U+1D53C with a question mark. Is this a bug? I replaced the double stroke E with the ᴱ symbol. Ugly, but close enough. Also clarified the floor/round tricks, added the f(A= hack and added a complex arithmetic example. Edit 2: further reduced to 91 keystrokes by replacing )= requiring two keystrokes [2ndF][f()=] with just one keystroke = as a shortcut. - Rob "I count on old friends to remain rational" |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)