Commit Graph

1154 Commits (98226eec9b8910ec4c3d3998414f8fbe6554515c)

Author SHA1 Message Date
Daniel Ehrenberg 05b76f181f Extra/trees changes 2007-12-27 13:56:03 -05:00
Samuel Tardieu caa2a606c2 Use math.primes in project Euler problems 2007-12-27 16:52:19 +01:00
Samuel Tardieu e17a77f5cd New module math.primes.factors 2007-12-27 16:52:18 +01:00
Samuel Tardieu 694dd297ad New module math.primes 2007-12-27 16:52:16 +01:00
Samuel Tardieu db6dbc5f16 Implement lreduce in lazy-lists 2007-12-27 16:01:28 +01:00
Samuel Tardieu 779f1ba01d Use related-words in lazy-lists documentation 2007-12-27 16:01:27 +01:00
Samuel Tardieu 3662ed8f0b Use s> and >s instead of r> and >r to avoid confusion 2007-12-27 15:17:34 +01:00
Samuel Tardieu 76c76b81ed Simplify lazy-append nil? word
lazy-append tuples are always built using lappend. If list1 is nil, then
list2 is returned, hence nil? on a lazy-append object is always false.
2007-12-27 03:42:19 +01:00
Samuel Tardieu 0bf5c6bf0f Simplify lazy-while and lazy-until constructs 2007-12-27 03:36:38 +01:00
Samuel Tardieu 4eb7aad50b Use math.algebra to solve project Euler problem 134 2007-12-26 23:08:43 +01:00
Samuel Tardieu c4529fb557 Add math.algebra module with some useful words.
- ext-euclidian implements the extended Euclidian algorithm
  - ring-inverse computes an inverse in a Z/nZ ring
  - chinese-remainder solves a multi-constraints modular equation
2007-12-26 23:08:15 +01:00
Samuel Tardieu 9f0fb715ab Factor solution to project Euler problem 134 2007-12-26 21:44:22 +01:00
Samuel Tardieu aaa4b2a62f Do not use Eratosthene sieve if n < 1e6 since we have a static primes list 2007-12-26 20:35:35 +01:00
Aaron Schaefer 0dfddab0f6 Remove unnecessarily complicated PE022 solution 2007-12-26 09:06:52 -05:00
Aaron Schaefer 994fe7c142 Solution to Project Euler problem 22 2007-12-26 02:25:10 -05:00
Aaron Schaefer 2ab01a8f25 Fix amicable-pair? false positives 2007-12-25 15:08:37 -05:00
Daniel Ehrenberg d5baea215d Splay tree fixes 2007-12-25 02:28:55 -05:00
Aaron Schaefer f2cf2bc158 Solution to Project Euler problem 21 2007-12-25 00:13:01 -05:00
Aaron Schaefer 5b87577f91 Solution for Project Euler problem 20 2007-12-24 21:54:39 -05:00
Daniel Ehrenberg 2bbf9f3297 Merge branch 'for-slava' of git://www.rfc1149.net/factor 2007-12-24 21:07:50 -05:00
Daniel Ehrenberg 18f85fbaf3 Merge branch 'master' into trees 2007-12-24 21:04:59 -05:00
Daniel Ehrenberg 5917e58c86 Fixed XML bug which made everything stop compiling 2007-12-24 20:48:29 -05:00
Aaron Schaefer 319d96384e Solution to Project Euler problem 19 2007-12-24 16:29:04 -05:00
Daniel Ehrenberg 85a5beed74 Adding sequences.deep 2007-12-24 13:20:52 -05:00
Aaron Schaefer 2aa9dc9dde Use Letter? instead of alpha? on euler017a 2007-12-24 13:07:46 -05:00
Aaron Schaefer 207e752464 Typo on Project Euler USING math.ranges 2007-12-24 13:01:11 -05:00
Aaron Schaefer 026a646b78 Merge /Applications/factor 2007-12-24 12:48:05 -05:00
Aaron Schaefer 37f42bb2fc Alternate solution for Project Euler problem 17
Used the new vocab math.text and a string buffer.
2007-12-24 04:36:40 -05:00
Aaron Schaefer 50c3b5de14 Solutions to Project Euler problems 18 and 67
Added appropriate words to common.factor and got rid of number>digits for the time being.
2007-12-24 04:32:19 -05:00
Daniel Ehrenberg d830ed9314 extra/tuple-syntax--named tuple slot literals 2007-12-24 01:58:13 -05:00
Daniel Ehrenberg ee8932b888 Merge git://projects.elasticdog.com/git/factor 2007-12-24 00:37:43 -05:00
Aaron Schaefer 5fd3d34302 New math.text vocab converts numbers to English 2007-12-24 00:06:53 -05:00
Daniel Ehrenberg 0e13e2e92c Fixing XML bug 2007-12-23 23:21:44 -05:00
Aaron Schaefer fc403b373b Declared sigma and count to be inline 2007-12-23 22:20:57 -05:00
Daniel Ehrenberg 0de2e117f5 Merge commit 'slava/master' 2007-12-23 16:09:21 -05:00
Daniel Ehrenberg 998213bb4b Removed extra/xml/literal, which was added by accident 2007-12-23 14:58:56 -05:00
Daniel Ehrenberg beaa4601ed XML combinator refactoring 2007-12-23 14:57:39 -05:00
Samuel Tardieu 13d5ce70b0 Factor solution to project Euler problem 19 2007-12-23 13:45:46 +01:00
Samuel Tardieu 8d268ba858 Factor solution to project Euler problem 67 2007-12-22 01:45:51 +01:00
Samuel Tardieu 621790aa7f Factor solution to project Euler problem 18 2007-12-22 01:45:50 +01:00
Samuel Tardieu f0903db414 Remove obsolete performance comment on project Euler problem 10 2007-12-22 01:45:46 +01:00
Samuel Tardieu a66f7672dc Update project-euler.010 timings 2007-12-22 00:29:12 +01:00
Samuel Tardieu fd8253c262 Sieve of eratosthene optimizations 2007-12-22 00:28:46 +01:00
Samuel Tardieu 8e87d56e24 Factor solution to project Euler problem 17 2007-12-21 17:43:26 +01:00
Samuel Tardieu 9809e573a9 Much faster solution to projet-euler.010 by using lazy lists 2007-12-21 13:53:00 +01:00
Samuel Tardieu 074ef1e107 New math.erato library: sieve of Eratosthene 2007-12-21 13:53:00 +01:00
Samuel Tardieu d5cd2fd66b Add lazy-while and lazy-until to lazy-lists 2007-12-21 13:33:57 +01:00
Samuel Tardieu 858237c0f8 Reimplement leach so that stack is clean when executing the quotation
The previous implementation let garbage on the stack (such as the lazy list
cdr) before executing the quotation. This prevents easy implementation of
reduce-like words using leach.
2007-12-21 13:33:56 +01:00
Doug Coleman ded88583ef fixed heap-push-all 2007-12-20 00:06:36 -06:00
Slava Pestov f2b4a04a44 Merge commit 'doublec/master' 2007-12-20 00:43:16 -05:00