The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 795 - File: showthread.php PHP 7.4.33 (FreeBSD)
File Line Function
/showthread.php 795 errorHandler->error





Post Reply 
(HP48) Beginner questions about RPL
10-23-2024, 05:16 PM
Post: #1
(HP48) Beginner questions about RPL
Hello
I have been using HP calculators (17b, 19b, 20s, 48sx, 48g) in the office for some time for general calculations. Especially the HP48 and I love the multi-line display and use the stack extensively.
I am mainly just a software user and know little to nothing about programming.
I would now like to write a few very small programs in RPL and have had a code created by Chatgpt regarding the Collatz function:
Code:
<<
->n 
{ } ->L

WHILE 
DUP 1 > 
REPEAT
DUP ->L
DUP 2 MOD 0 = 
IF
2 / 
ELSE
3 * 1 +
END
END
->L
>>
Unfortunately, entering the code fails at the "1" (line 6).
Does anyone have time and can help me?
I am not interested in optimal code, but in learning to understand the code as a beginner.
Thank you very much

8years elementary school, 2y business school; no bachelor/master, etc.;
but always interested in simple mathematics & calculators
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
(HP48) Beginner questions about RPL - Pälzer - 10-23-2024 05:16 PM



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