[VA] SRC #012c - Then and Now: Sum
|
11-28-2022, 06:19 PM
Post: #2
|
|||
|
|||
RE: [VA] SRC #012c - Then and Now: Sum
Hi everyone,
This is my very first post on this forum. I've been lurking around for years, at least 12 if I take into account the old forum. This "Sum" problem has seemed not too mathematical to me. It inspired me and finally decided me to register. So, last night I wrote an RPL program on one of my two hp-50g. Then I checked to see if it worked on my trusty hp-28s - released in the 1980s, the 28 series is the only RPL calculator that follows the rules. To my surprise, the program did not work: I didn't know - or had forgotten - that arithmetic operations on local variables were not yet implemented on these RPL calculators. After the few necessary corrections, the size of the program increased from 154 to 161 bytes. The program uses two local variables. During the day, while rethinking my program, I realized that some instructions were unnecessary and the final size of the program is therefore reduced to 148.5 bytes. Here are some results to check if my program is OK (?): f(0) = 0 f(1) = 1 f(2) = 2 f(3) = 6 … which seem obvious at this point! f(11) = 264 f(12) = 288 f(100 = 4200 … and f(10) = 240, of course! Bruno Sanyo CZ-0124 ⋅ TI-57 ⋅ HP-15C ⋅ Canon X-07 + XP-140 Monitor Card ⋅ HP-41CX ⋅ HP-28S ⋅ HP-50G ⋅ HP-50G |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)