Post Reply 
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
RCL 1  ENTER  g x²  +  RCL 2  g LN  -  f PSE        13        [RCL][ 1 ][ENTER][ g ][x² ][ + ][RCL][ 2 ][ g ][LN ][ - ][ f ][PSE]   Display X = A+A²-LN(B)
g LSTx  ENTER  +  f PSE                              6        [ g ][LSTx][ENTER][ + ][ f ][PSE]                                     Display Y = LN(B²)
2  g P/R                                             3        [ 2 ][ g ][P/R]                                                        Put 2 in stack and switch back to run mode

EXECUSION 75 keystrokes
Code:
3,12  STO 1                                          6        [ 3 ][ . ][ 1 ][ 2 ][STO][ 1 ]        
2,56  STO 2  R/S                                     7        [ 2 ][ . ][ 5 ][ 6 ][STO][ 2 ][R/S]                                                        
STO/2  R/S                                           4        [STO][ / ][ 2 ][R/S]                                                                                
STO/2  R/S                                           4        [STO][ / ][ 2 ][R/S]                                                                                
STO*1  R/S                                           4        [STO][ * ][ 1 ][R/S]                                                                                
STO*1  R/S                                           4        [STO][ * ][ 1 ][R/S]                                                                                
STO*1  STO/2  R/S                                    7        [STO][ * ][ 1 ][STO][ / ][ 2 ][R/S]        
STO/2  R/S                                           4        [STO][ / ][ 2 ][R/S]                                                                                 
STO/2  R/S                                           4        [STO][ / ][ 2 ][R/S]                                                                                 
1,32  STO 2  R/S                                     7        [ 1 ][ . ][ 3 ][ 2 ][STO][ 1 ][R/S]                                                        
18,59  STO 1  R/S                                    8        [ 1 ][ 8 ][ . ][ 5 ][ 9 ][STO][ 1 ][R/S]                                                
17,63  STO 1  R/S                                    8        [ 1 ][ 7 ][ . ][ 6 ][ 3 ][STO][ 1 ][R/S]                                                
STO*2  R/S                                           4        [STO][ * ][ 2 ][R/S]                                                                                 
STO*2  R/S                                           4        [STO][ * ][ 2 ][R/S]

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 ?
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
Calculator benchmark - jhallen - 08-08-2021, 05:42 AM
RE: Calculator benchmark HP-28S - C.Ret - 08-08-2021, 04:46 PM
RE: Calculator benchmark - C.Ret - 08-08-2021, 07:26 PM
RE: Calculator benchmark - jhallen - 08-08-2021, 08:05 PM
RE: Calculator benchmark - OlidaBel - 08-11-2021, 12:40 PM
RE: Calculator benchmark - C.Ret - 08-08-2021, 08:25 PM
RE: Calculator benchmark - robve - 08-11-2021, 08:15 PM
RE: Calculator benchmark - jhallen - 08-08-2021, 09:57 PM
RE: Calculator benchmark - C.Ret - 08-12-2021, 04:24 PM
RE: Calculator benchmark - robve - 08-12-2021, 09:13 PM
RE: Calculator benchmark - robve - 08-12-2021, 11:37 PM
RE: Calculator benchmark - Claudio L. - 08-09-2021, 08:14 PM
RE: Calculator benchmark - jhallen - 08-11-2021, 04:33 AM
RE: Calculator benchmark - Claudio L. - 08-11-2021, 05:14 PM
RE: Calculator benchmark - OlidaBel - 08-11-2021, 09:00 AM
RE: Calculator benchmark - jhallen - 08-11-2021, 01:16 PM
RE: Calculator benchmark - OlidaBel - 08-11-2021, 01:33 PM
RE: Calculator benchmark - Werner - 08-11-2021, 11:49 AM
RE: Calculator benchmark - jhallen - 08-11-2021, 01:11 PM
RE: Calculator benchmark - DavidM - 08-12-2021, 01:42 AM
RE: Calculator benchmark - robve - 08-13-2021, 02:16 PM
RE: Calculator benchmark - jhallen - 08-20-2021, 03:34 AM
RE: Calculator benchmark - robve - 08-20-2021, 02:49 PM
RE: Calculator benchmark - robve - 08-20-2021, 06:12 PM
RE: Calculator benchmark - jhallen - 08-20-2021, 08:26 PM
RE: Calculator benchmark - robve - 08-13-2021, 09:10 PM
RE: Calculator benchmark - C.Ret - 08-15-2021, 01:13 PM
RE: Calculator benchmark - robve - 08-15-2021, 02:31 PM
RE: Calculator benchmark - robve - 08-15-2021, 04:43 PM
RE: Calculator benchmark - robve - 08-15-2021, 06:30 PM
RE: Calculator benchmark - robve - 08-16-2021, 01:01 AM
RE: Calculator benchmark - EdS2 - 08-16-2021, 06:22 AM
RE: Calculator benchmark - C.Ret - 08-19-2021, 04:37 AM
RE: Calculator benchmark - C.Ret - 08-19-2021 05:21 PM
RE: Calculator benchmark - Werner - 08-20-2021, 02:58 PM
RE: Calculator benchmark - C.Ret - 08-22-2021, 10:29 AM
RE: Calculator benchmark - jhallen - 08-17-2021, 03:56 AM
RE: Calculator benchmark - C.Ret - 08-18-2021, 08:20 PM
RE: Calculator benchmark - jhallen - 08-19-2021, 12:23 AM
RE: Calculator benchmark - jhallen - 08-22-2021, 06:42 PM
RE: Calculator benchmark - robve - 08-23-2021, 10:51 PM
RE: Calculator benchmark - robve - 09-22-2021, 06:14 PM
RE: Calculator benchmark - robve - 09-25-2021, 01:25 AM
RE: Calculator benchmark - robve - 10-02-2021, 10:08 PM



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