The doc says that n should be an odd number. For example, "2011 2011 sieve marked-prime?" works
But maybe the word should be changed to work with even number as well. Also, there's a typo in the documentation. Here's a patch that fixes it: ---------------------------- diff --git a/basis/math/primes/erato/erato-docs.factor b/basis/math/primes/erato/erato-docs.factor index 1e32818..9279f8f 100644 --- a/basis/math/primes/erato/erato-docs.factor +++ b/basis/math/primes/erato/erato-docs.factor @@ -3,7 +3,7 @@ IN: math.primes.erato HELP: sieve { $values { "n" "the greatest odd number to consider" } { "arr" "a bit array" } } -{ $description "Apply Eratostene sieve up to " { $snippet "n" } ". Primality can then be tested using " { $link sieve } "." } ; +{ $description "Apply Eratostene sieve up to " { $snippet "n" } ". Primality can then be tested using " { $link marked-prime? } "." } ; HELP: marked-prime? { $values { "n" "an integer" } { "arr" "a byte array returned by " { $link sieve } } { "?" "a boolean" } } ---------------------------- Jon On Thu, Oct 21, 2010 at 12:50 PM, Rupert Swarbrick <rswarbr...@gmail.com> wrote: > I bumped into this today and I've attached a patch with test-case. > > Cheers, > > Rupert > > > ------------------------------------------------------------------------------ > Nokia and AT&T present the 2010 Calling All Innovators-North America contest > Create new apps & games for the Nokia N8 for consumers in U.S. and Canada > $10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing > Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store > http://p.sf.net/sfu/nokia-dev2dev > _______________________________________________ > Factor-talk mailing list > Factor-talk@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/factor-talk > > ------------------------------------------------------------------------------ Nokia and AT&T present the 2010 Calling All Innovators-North America contest Create new apps & games for the Nokia N8 for consumers in U.S. and Canada $10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store http://p.sf.net/sfu/nokia-dev2dev _______________________________________________ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk