(29C) Prime numbers up to 10'000
|
09-04-2018, 07:31 PM
(This post was last modified: 09-04-2018 08:32 PM by Albert Chan.)
Post: #12
|
|||
|
|||
RE: (29C) Prime numbers up to 10'000
(09-04-2018 06:53 PM)Thomas Klemm Wrote: A guy called C. Ret did an awesome work ... I had a similar (*) code in Lua to build list of primes. Instead of using min-heap, it uses Lua build-in hash table. https://github.com/achan001/PrimePi/blob.../prime.lua (*) main difference is how sequence overlap is treated. Above sequence for 7 and 11 overlap at 231, 385, 539, 693, ... C. Ret code carried the prime along, ignoring the overlap. Lua code skip over the overlap, with the sequence carried the right step. Both approaches are equivalent. |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 2 Guest(s)