Commit Graph

1054 Commits (3dc8f5e039e0a558803d2612305515273fc3a55c)

Author SHA1 Message Date
John Benediktsson c1e91316d2 math.combinatorics: adding a k-permutations virtual sequence. 2013-05-15 15:05:38 -07:00
John Benediktsson 5ee7f10f19 math.matrices: simpler square-rows. 2013-05-14 13:52:24 -07:00
John Benediktsson bcbf3198f7 math.matrices: faster square-rows and square-cols. 2013-05-14 13:46:44 -07:00
John Benediktsson fe45a08054 math.ranges: implement sum on ranges. 2013-05-06 16:01:29 -07:00
John Benediktsson 720db54f61 math.statistics: change kth-object to properly clone underlying sequence first. 2013-05-06 10:40:53 -07:00
John Benediktsson 6a4638fa0f math.statistics: faster cum-mean. 2013-05-06 09:12:40 -07:00
John Benediktsson 0d806e0b69 Revert "math.statistics: change cum-mean to use v/."
This reverts commit 9df2235d8983da67d106a6d5fb297134e5e2a58e.
2013-05-06 09:08:11 -07:00
John Benediktsson b01b14c0e2 math.statistics: change cum-mean to use v/. 2013-05-06 08:59:02 -07:00
lorynj ca7dd6a6a3 cum-mean
Added a word to calculate cumulative mean.

