(55) Programming Challenge
|
11-27-2024, 10:31 AM
(This post was last modified: 11-27-2024 10:36 AM by Gamo.)
Post: #1
|
|||
|
|||
(55) Programming Challenge
To me I think the HP-55 is the most difficult calculator to program because this
particular model doesn't have FRAC, INT, RAN#, ABS and most key stroke takes extra line steps that make program fill up the maximum of 49 programming steps easily most of time. I have try to program the "Roll Two Dice" in random with this calculator and I have very hard time to code it. Here is my best try so far. Anyone who got this calculator or emulator if you wish please try this out if any successful version. ------------------------------------------------------------------------------------------- Program: Roll Two Dice in Random R0 - Seed R3 - 997 Example: Seed is 0.01031974 [R/S] 4 [X<>Y] 3 first roll 4 and 3 [R/S] 6 [X<>Y] 2 second roll 6 and 2 [R/S] 4 [X<>] 3 ...... [5,2] [4,3] [6,1] [4,3] [3,4] [5,2] [4,4] Remark: This program is not perfect just to play around that's all. ------------------------------------------------------------------------------------------ Program: Quote:01 RCL Gamo 11/2024 |
|||
11-27-2024, 04:33 PM
(This post was last modified: 11-27-2024 05:09 PM by C.Ret.)
Post: #2
|
|||
|
|||
RE: (55) Programming Challenge
(11-27-2024 10:31 AM)Gamo Wrote: I have try to program the "Roll Two Dice" in random with this calculator and I have very hard time to code it. GAMO, I like your posts, they are always a little challenge. You have the gift of having to program deficient machines. One day, you will find an HP-15 CE that will seem to you very easy to program in comparison. In the meantime, I can only advise you to simplify the problem. Instead of a program simulating the roll of two dice, why not use twice a program that simulates the roll of a single die? I am not an HP-55 specialist, but this calculator seems well done to me, even if its programming does not have a set of features as rich as for other models. My idea is to use it like this: Initialization: Put the generating root in the register R0: 0.76878 STO 0 Put the number of face in the register R1: 6 STO 1 The same code can be used for all dice having an integer number of faces. Presse BST to reset the program counter. Usage: To perform a die roll, press the R/S key, note the result and re-roll the die as many times as necessary by pressing R/S. Code: 01. RCL 0 // pseudo random seed 03.f Π 05. + 06. 5 07. y^x // \( x_{n+1}=\lfloor \left ( x_n+\pi \right )^{5} \rfloor \) 08. ENTER↑ 09. ENTER↑ 10. EEX 9 12. + 13.f LASTx 15. - 16. - // Fractional part 17.g x² 19.f √x // Absolute value 21. STO 0 23. RCL 1 // Nb of faces 25. × 26. EEX 9 28. + 29.f LASTx 31. - // Integer part 32. 1 33. + 34. GTO-00 I hope this is acceptable, my code does not use the same pseudo-random generator in order to save steps and sign testing. Sincères salutations. C.Ret |
|||
11-27-2024, 07:51 PM
Post: #3
|
|||
|
|||
RE: (55) Programming Challenge
(11-27-2024 10:31 AM)Gamo Wrote: To me I think the HP-55 is the most difficult calculator to program because this particular model doesn't have FRAC, INT, RAN#, ABS and most key stroke takes extra line steps that make program fill up the maximum of 49 programming steps easily most of time. Yes, the HP-55 was a great product for a brief time in 1975. It allowed you to have a programmable HP calculator for about 1/2 the price of a HP-65. Of course 7 months later the HP-25 came out at half the price of the HP-55. While the HP-25 lacked Linear Regression, Factorial, a timer, metric/english conversions and had 12 fewer memory locations, it was more compact, had ENG notation, storage arithmetic, FRAC, INT, ABS, PAUSE, more tests and most importantly, fully merged program steps. At $195 it probably greatly reduced the sales of the HP-55. The price of the HP-55 was dropped to $335 about 2 months later. https://www.hpmuseum.org/cgi-bin/compare...ne&diff=ON |
|||
11-27-2024, 08:02 PM
(This post was last modified: 11-27-2024 08:03 PM by C.Ret.)
Post: #4
|
|||
|
|||
RE: (55) Programming Challenge
I never use a HP-55 calculator. Are the unit conversions programmable? (I'm trying to find another way to generate pseudo-random numbers).
I also notice an error in the comparison between HP-55 and H-25, both have "line number addressing". Or maybe I don't understand what it is? |
|||
11-27-2024, 09:08 PM
Post: #5
|
|||
|
|||
RE: (55) Programming Challenge
(11-27-2024 08:02 PM)C.Ret Wrote: I never use a HP-55 calculator. Are the unit conversions programmable? (I'm trying to find another way to generate pseudo-random numbers). Yes, the unit conversions are programmable (2 steps each). The HP-55 and HP-25 both use line number addressing only (no labels). There appears to be a typo in the model comparison table. |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)