Calculator benchmark
|
08-19-2021, 05:21 PM
(This post was last modified: 08-19-2021 05:36 PM by C.Ret.)
Post: #39
|
|||
|
|||
RE: Calculator benchmark
(08-19-2021 04:55 AM)Valentin Albillo Wrote: Also, did you find the fairly simple optimization of your HP-15C's Setup section which I mentioned ? Late yesterday night, I made a few progress in this research and finally found two optimizations of my previous HP-15C code. There is a way to spare unnecessary GTO 01 and LBL 01 : First optimization: f LBL A STO 1 RCL 2 f LBL B STO 2 ... No more need of the LBL 01 label and the extra RCL 2 is no longer than the GTO 1 statement from previous version. From here, one may start the computation of X and Y. Second optimization: since the X-register always contain the value of B after the LBL B STO 2 statements, why not directly start the computation with evaluating LN(B) ? This spare a few more steps in the process ; ... g LN RCL 1 ENTER g x² + x↔y - f PSE ... to display X=A+A²-LN(B) ... g LSTx ENTER + .... to display Y=LN(B²) This two tricks reduce the original 40 keystrokes to only 36 keystrokes. But why may I stop this economy of labels so soon, is there any way to avoid any labels and the USER's mode ? Yes, like for the HP-41C, no more GTO , A or B keys, the R/S key only run all the table. This lead me to this last proposition for the HP-15C SETUP 26 keystrokes Code: g P/R f Clear PRGM 4 [ g ][P/R][ f ][Clear PRGM] Start new program EXECUSION 75 keystrokes Code: 3,12 STO 1 6 [ 3 ][ . ][ 1 ][ 2 ][STO][ 1 ] SCORE 101 PS.1: Please note that there is two f PSE instructions in this setup and the owners of the HP-15c Limited Edition (LE) will be in big troubles. The calculator display the two results X and Y successively in this order. If the user is not concentrate or fast enough to note the two results on the fly at each run, he only have to press the R/S again to repeat the displays. PS.2: The EXECUSION part is exactly the same as the one for the HP-41C. Why couldn’t the score of the venerable pocket computer be reduced to 101 ? |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)