Yes, that was me... Checking the history of the page, I see that I initially wrote a couple J implementations back in 2010. Then I added a bunch of exposition in 2014. Then in 2016 another rosetta user marked the entry as incorrect -- he felt that using arithmetic was not in the spirit of the iterative sieve algorithm. I made some minor changes at that point.
Anyways, ... given the belief that iteration and arithmetic are conflicting operations (I do not share this belief), I imagine it might make sense to discard the entire entry and redo it from scratch. First with a blindly literal implementation of the algorithm then optionally with paraphrases and/or other exposition. Meanwhile, if you're comfortable with your changes -- and eliminating stupid error cases is a good thing -- I can't imagine that it's in any worse shape than it was before. -- Raul On Wed, Jul 6, 2022 at 7:32 AM Martin Kreuzer <[email protected]> wrote: > > Dear all - > > Since I do not know for sure the author of this entry (I've got a > slight hunch) I'm using this channel to make known that I updated the > last given version of the Sieve > > https://www.rosettacode.org/wiki/Sieve_of_Eratosthenes#J > Another variation on this theme would be: ... (at the very bottom of > the J entry) > > as the previous version of that verb gave erroneous results like > > sieve 4 > 2 3 4 > sieve 5 > |index error: sieve > | seq=.0 inds}seq > > May I ask to check my submission and (hopefully) send a short confirmation. > > Thanks. > > -M > > ---------------------------------------------------------------------- > For information about J forums see http://www.jsoftware.com/forums.htm ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
