In addition to the bit-arrays fix, I made some changes to math.primes
and related packages:
- "math.primes" now uses an Eratosthene sieve rather than a built-in
list; computing a bitmap for all odd numbers between 3 and
4,999,999 takes almost the same time and space as parsing the list
of all primes up to one million, and gives us easy access to about
five times more primes.
- The unused and bloated "math.erato" has been removed; the only
functionality it offered is present in "math.primes".
- The "primes-under-million" list located in "math.primes.list" has
been kept, but not uses the regular "primes-upto" word rather than
an hardcoded list. We may want to remove it as it is not very
useful.
- The "010" problem in project Euler is now very fast, so I updated
the timing information and removed a now moot comment.
- Some style fixes.
The following changes since commit f5dc0884d77cab25cec563a1fa4c702c9d451e07:
Jeff Bigot (1):
modify inclusions in file-chooser
are available in the git repository at:
git://git.rfc1149.net/factor.git for-slava
Samuel Tardieu (9):
Properly set bits in large bit arrays
Do not remove first primes only to prepend them afterwards
Use existing recursion tools rather than explicit one
Mark parts of math.miller-rabin as private
Add Eratosthene sieve as math.primes.erato
Use math.primes.erato instead of a list of first prime numbers
Change timing info on project-euler.010
Use regular primality test to build primes list
Remove unused and redundant math.erato
basis/bit-arrays/bit-arrays-tests.factor | 2 +
basis/bit-arrays/bit-arrays.factor | 2 +-
basis/math/miller-rabin/miller-rabin.factor | 12 +-
extra/math/erato/erato-docs.factor | 6 -
extra/math/erato/erato-tests.factor | 6 -
extra/math/erato/erato.factor | 43 -
extra/math/primes/erato/erato-docs.factor | 12 +
extra/math/primes/erato/erato-tests.factor | 3 +
extra/math/primes/erato/erato.factor | 23 +
extra/math/primes/list/list.factor | 6421 +--------------------------
extra/math/primes/primes-docs.factor | 2 +-
extra/math/primes/primes-tests.factor | 4 +
extra/math/primes/primes.factor | 46 +-
extra/project-euler/010/010.factor | 7 +-
14 files changed, 79 insertions(+), 6510 deletions(-)
delete mode 100644 extra/math/erato/erato-docs.factor
delete mode 100644 extra/math/erato/erato-tests.factor
delete mode 100644 extra/math/erato/erato.factor
create mode 100644 extra/math/primes/erato/erato-docs.factor
create mode 100644 extra/math/primes/erato/erato-tests.factor
create mode 100644 extra/math/primes/erato/erato.factor
--
Samuel Tardieu -- [email protected] -- http://www.rfc1149.net/
------------------------------------------------------------------------------
_______________________________________________
Factor-talk mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/factor-talk