Signed-off-by: lorynj <lorynj@gmail.com>
2013-05-06 08:15:39 -07:00
John Benediktsson c1ab4aab59 math.combinatorics: faster by using hints for the array common case. 2013-05-01 11:18:17 -07:00
John Benediktsson 57b7a5fd6f math.matrices: add tests for square-matrix?. 2013-04-25 14:48:16 -07:00
John Benediktsson 55b2fb0802 math.functions: implement ldexp. 2013-04-24 11:19:24 -07:00
John Benediktsson 35e23dc547 math.statistics: make collect-by row polymorphic, simplify words. 2013-04-22 06:25:50 -07:00
John Benediktsson 3ca65a2b47 math.combinatorics: fix map>assoc-combinations (shouldn't have been locals). 2013-04-18 09:04:47 -07:00
John Benediktsson 02d652e6c0 math.combinatorics: minor fix to reduce-combinations stack effect. 2013-04-18 07:17:36 -07:00
John Benediktsson 77b3d509be math.combinatorics: cleanup stack effects to be more descriptive. 2013-04-18 07:15:47 -07:00
John Benediktsson 81f733493d math.combinatorics: much faster permutations, cleanup combinations code. 2013-04-18 07:04:17 -07:00
John Benediktsson 433adf8dd2 math.combinatorics: big speedup to combinations. 2013-04-17 20:57:48 -07:00
John Benediktsson 3862c4f9b5 math.combinatorics: remove duplicate nths-unsafe. 2013-04-06 14:29:47 -07:00
John Benediktsson decd9ed1ee math.combinatorics: make permutations-quot to reduce code duplication. 2013-04-06 13:12:57 -07:00
John Benediktsson b646d1e1b8 math.combinatorics: produce type of sequence in selections. 2013-04-06 13:06:23 -07:00
John Benediktsson 64111e1342 math.combinatorics: use nth-unsafe more. 2013-04-06 12:43:02 -07:00
John Benediktsson d15dbaebb4 math.combinatorics: faster nCk (use integer division). 2013-04-06 11:43:20 -07:00
John Benediktsson a52ee59005 math.combinatorics: faster permutation (using slices). 2013-04-05 07:28:22 -07:00
John Benediktsson 360c2ee5a7 math.functions: remove round-to. 2013-04-01 17:02:44 -07:00
John Benediktsson e5f9696aae math.ratios: adding some tests for M\ ratio /mod. 2013-03-29 08:32:35 -07:00
John Benediktsson 71d37429ba math.functions: faster >rect by specializing for complex. 2013-03-28 18:02:55 -07:00
John Benediktsson b38f42f73c math.ratios: faster M\ ratio mod. 2013-03-28 15:00:21 -07:00
John Benediktsson 7c62a94ce6 math.ratios: faster M\ ratio /mod. 2013-03-28 14:56:47 -07:00
John Benediktsson 02d9565732 math.statistics: adding demean and demedian, cleanup a bit. 2013-03-28 11:40:46 -07:00
John Benediktsson 814cdaf26d math.functions: clarify rounding behavior. 2013-03-26 14:35:38 -07:00
John Benediktsson 4c941e8996 math.functions: speed up round (thanks Loryn Jenkins!) 2013-03-26 14:22:21 -07:00
Doug Coleman 5224fba820 math: Revert clone on median algorithm, perhaps need to revisit this. Call clump for moving-median 2013-03-24 01:14:35 -07:00
Doug Coleman bfbe6edde6 math.statistics: Median now changes the order of the sequence, so clone it first. 2013-03-24 01:08:28 -07:00
Doug Coleman 8c19602ae9 assocs: Add of and ?of. Change all the things at once! Fixes #701. 2013-03-23 14:59:07 -07:00
John Benediktsson 684c2793e7 math: some style cleanup. 2013-03-21 08:54:14 -07:00
Doug Coleman 07e223564f math.ranges: Stopgap fix for math.ranges unit tests. See issues #803, #800, #508. 2013-03-20 15:54:57 -07:00
Doug Coleman eb136e0f21 math.ranges: Add a bunch more tests for empty ranges. 2013-03-20 13:52:03 -07:00
Doug Coleman 6697f3effb math.statistics: Fix histogram and collect. Histogram used each-index even when it didn't need to. 2013-03-10 12:57:48 -07:00
John Benediktsson b571a42679 Use -unsafe words with pair methods. 2013-03-07 10:47:23 -08:00
John Benediktsson 1ae04f1247 math.statistics: adding z-score. 2013-02-07 15:50:34 -08:00
Doug Coleman 18b7960e09 math.statistics: Add docs for collect-by and collect-index-by. 2013-02-05 09:35:51 -08:00
John Benediktsson 422ccf9901 math.functions: adding "round-to". 2013-01-30 09:41:21 -08:00
Doug Coleman fb60673840 math.vectors: Don't use macro with locals and cond in vif. Stack-checker/locals/macros/smart-combinators all need some work (a rewrite?), but meanwhile don't let it get in the way. Add tests. 2013-01-03 09:49:31 -08:00
Doug Coleman 2ab5607670 math.vectors: Fix spacing. 2013-01-02 00:09:21 -08:00
John Benediktsson 82dc0bf045 math.statistics: just use accumulate for now. 2012-12-04 08:56:21 -08:00
Doug Coleman 516549b52c basis: Try to fix the build. My profiler is hanging, but I can't figure out why. See if the build farm has the same is
sue.
2012-11-27 12:47:44 -06:00
Doug Coleman 6e48f8ab15 math.statistics: Add a variant of histogram that can see the sequence index. 2012-11-17 12:39:54 -08:00
Doug Coleman d31105813b math.statistics: Add back std as sample-std. 2012-11-15 08:27:41 -08:00
Doug Coleman 2ada02726b math.statistics: Make you think about which std you want--population or sample. Hopefully use the right words everywhere. 2012-11-07 22:53:53 -08:00
Doug Coleman a4e55a3eee math.statistics: Rename full-* to population-*. Full, while somewhat descriptive of using the entire dataset, is not a technical term, while population is used in Mathematica and stats books. 2012-11-07 22:53:52 -08:00
Doug Coleman 401dd47335 math.matrices: Add m+n, m-n, n+m, n-m, words. 2012-11-07 22:53:52 -08:00
John Benediktsson 1e413edf3a math.statistics: rename full-* to population-*. 2012-11-06 07:16:20 -08:00
John Benediktsson 23fc7b3eb9 math.statistics: add some padding in the docs (looks better). 2012-10-25 21:01:17 -07:00
John Benediktsson 71da857f43 math.statistics: add other cumulative words to help article. 2012-10-25 16:30:31 -07:00
Doug Coleman b867a248a2 math.statistics: Add cum-count, cum-sum0, cum-map0. Add docs. 2012-10-25 16:13:25 -07:00
John Benediktsson 013160df9a change some "2drop 2drop" to "4drop". 2012-10-23 12:21:30 -07:00
John Benediktsson eaa19eb36f math.primes.erato: minor performance improvements. 2012-10-23 10:49:45 -07:00
Doug Coleman 4c4d186ae4 math.matrices: Trying to flesh out the matrices vocabulary a bit. 2012-10-22 09:47:36 -07:00
Doug Coleman 923f3592c8 math.statistics: Add ddof (delta degrees-of-freedom) to easily calculate population (full) and unbiased (sample) statistics. 2012-10-22 09:47:35 -07:00
Doug Coleman 7906632952 math.matrices: Add some combinators for iterating over matrices. Add covariance matrix. 2012-10-22 09:47:35 -07:00
Doug Coleman b23e52f532 math.matrics: Add some combinators and indexing words to math.matrices. 2012-10-22 09:47:35 -07:00
John Benediktsson 13f101bd2b math.statistics: empty-sequence is silly. 2012-09-26 17:09:23 -07:00
John Benediktsson 7fb8db2e74 math.statistics: adding a normalized-histogram word. 2012-09-26 08:39:11 -07:00
John Benediktsson 6072e58db3 math.statistics: remove probabilities word, not really needed. 2012-09-26 08:32:30 -07:00
John Benediktsson ca69afec31 math.statistics: use "cumulative map" as base of all cumulative words. 2012-09-25 22:27:42 -07:00
John Benediktsson a283782abe math.statistics: some fixes to entropy, adding maximum-entropy and normalized-entropy. 2012-09-25 20:17:34 -07:00
Doug Coleman 8e8712efab math.bitwise: Fix bit-range and test it. 2012-09-19 17:03:13 -07:00
Doug Coleman 19b6ae71d5 math.bitwise: Fix on-bits for negative values, which also fixes bits. Add unit tests. 2012-09-19 16:39:22 -07:00
Doug Coleman f0464fa097 math.bitwise: Inline bit-range 2012-09-19 16:15:14 -07:00
Doug Coleman 2735d3a5d7 math.bitwise: Add bit-range 2012-09-19 15:44:19 -07:00
Alex Vondrak 4c53c971c1 compiler.cfg.gvn.math: missed some availability checks that were causing math.vectors.simd.tests to fail (issue #671) 2012-09-18 00:07:10 -07:00
Doug Coleman 2282007334 math.ratios: Add unit tests for bug #668. 2012-09-11 08:16:25 -07:00
John Benediktsson e84e508256 math.ratios: speed up some operations on ratios. 2012-09-10 19:53:25 -07:00
John Benediktsson c86b2d2161 math.combinatorics: factorial could be memoized... 2012-09-05 11:02:38 -07:00
Doug Coleman d2317c71f5 math.statistics: add rank-values 2012-09-04 18:52:38 -07:00
John Benediktsson 8ed541b26b math.ratios: slight fix to M\ ratio recip for negative ratios. 2012-09-02 10:08:00 -07:00
John Benediktsson 009fb4249e math: faster recip for integers and ratios. 2012-09-02 09:47:31 -07:00
John Benediktsson b39547a866 math.bitwise: some cleanup of zero handling. 2012-08-31 15:58:54 -07:00
John Benediktsson 3836d57321 math.functions: faster (integer) m^n. 2012-08-31 15:10:48 -07:00
Doug Coleman 6c9a6122de math.vectors: Implement infinity p-norm and special-case l1-norm and l2-norm. 2012-08-30 16:47:45 -07:00
Doug Coleman 27f445d505 assocs: Add sift-keys and sift-values. Remove three other implementations
of sift-values and use the new one.
2012-08-23 22:36:10 -07:00
John Benediktsson dd2a5729a7 math.primes.erato: bit faster by inlining. 2012-08-23 09:35:09 -07:00
John Benediktsson ea25cde2af math.functions: make it clear that 0 = is the more correct zero?. 2012-08-13 08:03:54 -07:00
Doug Coleman 432c114745 math.complex: Fix using list. 2012-08-12 13:55:36 -07:00
John Benediktsson 4561cf7684 Revert "math.functions: cleaner rect>."
This reverts commit 5ecff652ba.
2012-08-11 10:40:41 -07:00
Doug Coleman 2b45ba9a4f math.complex: Check C{ } syntax -- can only have two elements in the complex array. Fixes #612. 2012-08-10 15:58:04 -07:00
John Benediktsson 0178117d6c math.functions: cleaner rect>. 2012-08-10 15:51:11 -07:00
John Benediktsson 2e9c20a12e math.matrices: adding the outer product. 2012-08-08 17:02:39 -07:00
Doug Coleman ffe1c510ae math.matrices: rename van-der-monde to vandermonde 2012-07-30 16:44:08 -07:00
John Benediktsson 088dfa4861 math.matrices: adding van-der-monde matrix. 2012-07-30 16:15:21 -07:00
John Benediktsson aed6825b4a math.vectors: implement v^, v^n, n^v. 2012-07-30 16:15:00 -07:00
John Benediktsson 1a73e79ef7 cleanup some use of with-scope. 2012-07-19 13:55:34 -07:00
John Benediktsson 0359a4e823 math.intervals: using short-circuit logic. 2012-07-17 20:08:12 -07:00
John Benediktsson bdf02bfd2b math.statistics: faster and simpler entropy word. 2012-07-11 12:26:20 -07:00
John Benediktsson 0c5f895371 math.statistics: minor style cleanup. 2012-07-10 17:03:01 -07:00
John Benediktsson 9063235994 math.functions: minor cleanup. 2012-06-22 08:38:34 -07:00
John Benediktsson 55525a8ba4 math.combinatorics: 100%+ faster combinations. 2012-06-01 14:07:39 -07:00
John Benediktsson d10fd71cb3 math.functions: implement copysign. 2012-06-01 08:24:35 -07:00
John Benediktsson f090967d77 math.matrices: adding docs for a few words. 2012-05-25 12:19:23 -07:00
Doug Coleman aad94d711b math.matrices: Add another test to make sure we calculate kron correctly. 2012-05-24 09:02:47 -07:00
Doug Coleman 78f1ca9f14 math.matrices: Add stitch. Add Kronecker product. 2012-05-24 08:53:47 -07:00
John Benediktsson 07b0d52f55 math.statistics: adding winsorized-mean. 2012-05-08 08:48:15 -07:00
John Benediktsson 4c2d01c5ec math.statistics: adding trim-mean and signal-to-noise. 2012-05-08 08:24:57 -07:00
Doug Coleman 0a5a2a74a7 math.statistics: Add sum-of-squares word, add sum-of-squared-errors/sum-of-absolute-errors words. 2012-05-07 15:04:37 -07:00
John Benediktsson 495637a087 math.matrices: adding hilbert-matrix, toeplitz-matrix, hankel-matrix, and box-matrix. 2012-05-04 18:01:21 -07:00
Doug Coleman 9a4e66c8a6 math.statistics: Add power-mean and quadratic-mean. 2012-05-04 15:27:46 -07:00
John Benediktsson 7ab521f0ba math.statistics: simpler (faster) version of rescale. 2012-05-04 14:51:38 -07:00
John Benediktsson 87686a9a31 math.statistics: adding contraharmonic-mean. 2012-05-04 14:43:29 -07:00
John Benediktsson 4339b14d77 math.statistics: adding mean-dev and median-dev. 2012-05-04 14:40:24 -07:00
John Benediktsson bacdd691fc math.statistics: separate "sample-" and "full-" versions of var, std, ste, and corr. 2012-05-04 14:31:26 -07:00
John Benediktsson 0435098bd8 math.statistics: adding standardize, differences, rescale. 2012-05-04 14:18:45 -07:00
Doug Coleman 6f3fe950a7 math.matrices: Add a diagonal-matrix word that makes an nxn matrix from a sequence.
Optimize identity-matrix word -- 2-3x faster using diagonal-matrix.
Add an eye word that makes an mxn diagonal matrix with a diagonal offset by k.
2012-05-04 11:31:05 -07:00
John Benediktsson 31c7bd8e86 math.functions: adding generalized signum function. Fixes #509. 2012-05-03 14:44:10 -07:00
John Benediktsson 95b82eecfa math.vectors: adding p-norm. 2012-05-03 13:27:00 -07:00
Doug Coleman f6398365bd math.functions: rename exp to e^ to be consistent with 2^ and 10^. update things. 2012-05-02 10:22:23 -07:00
Doug Coleman fee4d76b73 math.functions: Add e^ and sigmoid functions. 2012-05-02 09:21:34 -07:00
John Benediktsson 5878b6982b math.statistics: adding entropy function. 2012-04-26 18:40:59 -07:00
John Benediktsson 6f89c1824d change to in-place reverse. 2012-04-24 18:51:46 -07:00
John Benediktsson 817b45ee03 math.combinatorics: minor performance improvements. 2012-04-24 18:42:34 -07:00
John Benediktsson f24e40800a math.combinatorics: faster version of factorial. 2012-04-24 10:06:00 -07:00
Doug Coleman cd9394f8c6 math.statistics: Add eight methods for calculating quantiles. Add quartile. Add kth-smallests et al, refactor medians. 2012-04-24 03:17:50 -07:00
Doug Coleman 7cb094d521 math.statistics: Make a safe version of kth-object. Bounds check k w/ regards to seq. 2012-04-23 13:55:25 -07:00
John Benediktsson b9bcfdab8e math.combinatorics: adding <combinations> and <permutations> sequences. 2012-04-23 08:30:22 -07:00
Doug Coleman 7ad089b682 math.statistics: Generalize kth-smallest into kth-object, add kth-largest. Add count-relative and minmax-relative for counting the number of lt, eq, gt elements, and getting the max lt and min gt in one pass. 2012-04-22 23:41:13 -07:00
John Benediktsson c00ddde434 math.combinatorics: fix failed find combinations/permutations. 2012-04-21 20:11:47 -07:00
John Benediktsson bada993f78 math.combinatorics: adding find-combination and find-permutation. 2012-04-20 23:31:40 -07:00
John Benediktsson 7a15418cf4 math.functions: adding another test for roots. 2012-04-19 13:34:42 -07:00
John Benediktsson adc7b22997 math.functions: adding "roots" word to get arbitrary roots from numbers. 2012-04-19 12:19:14 -07:00
John Benediktsson 1e8eb18216 math.functions: adding docs and tests for ^mod. 2012-04-19 08:20:11 -07:00
Doug Coleman 0322b4d028 math.combinators: Add filter-permutations/combinations. Minor cleanup. 2012-04-18 15:18:54 -07:00
Doug Coleman 229d0e0549 math.combinators: Add map-permutation 2012-04-18 15:18:54 -07:00
John Benediktsson e9ffd2da37 math.statistics: adding cumulative versions of sum, product, min, and max. 2012-04-12 10:30:16 -07:00
Doug Coleman 021e0f2ce6 math.statistics: Fix docs for help-lint. 2012-04-10 08:52:12 -07:00
John Benediktsson 236dd2cc97 math.combinatorics: fix help-lint. 2012-04-09 11:43:22 -07:00
John Benediktsson 214195e56a Revert "math.functions: simpler without "simple-gcd"."
This reverts commit aa7f60ebbc.
2012-04-05 10:34:50 -07:00
John Benediktsson b240519bff math.functions: simpler without "simple-gcd". 2012-04-05 10:31:46 -07:00
John Benediktsson b2ffda32ca math: adding a fast-gcd that speeds up all ratio operations by up to 10 times for bignum ratios. 2012-04-05 09:17:52 -07:00
John Benediktsson 57231bfef4 math.statistics: change 'var' to 'sample-var' and implement variance, covariance, and correlation. 2012-04-02 17:12:32 -07:00
John Benediktsson 4f046a2339 math.vectors: separate "dot product" from "Hermitian inner product". Fixes #484. 2012-03-29 10:56:39 -07:00
John Benediktsson 7a07e8742c math.combinatorics: fix tests for next-permutation. 2012-03-02 10:05:57 -08:00
John Benediktsson 7bb807d441 math.combinatorics: fix docs for next-permutation. 2012-03-02 09:55:22 -08:00
John Benediktsson 8d56193edd math.combinatorics: implementing "next-permutation". 2012-03-02 09:54:35 -08:00
John Benediktsson de74b98278 math.vectors: fix some $examples in docs. 2011-12-29 17:31:55 -08:00
Joe Groff aa1ad21d72 fix help-lint failures 2011-12-14 11:33:17 -08:00
Joe Groff fe767253a1 math.vectors: add higher-order stack effect to vif 2011-12-13 19:46:44 -08:00
Joe Groff 3deae96995 math.vectors.simd.intrinsics: fix deploy bug
If not called with a known-at-compile-time SIMD type, the intrinsic definitions were leaving behind runtime quotations that referenced the c-array words after c-type information had been stripped, causing deployed applications that used SIMD to fail.
2011-12-07 12:47:38 -08:00
Doug Coleman abc953ecea help-lint fixes for recent changes 2011-12-07 12:26:35 -08:00
Joe Groff 8cb78d5bd2 math.complex: pass tests even if number-base set 2011-11-26 17:46:38 -08:00
Joe Groff 943596575a use radix literals 2011-11-23 19:03:40 -08:00
Joe Groff 54dcd8a4ea math.vectors.simd: don't try distance on int types
"v- norm" doesn't work right for uint-4s because of underflow, but who's going to call "distance" on a uint vector?
2011-11-13 16:10:27 -08:00
Joe Groff dd8bb5b673 math.vectors.simd: unencrypt check-optimizer
And make it report real information about what values were tested and how they failed
2011-11-13 16:10:27 -08:00
Joe Groff 248066c710 code beautification 2011-11-13 16:10:26 -08:00
Joe Groff a10fa68218 math.vectors.simd: add vcount to the tests
Also add a base case to (approx=) for integer returns. vcount returns an integer even for float vector inputs, but the test machinery isn't smart enough to figure that out and uses (approx=) on the outputs anyway.
2011-11-13 16:10:26 -08:00
Joe Groff 32b7dc116f math.vectors.simd.intrinsics: fix double-2 vcount
Turns out we use MOVMSKPS for double vectors too. Gotta save that extra instruction byte!
2011-11-13 16:10:25 -08:00
Joe Groff dd8dda4f48 math.vectors.simd: make vcount work for all ints 2011-11-13 16:10:23 -08:00
Joe Groff 5411a67b22 math.vectors.simd.intrinsics: better fake vgetmask
More accurate simulacrum of PMOVMSKB/MOVMSKPS/MOVMSKPD for non-intrinsic definition
2011-11-13 16:10:22 -08:00
Joe Groff da81cb9035 math.bitwise: don't count the same bits over&over 2011-11-13 16:10:22 -08:00
Joe Groff 706c9ee3b9 math.bitwise: hotrod nonintrinsic fixnum-bit-count 2011-11-13 16:10:21 -08:00
Joe Groff d79b462f75 compiler: add intrinsic for PMOVMSKB/MOVMSKP[SD]
Combined with a fast bit-count this will let us rice byte-counting.
2011-11-13 16:10:20 -08:00
Doug Coleman 60f928ddbf math.functions: flushable and foldable don't do anything on inline words because flushable and foldable work on call sites (#call nodes), and inlined words are inlined into another word's call site; they don't generate their own #call node. 2011-11-06 19:25:53 -08:00
Doug Coleman c731dc6edb Rename lookup to lookup-word. 2011-11-06 16:00:00 -08:00
Joe Groff 8cf18d1a82 remove BSD,solaris,etc. misc platform support code 2011-11-02 17:13:51 -07:00
Joe Groff 38a5184fdf math.statistics: fix stack effect on collect-by 2011-11-02 13:23:13 -07:00
Doug Coleman 94db86a6db Make "foo.private" require load foo instead.
Move require from vocabs.loader to vocabs. Update everything.
Fixes #201.
2011-11-02 11:50:03 -07:00
Slava Pestov b31ffdfcb4 math.vectors.simd: vlshift, vrshift, hlshift and hrshift were being miscompiled if the shift count was a bignum. Fixes #264 2011-10-30 21:50:17 -07:00
Doug Coleman 51c033a1f6 Fix all failures in the linux64 build email 2011-10-24 19:33:09 -07:00
John Benediktsson fb2aab3545 Remove unused words. Fixes #132. 2011-10-19 11:01:16 -07:00
John Benediktsson 80e1c8e3f2 Eliminate duplicate syntax for stack effects "(" no longer drops and is identical to the old "((", which is now removed. 2011-10-18 13:19:39 -07:00
John Benediktsson cf54ce8e42 math.functions: when gcd is inlined, "gcd nip" is almost as good as "gcd*". 2011-10-18 10:30:39 -07:00
John Benediktsson 38a54cb8df math.functions: improve stack effect names for gcd*. 2011-10-17 20:37:36 -07:00
John Benediktsson ac98269f53 math.functions: faster gcd means faster ratios. 2011-10-17 20:36:28 -07:00
John Benediktsson 81714b8dc3 More lint cleanups. 2011-10-16 19:33:16 -07:00
John Benediktsson 6f1c44b46d Cleanup some lint warnings. 2011-10-15 19:19:44 -07:00
John Benediktsson cc49bbfb27 math.bitwise: bits is clearer this way. 2011-10-14 13:54:08 -07:00
Doug Coleman 181f11faa8 Make M\ throw an error upon lookup failure. Change method -> ?lookup-method, lookup-method is the throwing version of ?lookup-method. Fixes #229. 2011-10-03 15:49:49 -07:00
Doug Coleman f4da6f366c Make histogram example unchecked since hashtables print differently now that hashcodes are more optimized 2011-10-02 22:21:12 -07:00
John Benediktsson 3b72b641e0 Fix help-lint errors for recent hashtable changes. 2011-10-02 17:49:11 -07:00
Doug Coleman 76580da5d5 Refactor the lexer/parser to expose friendlier words for scanning tokens. The preferred top-level words now throw an exception on EOF.
CREATE -> scan-new
CREATE-CLASS -> scan-new-class
CREATE-WORD -> scan-new-word
CREATE-GENERIC -> scan-new-generic
scan -> (scan-token)
scan-token now throws on eof
(scan-word) returns word/number/f
scan-word now throws on eof
scan-word-name expects a non-number
Fixes #183.
Fixes #209.
2011-09-29 11:28:28 -07:00
John Benediktsson 4f42c72012 specialized-arrays: performed some cleanup.
Specifically,
    •   Created >c-array to be replacement for >T-array.
    •   Created cast-array to be generic replacement for all T-array-cast words.
    •   Created c-array@ to be generic replacement for T-array@ words.
    •   Replaced usages of <T-array> with T <c-array>
    •   Replaced usages of <direct-T-array> with T <c-direct-array>
    •   Replaced usages of >T-array with T >c-array
    •   Replaced usages of T-array-cast with T cast-array
    •   Replaced usages of malloc-T-array with T malloc-array.
    •   Removed malloc-T-array.
    •   Removed T-array-cast.
    •   Removed T-array@.
    •   Removed >T-array.

I also added (but didn't change any code to use):
    •   T c-array-type, returns T-array
    •   T c-array?, returns T-array?
    •   c-array{ T ... }, returns T-array{ ... }

Bootstraps just find on Mac OS X.  Also `load-all test-all` works for me.
2011-09-26 11:37:51 -07:00
Joe Groff 81b12adcad math.blas, alien.fortran: move to unmaintained cuz I'm getting too old for this shit. closes #171 2011-09-24 20:59:21 -07:00
Joe Groff 954bf89c40 math.functions: clean up some more to trim back load-time dependencies; alter tests to avoid inexact float constants where possible and hex-ify inexact constants otherwise 2011-09-22 16:04:49 -07:00
John Benediktsson 96c710a7b7 math.functions: inline 'on-bits' per Joe Groff's suggestion. 2011-09-22 13:44:30 -07:00
John Benediktsson aa880f46ca math.functions: rename 'bignum-log-helper'. 2011-09-22 12:38:33 -07:00
John Benediktsson 820b54d0f7 math.functions: duplicate on-bits to avoid circular dependency on math.bitwise. 2011-09-22 12:23:16 -07:00
John Benediktsson 90dbb84663 math.functions: test log with negative (really) bignums. 2011-09-22 11:15:06 -07:00
John Benediktsson 7f4604318a math.functions: add forgotten imports and fix between? check. 2011-09-22 10:00:22 -07:00
John Benediktsson 077ef8ed5b math.functions: implement "frexp" and support log of really big numbers. Fixes #160. 2011-09-22 09:42:28 -07:00
Doug Coleman eedc1e185f Add more unit-tests and docs for math.bitwise. Fix a bug with >signed so that it truncates a number to however many bits you tell it the number is before doing the calculation. 2011-09-21 14:55:50 -05:00
John Benediktsson b653360299 math.primes.safe: fix docs. 2011-09-12 10:56:39 -07:00
Joe Groff 003271f2b8 math.statistics: declare polymorphic effects on sequence>* combinators now that #88 is fixed 2011-09-09 18:13:17 -07:00
Joe Groff c57c26b3be math.statistics: add higher-order stack effect annotations to sequence>* words; factor out a "histogram-by" word from "histogram" that takes an additional binning quotation 2011-09-08 19:07:33 -07:00
John Benediktsson 9f34c9c676 Spelling fixes to documentation. 2011-08-26 16:20:31 -07:00
Joe Groff efe79cf6d3 math.functions: make sure zero zero ^ is always nan, regardless of the type of zero 2011-08-01 10:26:53 -07:00
Joe Groff 40c45e08ca Merge remote branch 'erikc/master' 2011-06-13 11:28:02 -07:00
Joe Groff b6cf76b547 Merge branch 'master' of factorcode.org:/git/factor 2011-06-07 09:44:35 -07:00
Joe Groff e4b1417dd2 math.functions: fix documentation for 10^ 2011-06-06 16:27:56 -07:00
Erik Charlebois 64252dbdbc 32 and 64 bit Linux PPC support 2011-05-23 23:36:14 -04:00
Erik Charlebois 305dcf1551 Use .factor-rc etc on Windows too, files can begin with dots just fine 2011-05-23 23:36:13 -04:00
Samuel Tardieu 23fe76160a Add math.primes:nprimes 2011-05-20 12:38:27 +02:00