Prime number finder HP11C?
|
06-15-2016, 10:59 PM
(This post was last modified: 06-16-2016 02:19 AM by Valentin Albillo.)
Post: #5
|
|||
|
|||
RE: Prime number finder HP11C?
.
Hi again, jbhp55: (06-14-2016 06:33 AM)jbhp55 Wrote: Thank you, Valentin, for your reply. You're welcome. Quote:The conditions are: start with odd number in x, start program (say A). I assume that by "start program (say A)" you mean that you start the program either by pressing the [A] key in USER mode or else pressing [GSB][A] in any mode (though you actually use LBL C in your program, not LBL A). Quote:The program steps count. A final RTN may be omitted. I assume you're interested in the shortest program possible which meets your specified requirements, not the fastest one. Quote:My program: Subject to the aforementioned assumptions and requirements, a cursory glance at your code reveals that there's a fairly trivial technique which saves 2 steps, i.e. the length-optimized program is 22 steps long. I'll refrain from spoiling the fun by posting it here right now, to give you the chance to re-examine your code and find it out yourself, but if you'd rather see it immediately just ask and I'll post it. Best regards. V. . All My Articles & other Materials here: Valentin Albillo's HP Collection |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 2 Guest(s)