(HP-65) Prime factor finder
|
10-26-2014, 07:16 PM
(This post was last modified: 11-15-2019 06:02 PM by Don Shepherd.)
Post: #1
|
|||
|
|||
(HP-65) Prime factor finder
This program finds the prime factors of an integer on the HP-65 calculator. It is based on Dave Britten's modification to an original HP-67 program, and excludes multiples of 2, 3, and 5 from the trial factor pool.
After loading the program (which is 79 steps in length and uses registers 1, 2, and 3), enter the number to factor and press C to see the first factor. Then press R/S to see each additional factor. 0 indicates done. Thanks to Dave Britten for making me aware of this very elegant algorithm. Note: code modified on 1/12/2017 to remove unnecessary division, saved 2 bytes. Note: code modified on 1/26/2017 to remove two unnecessary LN's, saves 7 seconds execution time to find that 127,031 is prime Code:
|
|||
« Next Oldest | Next Newest »
|
Messages In This Thread |
(HP-65) Prime factor finder - Don Shepherd - 10-26-2014 07:16 PM
RE: HP-65 prime factor finder - Dave Britten - 11-06-2014, 08:04 PM
RE: HP-65 prime factor finder - Don Shepherd - 12-05-2014, 03:21 AM
RE: HP-65 prime factor finder - Dave Britten - 12-05-2014, 12:27 PM
RE: HP-65 prime factor finder - Don Shepherd - 12-05-2014, 03:48 PM
RE: HP-65 prime factor finder - Gene - 12-05-2014, 03:43 AM
|
User(s) browsing this thread: 1 Guest(s)