Post Reply 
(25C) 1D Rubik's Cube
04-22-2017, 12:06 AM
Post: #2
RE: (25C) 1D Rubik's Cube
(ctd)

This is my first attempt at programming hp 25c (actually it was np 25, but I hope it still applies).

My impression on the experience: I really like the language. int/frac, storage arithmetic, compares of x to y (rather than just to 0) were very useful and allowed to save a lot of steps. But! 49 steps is too damn little. To achieve my goal I had to manage (and downgrade) expectations several times. For example, initially, I wanted to implement different game, but then I realized that I am not even close to be able to fit it in 49 steps, so had to settle for this. Then, originally, I wanted start with initial random permutation (by applying several random moves to 12345678). That also proved to be too much to ask, so now user has to enter initial permutation himself and also check for completion.

There was a nasty surprise: 10^x returns 99999999.60 on 8, 9999999.99 on 7 and 1000000003 on 9, which almost made me retarget the program to HP-33C mode -- there 10^x works as expected. I ended up rounding the result with
Code:

14. .
15. 4
16. +
17. int

and downgraded from 9 digit input (as I originally planned) to 8 digit input, so I do not have to calculate 10^9.
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
(25C) 1D Rubik's Cube - nsg - 04-21-2017, 11:45 PM
RE: (25C) 1D Rubik's Cube - nsg - 04-22-2017 12:06 AM



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