RPL exercise - Last Digits of Primes (HP 49G, G+, 50g)
|
06-01-2019, 05:44 AM
Post: #6
|
|||
|
|||
RE: RPL exercise - Last Digits of Primes (HP 49G, G+, 50g)
(06-01-2019 05:02 AM)DavidM Wrote:(06-01-2019 04:43 AM)Gerson W. Barbosa Wrote: Yes, 155.4 seconds (base 10), or 155.4 ms per prime, but that’s not linear. For 100 primes it takes 7.38 seconds or about 13.5 primes per second. Anyway, that’s an improvement over my first attempt. Hopefully there’s still a better way. Very nice! 53.3 seconds even using exact numbers. '155.4/41' = 3.79, this ratio used to be about 10 (that is, my programs used to take 10 times as much, compared to the optimal ones by Valentin and others). I’ve used a somewhat unorthodox method which surely doesn’t obey the “KISS” rule. Also, my program is about 50% longer. |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)