Re: HHC / HP Museum Programming Contest for RPN and RPL machines Message #16 Posted by Mark Storkamp on 21 Sept 2013, 9:20 p.m., in response to message #1 by gene wright
RPN, HP-41CX, 19 steps
0 R/S --> 0 (0.39s)
0.7 R/S --> 0.875 (0.81s)
0.75 R/S --> 0.953125 (1.21s)
0.777777777 R/S --> 0.999999993 (4.09s)
1 R/S --> 1 (0.40s)
Timing done with the internal stopwatch. (I didn't count those lines in the total number of steps)
I'm now down to 5 steps, and the timing is 0.66s, 0.67s, 0.67s, 0.75s, and 0.70s
Now that rule number 4 which stated "Any already existing functionality in the machine is ok" has been changed, I'm back to 19 steps. I'll wait for the comprehensive list of allowed functions before I try and improve on what I've got. Is storage register arithmetic allowed on the stack? That might improve things, but not every calculator can do that.
Edited: 22 Sept 2013, 7:22 a.m. after one or more responses were posted
|