Commit Graph

1089 Commits (3db98706691d38f0d1c5d099ed990ae0c6eaa6ee)

Author SHA1 Message Date
Jon Harper bf852cea6a add basis.math.functions.integer-logs: exact integer logarithms 2017-06-08 11:22:40 -07:00
Jon Harper 34f36a529e math.functions, speed up truncate for floats 2017-06-08 11:22:40 -07:00
Jon Harper c74cfe6c54 math.functions: fix truncate and round to output -0.0 for negative floats near 0 2017-06-08 11:22:40 -07:00
Jon Harper 271c7d9519 math.functions, fix round for ratios between -1/2 and -1
it was outputting 1 instead of -1
2017-06-08 11:22:40 -07:00
Alexander Iljin 2ffa446f5b *-docs: replace double spaces with single spaces
Code examples and other places where multiple spaces were used to align
text were left intact.
2017-06-05 13:16:07 -07:00
Doug Coleman 195630f637 iota: Fix second iota -> <iota> in line several times. 2017-06-02 15:41:51 -05:00
Doug Coleman e189954ecc core: Rename iota to <iota> so we can have TUPLE: iota ... ; instead of TUPLE: iota-tuple ... ; 2017-06-02 11:57:05 -05:00
Doug Coleman 7c7bb93c55 factor: Rename GENERIC# to GENERIC#:.
Fixes #1670.
2017-06-01 13:58:58 -05:00
Alexander Iljin a6caeb6e80 math.functions-docs: update description of e^ 2017-04-07 19:01:33 +03:00
Alexander Iljin c6208e4677 math.functions[-docs]: rename the output parameters of the power functions 2017-04-07 19:01:24 +03:00
John Benediktsson 119ba84998 math.primes.safe: this looks nicer. 2017-02-08 11:32:34 -08:00
John Benediktsson b5dd40cc53 math.primes.factors: support command-line args like factor(1). 2017-02-08 11:14:24 -08:00
John Benediktsson 9d2e62f8e1 math.primes.safe: simplify. 2017-02-08 11:14:10 -08:00
John Benediktsson f4ccfa0f71 sets: moving unique/conjoin/conjoin-at to compiler.utilities. 2017-02-07 18:54:24 -08:00
John Benediktsson 0f9836e73c math.statistics: fix docs for harmonic-mean.
(needs to match prettyprint)
2017-01-20 08:20:41 -08:00
Björn Lindqvist 0701902122 math.statistics: fix calculation of the harmonic mean 2017-01-15 21:27:55 +01:00
John Benediktsson 59ce436dab math.combinatorics: cleaner next-permutation. 2017-01-02 09:34:15 -08:00
Alexander Iljin e9f6a56c53 math.statistics-docs: make cum-product example less ambiguous
In the previous version of the example it was not clear whether the result
always starts with 1 (as is the case with cum-product1) or with the first
item of the input sequence.
2017-01-02 09:33:15 -08:00
John Benediktsson 60919f8a89 math.statistics: change minmax to not look at first element twice. 2016-12-28 13:39:52 -08:00
John Benediktsson b141e0d2fb assocs: moving collect-by from math.statistics. 2016-12-28 12:56:19 -08:00
Björn Lindqvist cb39da4b31 math.vectors: new word vclamp for clamping vectors 2016-08-22 14:22:26 +02:00
Alexander Iljin 79964e4487 math.functions-docs: fix wording for abs and absq
Those functions are not specific to complex numbers.
2016-07-30 09:25:30 -07:00
Alexander Iljin 2fd5654473 Add EOL at EOF for all authors.txt files for consistency
In some instances replaced CR/LF with LF.
2016-07-30 09:25:30 -07:00
John Benediktsson 55cf5472a5 using [ ] [ ... ] ?if instead of [ nip ] [ ... ] if*. 2016-07-11 19:50:37 -07:00
John Benediktsson 498285d7dd unicode: make this the API for all unicode things. 2016-03-30 23:29:48 -07:00
Doug Coleman 30d158ccce prettyprint: Print .b .o .h with prefixes so it's not super confusing. Fixes #1351. 2016-03-30 22:59:29 -07:00
Doug Coleman 41209a3a42 summary.txt: Delete empty lines and empty files. 2016-03-30 22:11:51 -07:00
John Benediktsson 09cb888b48 math.floats.env: restore test cases that were disabled. 2016-03-30 10:30:36 -07:00
Björn Lindqvist ce2b971b3b mirrors: make all sequences be "inspectable", could fix #1237 2016-03-26 15:08:31 +01:00
Doug Coleman d3bc2035a2 factor: remove rest of double paren words. 2016-03-25 03:13:27 -07:00
Björn Lindqvist 579875821b VM: removes the OBJ-ERROR special object in favor of a constant
The special object contained the string "kernel-error" which were used
to tag VM errors. But it is simplier and removes a little complexity to
just tag them with a fixnum constant.
2016-03-22 17:52:19 +01:00
Doug Coleman 35d84c6e64 maths.primes: finish renaming fast-gcd to simple-gcd. 2016-03-19 17:21:24 -07:00
John Benediktsson 6b07e6caf2 math: rename fast-gcd to simple-gcd. 2016-03-19 12:20:09 -07:00
Björn Lindqvist a0dba498aa math.vectors.simd.intrinsics: the syntax for declaring simd intrinsics
isn't needed so it can be removed afaict
2016-03-11 07:11:47 +01:00
Jon Harper 43be523e31 math.statistics, add docs for cum-sum0, add cum-product1 for symmetry 2016-03-08 13:41:54 -08:00
Jon Harper cb6ddb1735 rename math.statistics:cum-map to sequences:accumulate* 2016-03-08 13:41:54 -08:00
Alexander Iljin fc7b70a17e Rename variables in some stack declarations for consistency.
It doesn't look great when a word is called "v/n", but the declared
parameters are "u" and "n". Better to have the parameters "v" and "n".
Also for consistency all input parameters are named "v" for "vector" (or
"u" and "v" in the alphabetical order), and the result vector is always
"w".
2015-11-04 07:47:57 -08:00
John Benediktsson e477f6996f Fix comments to be ! not #!. 2015-09-08 16:15:10 -07:00
John Benediktsson ceb75057da change ERROR: words from throw-foo back to foo. 2015-08-13 16:13:05 -07:00
Doug Coleman b6be8685c3 basis: ERROR: changes. 2015-08-13 03:20:39 -07:00
Doug Coleman 330c7ba156 factor: Removing SLOT: nth/at/global in favor of using change: at for tuple slots named ``at`` and change-at for hashtables.
Redo many FROM: and QUALIFIED: and using lists.
2015-08-12 08:49:02 -05:00
Doug Coleman 43fb73fae6 factor: Rename I[ ]I to [I I]. Fix places where we do "string"token without whitespace. 2015-08-06 17:05:12 -05:00
John Benediktsson c6fad4aa61 math.ratios: moving to core. 2015-07-30 10:31:00 -07:00
John Benediktsson fba2eb9ace fix another doc using. 2015-07-28 20:21:12 -07:00
John Benediktsson 4ded3c491c fix some help-lint errors. 2015-07-28 20:06:59 -07:00
John Benediktsson 9b77a785e9 math.floats.env: don't need << >>. 2015-07-28 19:23:43 -07:00
Björn Lindqvist 8a731681bf compiler.cfg.*: tests against #1308 2015-07-28 17:58:29 -07:00
Björn Lindqvist 5e29aac0a6 Docs: various more compiler-related docs 2015-07-28 17:58:28 -07:00
Doug Coleman 0babf4558f math.statistics: fix docs 2015-07-27 12:41:02 -07:00
Doug Coleman 270155bae4 math.statistics: clean up some weird stack effects 2015-07-27 09:54:07 -07:00
Doug Coleman f3c85e0598 math.vectors.conversion: [foo] for words that make quots is ok, but [[foo]] is overboard. change to ([foo]) 2015-07-26 12:24:23 -07:00
Doug Coleman 1fcf96cada factor: remove """ string syntax for now. there are HEREDOC:, STRING:, escaping \", and something else soon. 2015-07-25 22:59:56 -07:00
John Benediktsson 5eec781b40 use ``if*`` instead of ``dup [ ] [ drop ] if``. 2015-07-20 22:24:30 -07:00
John Benediktsson 89e3cc511e math: moving >fraction to math. 2015-07-19 16:57:45 -07:00
Doug Coleman 0176591527 factor: actual patch to remove ; from all c/fortran functions 2015-07-19 16:25:30 -07:00
Doug Coleman 2c257f399c factor: Rename MACRO: and MACRO: to have quot as the output in stack effects. 2015-07-18 22:16:11 -07:00
John Benediktsson 6e9dfc86c3 math.primes: commas look better. 2015-07-14 17:35:52 -07:00
John Benediktsson c89cdc4c67 math.matrices.elimination: avoid double length call. 2015-07-14 15:59:24 -07:00
Doug Coleman 892c62e1dc factor: second stab at [ ] [ ] unit-test -> { } [ ] unit-test 2015-07-03 09:39:59 -07:00
Doug Coleman 9bbba4dca8 math.floats.env: Make sure answers are array. So much metapgramming in these unit tests. 2015-07-02 16:05:42 -07:00
Doug Coleman 59f3b1ea57 Revert "factor: rename [ ] [ ] unit-test -> { } [ ] unit-test using a refactoring tool!"
Needs a bit more work.

This reverts commit 7e54cc2824.
2015-07-02 13:47:06 -07:00
Doug Coleman 7e54cc2824 factor: rename [ ] [ ] unit-test -> { } [ ] unit-test using a refactoring tool! 2015-07-02 11:36:08 -07:00
Doug Coleman 999aa7c897 factor: clean up spaces in -tests files 2015-07-02 10:34:01 -07:00
Doug Coleman e3cb325040 factor: clean up whitespace in -docs files 2015-07-02 10:31:22 -07:00
Doug Coleman edb61c9b24 math.combinatorics: private docs again. oops 2015-06-30 10:25:21 -07:00
Doug Coleman 380790f624 math.complex: Fix PRIVATE>
There's an IN: in the middle of a PRIVATE> and that breaks things.
2015-06-30 08:58:12 -07:00
Doug Coleman 69ee8b9190 core, basis: Don't use the IN: foo.private feature and undocument it.
It only works well when you are loading code dynamically.
2015-06-30 08:51:07 -07:00
Doug Coleman 352e5de16a core, basis, extra: Remove DOS line endings from files.
Remove whitespace from end of lines.
Add a newline to the end of each file.
2015-06-29 17:25:40 -07:00
John Benediktsson fda90b2beb math.primes.erato: add some comments at the top. 2015-06-17 10:19:00 -07:00
John Benediktsson 8b6c743e02 math.primes.erato.fast: use literals to show how the wheel is calculated. 2015-06-16 18:44:08 -07:00
John Benediktsson 64db5c5bb4 math.primes.erato: faster compressed sieve by two improvements:
1) fixnum math in unmark-multiples
2) 3 upper sqrt 2 <range> in sieve
2015-06-16 08:26:48 -07:00
John Benediktsson 7e23c12c0f math.primes.erato.fast: some bignum fixes and more tests. 2015-06-16 08:20:32 -07:00
John Benediktsson e3ec051527 math.primes: fix "11 >bignum prime?". 2015-06-15 23:02:39 -07:00
John Benediktsson db42e12853 math.primes.erato.fast: adding fast Sieve of Eratosthenes. 2015-06-15 19:51:02 -07:00
John Benediktsson dfa763434e Fix tests broken by word hashcode change. 2015-06-09 20:37:55 -07:00
Doug Coleman 6e60c811ac core: Rename create to create-word, create-in to create-word-in. 2015-06-08 12:47:35 -07:00
John Benediktsson 14ed9a5455 math.functions: some silly cleanup. 2015-06-02 11:54:05 -07:00
John Benediktsson 0eea157d90 math.bitwise: bitfield should just use map-reduce. 2015-05-31 08:04:34 -07:00
John Benediktsson f24bbffb2a math.bitwise: change bitfield to reduce from first argument rather than zero. 2015-05-30 21:55:27 -07:00
John Benediktsson 0f1f27dcee math.bitwise: fix docs for bitfield. 2015-05-30 21:51:08 -07:00
John Benediktsson 40b699cc1e math.primes: little bit more cleanup. 2015-05-13 15:17:15 -07:00
John Benediktsson ab50fc818f math.primes: use fast-gcd in coprime? and replicate instead of make. 2015-05-13 14:47:31 -07:00
John Benediktsson 296968580a use assoc-reject instead of [ ... not ] assoc-filter. 2015-05-12 19:08:42 -07:00
John Benediktsson b366a06c41 use reject instead of [ ... not ] filter. 2015-05-12 18:50:34 -07:00
John Benediktsson ac23acc2c9 Fix some minor errors in help-lint. 2015-01-30 17:04:40 -08:00
Benjamin Pollack 5e01164a72 Add more documentation for math.statistics 2015-01-30 17:04:40 -08:00
John Benediktsson 1aa27963d2 math.primes.miller-rabin: actually, this is better. 2014-12-04 19:48:32 -08:00
John Benediktsson 95e45d865d math.functions: minor cleanup to (gcd). 2014-12-04 19:46:42 -08:00
John Benediktsson 9d4336d774 math.primes.miller-rabin: minor cleanup; 2014-12-04 19:46:30 -08:00
John Benediktsson 34160212d1 math.primes.erato: fix reference to "arr". 2014-12-04 11:52:56 -08:00
John Benediktsson d5b8f3d3b9 math.primes.erato: fix help-lint. 2014-12-04 11:48:12 -08:00
John Benediktsson 348bd85824 math.ranges: cleanup using. 2014-12-04 10:23:59 -08:00
John Benediktsson ad71f79be3 math.primes: speedup sieve. 2014-12-04 10:11:32 -08:00
John Benediktsson 76761b2e59 more minor cleanup. 2014-11-30 19:26:23 -08:00
John Benediktsson 818f337b02 cleanup "over push" is "suffix!". 2014-11-30 08:38:59 -08:00
Björn Lindqvist 001acde590 math.vectors: new word v>integer = [ >integer ] map 2014-11-17 19:02:12 -08:00
Doug Coleman 7d95fb8172 math.vectors.simd: Attempt to print out full simd failures so we can debug them. 2014-11-17 12:12:39 -08:00
Benjamin Pollack 2c3dd8c3c8 Remove executable bit from tons of files that aren't 2014-11-05 20:40:42 -08:00
Doug Coleman e4e6f34f0e math.statistics: Get smart about the geometric mean. Calculate it in logspace so we can use addition of small logarithms and multiplication instead of the nth root of a giant product. 2014-09-26 13:34:25 -07:00
Björn Lindqvist 60ffe0680e kernel: new combinator 2with = with with 2014-07-22 07:40:13 -07:00