Programming puzzle: Longest list of regular numbers?
|
04-19-2017, 03:09 PM
(This post was last modified: 04-19-2017 03:27 PM by Claudio L..)
Post: #29
|
|||
|
|||
RE: Programming puzzle: Longest list of regular numbers?
(04-18-2017 10:36 PM)Claudio L. Wrote:(04-18-2017 10:09 PM)Claudio L. Wrote: 14999 ==> newRPL: 94.8 seconds, the result is 2305843009213693952 = 2^61 Fixed! There was a bug in newRPL's == operator which was fixed. For those who want to try Han's code, I uploaded a ROM with the fix (to the usual download location). It also implements MIN and MAX, which to my surprise were not yet implemented (it was an oversight, they were listed under the wrong category in the command database). I've attached here Han's code with the proper Unicode characters. The actual sequence to get it in the calc is: put the text on the SD card (hanprog.txt), then do (on the stack): Code:
Now the corrected benchmark results: 14999 --> 113.57 seconds, result is 1.236950581248E20 The slowdown versus the previous report is due to the change from 64-bit integers to variable precision reals after iteration 11563. The bug I fixed never let the result go over 2^63 hence computations were faster. I'll update the original post with the right timings. |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 2 Guest(s)