User talk:Retroburrowers: Difference between revisions

m
Sign it...
m (Sign it...)
m (Sign it...)
Line 109:
In your recent contribution to the Sieve of Eratosthenes Task for QLSuperBasic/Sundaram Sieve:
http://rosettacode.org/wiki/Sieve_of_Eratosthenes#Sieve_of_Sundaram, with respect, your statement - "Thus, Sundaram's is what Eratosthenes' Sieve becomes upon applying all optimisations incorporated into the other entries for QL SuperBASIC." is incorrect. Sundaram uses **all odd numbers** as the basis for culling composite numbers whereas the SoE optimized to odds-only uses only **odd primes** for this purpose; this changes the computational complexity to O(n^(1/2)) from O(n log log n), a considerable difference. While one can use some recursion to cull by previously sieved primes, that result becomes a full SoE and can no longer be called the Sieve of Sundaram, as "all odd numbers" is it's exact characteristic. One can recompose your Sundaram code to make this more obvious.
: Sorry, forgot to sign - [[User:GordonBGood|GordonBGood]] ([[User talk:GordonBGood|talk]]) 20:30, 22 May 2021 (UTC)
----
474

edits