Post Reply 
Little explorations with HP calculators (no Prime)
01-13-2019, 05:05 PM
Post: #346
RE: Little explorations with HP calculators (no Prime)
I didn't attempt to apply any symbolic analysis first, as my limited "toolbox" in that regard didn't offer any obvious hints.

Seeing the problem description did, though. So I came up with the following code to produce the numeric result:
Code:











\<<
   WHILE
      DUP SIZE 1. >
   REPEAT
      2 { * } DOSUBS
   END
   EVAL
\>>

The code assumes the initial list is already on the stack before execution. Although I didn't look at the other solutions before putting this together, it does bear a striking resemblance to Thomas' approach.
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Little explorations with HP calculators (no Prime) - DavidM - 01-13-2019 05:05 PM



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