RPL second impressions (HP 28)
|
06-29-2018, 01:08 PM
Post: #17
|
|||
|
|||
RE: RPL second impressions (HP 28)
(06-28-2018 09:43 PM)Thomas Klemm Wrote: But similar functions exist e.g. on the WP-34S: Here is a simple PRIME? implementation for the HP-28S: « DUP 2 / FP IF NOT NOT THEN DUP √ 1 DO 2 + 3 DUPN SWAP OVER UNTIL < ROT ROT MOD NOT OR END SWAP DROP MOD NOT END NOT » It will work for n > 1 ( 1 is NOT prime). That's one of my first RPL programs (HP-28S, back in 1987), so it can surely be optimized a bit. Gerson. |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)