Post Reply 
(33s) OEIS A68637: Maximum of Input & Reversal
08-11-2022, 02:56 PM (This post was last modified: 08-11-2022 02:59 PM by Didier Lachieze.)
Post: #5
RE: (33s) OEIS A68637: Maximum of Input & Reversal
(08-11-2022 01:04 PM)Gerald H Wrote:  Thank you, Didier, a lesson in economy!

You already had half of the solution Smile

Here the goal was to get the max of X and A in the minimum steps, you already had RCL- A and x>0?, after that the flags management was adding a lot of complexity. I removed all these flags instructions, looked at what was remaining and realized that we had R-A in X and by adding it to the register A after the x>0? we would get R in this register if R was bigger than A or A if it was lower, then x<> A to not disturb the stack and we have the max of X and A in 4 steps.
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: (33s) OEIS A68637: Maximum of Input & Reversal - Didier Lachieze - 08-11-2022 02:56 PM



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