Post Reply 
(11C) Random Move
01-05-2019, 03:58 AM
Post: #5
RE: (11C) Random Move
(01-05-2019 03:43 AM)Thomas Klemm Wrote:  
(01-04-2019 11:16 PM)rprosperi Wrote:  With no context about this question, I'd guess this technique was used in order to have 10 stored in LASTX (for some later use)

You could still use:
Code:
1
0
10^x

Even if you'd rely on the copy of stack register T there's no need to enter the same number twice.
The following steps are enough:
Code:
1
0
ENTER
y^x

Kind regards
Thomas

Fair enough, I was just guessing why he did that, but these examples show it still could have been easily improved even if that was a goal. Though this code sequence does not really apply, in many programs I've written, I've left non-optimum (either a bit longer or slower) code as-is, if it made the flow or intention more clear. As you and Dieter prove here almost daily, nearly any code sequence can be improved, but sometimes a straightforward program that has been extensively optimized ceases to be recognizable (at least for those of us that don't document these little calculator program explorations).

That having been said, please do continue to point out these improvements, as I try to learn a little almost every time. :-)

--Bob Prosperi
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
(11C) Random Move - Gamo - 01-03-2019, 08:55 AM
RE: (11C) Random Move - Dieter - 01-04-2019, 08:28 PM
RE: (11C) Random Move - rprosperi - 01-04-2019, 11:16 PM
RE: (11C) Random Move - Thomas Klemm - 01-05-2019, 03:43 AM
RE: (11C) Random Move - rprosperi - 01-05-2019 03:58 AM
RE: (11C) Random Move - Gamo - 01-06-2019, 04:25 AM
RE: (11C) Random Move - Dieter - 01-06-2019, 08:37 AM
RE: (11C) Random Move - Thomas Klemm - 01-06-2019, 06:55 AM
RE: (11C) Random Move - Thomas Klemm - 01-06-2019, 07:51 PM



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