RPL exercise  Last Digits of Primes (HP 49G, G+, 50g)

06012019, 09:11 PM
Post: #15




RE: RPL exercise  Last Digits of Primes (HP 49G, G+, 50g)
(06012019 04:08 PM)DavidM Wrote: MOD with approximate numbers is generally faster than MOD with exact integers on the 50g, which is the main reason I used the old I→R 10. MOD construct in my original (and subsequent) programs. That did the trick, thanks! By using 10. MOD R→I the running time fell down to 147.1 seconds (previously 1677.1 seconds!). (06012019 04:08 PM)DavidM Wrote: Carsen's use of the case statement inspired me to take another look at the performance using that type of construct. I use case structures a lot in SysRPL, but tend not to in UserRPL because they always feel verbose in that environment for some reason. I made another stackbased attempt that uses a case structure for determining which counter to update: Wow! On my smartphone I get { 24968. 25008. 25015. 25009. } in 86 seconds and { 249934. 250109. 250017. 249940. } in about two and a half hours! Thanks again! 

« Next Oldest  Next Newest »

User(s) browsing this thread: 1 Guest(s)