(HP48) Beginner questions about RPL
|
10-23-2024, 05:28 PM
Post: #2
|
|||
|
|||
RE: (HP48) Beginner questions about RPL
This appears to be a variation of the following PRL program created by Joe Horn.
\<< 0 SWAP @ Put an empty loop counter in level 2. WHILE DUP 1 > @ Exit as soon as it gets to 1. REPEAT IF DUP 2 MOD @ is it odd? THEN 3 * 1 + @ yes? then multiply by 3 and add 1; ELSE 2 / @ no? then divide by 2. END SWAP 1 + SWAP @ Increment the loop counter. END DROP @ Lose the "1" and stop. \>> See the following Hailstone Path download at hpcalc.org. Joe has a very nice write-up that discusses this subject. https://www.hpcalc.org/details/6808 |
|||
« Next Oldest | Next Newest »
|
Messages In This Thread |
(HP48) Beginner questions about RPL - Pälzer - 10-23-2024, 05:16 PM
RE: (HP48) Beginner questions about RPL - Steve Simpkin - 10-23-2024 05:28 PM
RE: (HP48) Beginner questions about RPL - Pälzer - 10-23-2024, 05:43 PM
RE: (HP48) Beginner questions about RPL - Steve Simpkin - 10-23-2024, 06:04 PM
RE: (HP48) Beginner questions about RPL - Gil - 10-23-2024, 09:05 PM
RE: (HP48) Beginner questions about RPL - Pälzer - 10-24-2024, 08:04 AM
RE: (HP48) Beginner questions about RPL - Thomas Klemm - 10-24-2024, 08:36 AM
RE: (HP48) Beginner questions about RPL - Gil - 10-24-2024, 10:14 AM
|
User(s) browsing this thread: 1 Guest(s)