(EL-5030) Prime Factors
|
04-22-2022, 09:37 PM
Post: #8
|
|||
|
|||
RE: (EL-5030) Prime Factors
(04-22-2022 04:17 PM)Didier Lachieze Wrote: Nice program! I've entered it on my EL-5030 but it returns 0 for any input. Ok, I’ve found my mistake, I had entered a ◣ at the end of the subroutine, so the program just stopped there. After removing it it works correctly, I get the different factors until it returns -1. For 15 I get 3, 5 and -1. (04-22-2022 08:07 PM)C.Ret Wrote: On the SHARP, you may try the following to short your #1 Subroutine: I found same AER listings using multiple embedded store instructions, but I don't know if it's possible on the EL 5030 ? Yes it works on the EL-5030 (without the spaces). (04-22-2022 06:48 PM)C.Ret Wrote: Then, we may consider this close related but shorter and faster AER code using only 2-loops and 2-conditionals : This one works also with a few changes: - Replacing Q=X/F by X/F=>Q , I=1 by 1=>I and F=0 by 0=>F - Initializing individually each element of A[] For 15 I get 3 and -5 |
|||
« Next Oldest | Next Newest »
|
Messages In This Thread |
(EL-5030) Prime Factors - Dave Britten - 04-21-2022, 03:01 PM
RE: (EL-5030) Prime Factors - Jlouis - 04-22-2022, 02:02 AM
RE: (EL-5030) Prime Factors - Didier Lachieze - 04-22-2022, 04:17 PM
RE: (EL-5030) Prime Factors - Dave Britten - 04-22-2022, 04:27 PM
RE: (EL-5030) Prime Factors - Didier Lachieze - 04-22-2022 09:37 PM
RE: (EL-5030) Prime Factors - C.Ret - 04-23-2022, 04:27 AM
RE: (EL-5030) Prime Factors - Didier Lachieze - 04-23-2022, 08:31 AM
RE: (EL-5030) Prime Factors - C.Ret - 04-22-2022, 06:48 PM
RE: (EL-5030) Prime Factors - Dave Britten - 04-22-2022, 07:02 PM
RE: (EL-5030) Prime Factors - C.Ret - 04-22-2022, 08:07 PM
RE: (EL-5030) Prime Factors - C.Ret - 04-23-2022, 05:07 PM
|
User(s) browsing this thread: 1 Guest(s)