Commit Graph

807 Commits (dcb71dcea8cb3b71124e30f61aba3e5352e77c81)

Author SHA1 Message Date
Doug Coleman 5fb4b86fbf help-lint fixes for recent changes 2011-12-07 12:26:35 -08:00
Joe Groff aee5815696 math.complex: pass tests even if number-base set 2011-11-26 17:46:38 -08:00
Joe Groff eee483654a use radix literals 2011-11-23 19:03:40 -08:00
Joe Groff a520e7e5ee 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 3888e0bf67 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 ce205e1e3a code beautification 2011-11-13 16:10:26 -08:00
Joe Groff 602fbd01de 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 c74d92a12c 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 a50c0a6624 math.vectors.simd: make vcount work for all ints 2011-11-13 16:10:23 -08:00
Joe Groff 6685af8b41 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 3071c110b5 math.bitwise: don't count the same bits over&over 2011-11-13 16:10:22 -08:00
Joe Groff 038b986fa1 math.bitwise: hotrod nonintrinsic fixnum-bit-count 2011-11-13 16:10:21 -08:00
Joe Groff 2c4c04f973 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 dde0599353 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 be9f8a99f0 Rename lookup to lookup-word. 2011-11-06 16:00:00 -08:00
Joe Groff 75cba3106a remove BSD,solaris,etc. misc platform support code 2011-11-02 17:13:51 -07:00
Joe Groff 1bd0c5910f math.statistics: fix stack effect on collect-by 2011-11-02 13:23:13 -07:00
Doug Coleman be12f2b27d 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 b8f0ffe5c4 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 f05e33fa37 Fix all failures in the linux64 build email 2011-10-24 19:33:09 -07:00
John Benediktsson f3b4b80be4 Remove unused words. Fixes #132. 2011-10-19 11:01:16 -07:00
John Benediktsson f2741b34a4 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 599f08f05d math.functions: when gcd is inlined, "gcd nip" is almost as good as "gcd*". 2011-10-18 10:30:39 -07:00
John Benediktsson 046f2b7d9c math.functions: improve stack effect names for gcd*. 2011-10-17 20:37:36 -07:00
John Benediktsson 302cd52c74 math.functions: faster gcd means faster ratios. 2011-10-17 20:36:28 -07:00
John Benediktsson 7494418bf8 More lint cleanups. 2011-10-16 19:33:16 -07:00
John Benediktsson fd853f9958 Cleanup some lint warnings. 2011-10-15 19:19:44 -07:00
John Benediktsson e948df41c6 math.bitwise: bits is clearer this way. 2011-10-14 13:54:08 -07:00
Doug Coleman e75e2b1f14 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 390f02fa71 Make histogram example unchecked since hashtables print differently now that hashcodes are more optimized 2011-10-02 22:21:12 -07:00
John Benediktsson ad874e71ed Fix help-lint errors for recent hashtable changes. 2011-10-02 17:49:11 -07:00
Doug Coleman 300138eb4d 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 0e3d598e69 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 4bd571530f 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 1d9f30b4bf 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 09800a3c55 math.functions: inline 'on-bits' per Joe Groff's suggestion. 2011-09-22 13:44:30 -07:00
John Benediktsson a2e3ef14b3 math.functions: rename 'bignum-log-helper'. 2011-09-22 12:38:33 -07:00
John Benediktsson 2513fd8fd5 math.functions: duplicate on-bits to avoid circular dependency on math.bitwise. 2011-09-22 12:23:16 -07:00
John Benediktsson a32c0ceb02 math.functions: test log with negative (really) bignums. 2011-09-22 11:15:06 -07:00
John Benediktsson 95ff94585e math.functions: add forgotten imports and fix between? check. 2011-09-22 10:00:22 -07:00
John Benediktsson 621c1c37a5 math.functions: implement "frexp" and support log of really big numbers. Fixes #160. 2011-09-22 09:42:28 -07:00
Doug Coleman 7eb353dfee 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 40d14417f0 math.primes.safe: fix docs. 2011-09-12 10:56:39 -07:00
Joe Groff 811a398f8f math.statistics: declare polymorphic effects on sequence>* combinators now that #88 is fixed 2011-09-09 18:13:17 -07:00
Joe Groff 3c68ef1854 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 248b0df6fc Spelling fixes to documentation. 2011-08-26 16:20:31 -07:00
Joe Groff cd8f63c8bc 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 ed26b45e2b Merge remote branch 'erikc/master' 2011-06-13 11:28:02 -07:00
Joe Groff 7ff795ca35 Merge branch 'master' of factorcode.org:/git/factor 2011-06-07 09:44:35 -07:00
Joe Groff bbdd383b6f math.functions: fix documentation for 10^ 2011-06-06 16:27:56 -07:00
Erik Charlebois 1ed2bc6231 32 and 64 bit Linux PPC support 2011-05-23 23:36:14 -04:00
Erik Charlebois c11f044725 Use .factor-rc etc on Windows too, files can begin with dots just fine 2011-05-23 23:36:13 -04:00
Samuel Tardieu 4f8e8e6613 Add math.primes:nprimes 2011-05-20 12:38:27 +02:00
Slava Pestov ab8ee12ae5 Merge branch 'cleanup' of git://github.com/mrjbq7/factor 2011-05-06 20:27:59 -07:00
John Benediktsson ad8c66e70f Update references to "1 tail" to use "rest". 2011-05-03 20:50:23 -07:00
John Benediktsson 664ef03fc4 Merge branch 'master' into sorting
Conflicts:
	basis/heaps/heaps-tests.factor
2011-04-12 18:09:36 -07:00
Doug Coleman 51bfb5532d Change how sequence>assoc and friends work. Now they take two quotations, the first of which prepares the key/value pair and the second insert it into the assoc. mrjbq7's group-by, formerly collect-values, is now called collect-by. 2011-04-09 23:51:14 -05:00
John Benediktsson 8928fe2e17 Update code that did ">alist sort-" to just "sort-". 2011-04-07 09:01:21 -07:00
Doug Coleman e68a3e1186 Merge branch 'master' of git://factorcode.org/git/factor 2011-02-26 11:44:50 -06:00
Keita Haga b1566ef0a6 math.combinatorics: fix typo in docs 2011-02-20 03:08:01 +09:00
Doug Coleman af6c99b11f More efficient polyval algorithm in math.polynomials 2011-02-12 22:41:13 -06:00
Keita Haga 2c324b14df In several documentation, remove whitespace before or after the colon or period 2011-02-10 01:51:13 +09:00
Keita Haga a7e7a6fa32 math.polynomials: fix typo in description of pextend-conv word 2011-01-18 23:35:52 +09:00
Keita Haga f39af49f83 math.statistics: in some words, interchanging the positions of the $examples and a $description 2011-01-18 23:20:06 +09:00
Keita Haga 04af0328d7 math.statistics: fix a few typos in docs 2011-01-18 22:32:45 +09:00
Keita Haga 1692cf6cef math.intervals: fix some typos in docs 2011-01-18 21:18:35 +09:00
Keita Haga beca2894a1 assocs, math.bitwise: remove first blank line and useless whitespace in a few usage examples 2011-01-17 00:12:28 +09:00
Keita Haga 433c1a60ee math.libm: add missing right parenthesis in description of fexp word 2011-01-16 10:48:06 +09:00
Jon Harper 093951556e math.primes.erato doc fixes. 2010-11-02 17:34:28 +01:00
Rupert Swarbrick 5af9f3cdd7 math.primes.erato: Fix off-by-one error
The sieve bit vector deals with numbers in chunks of 30. Therefore,
the number 90 (say) is the 91st 'element' of the vector. Each byte
deals with some range {0,1,...,29}+30n so to have the number 90, you
need four bytes.

Rather pleasingly, I bumped into this bug and it reduced to the
incantation:
  2010 2010 sieve marked-prime?
2010-11-02 17:34:24 +01:00
Doug Coleman 657b490f69 Remove <uint> *uint and friends. Hopefully remove the last usages of these words 2010-10-25 15:54:42 -05:00
Slava Pestov 302867c9a7 math.primes.erato: fix typo in docs 2010-10-22 18:26:08 -07:00
Slava Pestov 7d38319747 math.rectangles: add infinite recursion check in case somebody does something stupid 2010-09-16 21:27:18 -07:00
Slava Pestov 6617eca683 Fix three problems discovered by running math.floats.env tests in a loop:
- Crash if allocating error triggers a GC from a signal/SEH handler
- Crash if GC runs with floating point traps enabled on Windows
- Floating point traps didn't prettyprint properly
2010-09-02 22:57:14 -05:00
Slava Pestov f514de48a4 math.floats.env.x86: make sure the x87 stack is cleared after the overflow test, otherwise random things screw up later 2010-08-28 12:01:09 -05:00
Slava Pestov f9ef26a910 math.vectors.simd: docs mention obsolete 'test-mr mr.' words 2010-08-20 18:00:03 -07:00
Slava Pestov f3dfae04ba compiler: now that FFI has been deconcatenatized, we no longer need the special ##unary-float-function and ##binary-float-function fastpaths 2010-08-13 23:59:19 -07:00
Joe Groff 41a6f62ca6 math.floats.env.x86: more direct test for stack fault detection 2010-08-13 22:20:16 -07:00
John Benediktsson 46c282ad8a math.combinatorics: Fixing selections bug with nested sequences. 2010-08-13 14:34:14 -07:00
Joe Groff 939d602ad2 math.floats.env: detect +fp-x87-stack-fault+ during collect-fp-exceptions block 2010-08-12 23:23:00 -07:00
Slava Pestov 31ef4ad844 math.libm: fix regression: fsqrt intrinsic was not working ever since change was made to inline FUNCTION: bodies 2010-08-12 21:41:57 -07:00
Jon Harper 75a0e3397c divisors returns empty list for 0
This is mainly for consistency with other words
(factors, group-factors, unique-factors)
2010-08-09 22:54:35 -07:00
Slava Pestov 9cbff0c470 Merge branch 'master' of http://github.com/mrjbq7/factor 2010-07-26 15:10:50 -04:00
John Benediktsson 3fd8bd6649 math.combinatorics: improve all-subsets and selections words. 2010-07-26 08:12:36 -07:00
Slava Pestov 7fe6721993 math.matrices: move normal word from gpu.demos.bunny and reverse sign 2010-07-23 20:41:08 -07:00
Slava Pestov cf6b910c9f alien.data: remove second quotation parameter from with-out-parameters, now all values are copied properly and calling 'clone' on structs in this quotation is not necessary 2010-07-16 17:32:05 -04:00
Joe Groff f3174e9ad0 math.combinatorics: all-subsets and selections words (contributed by John Benediktsson) 2010-07-14 09:10:51 -07:00
Joe Groff ba34aaf4e9 math.polynomials: unclip drop => rest 2010-07-05 20:53:24 -07:00
Joe Groff c9ecf3462d math.polynomials: update pdiff for no-integers-as-sequences (reported by rswarbrick) 2010-07-04 09:23:43 -07:00
Joe Groff bac801ef27 math.quaternions: typo in n*q 2010-06-17 19:23:52 -07:00
Joe Groff 19727f8ca5 math.vectors.simd.cords: add regression test for >A 2010-06-15 22:44:15 -07:00
Joe Groff 1f6070d48c math.vectors.simd.cords: use head-slice/tail-slice to slice up input sequences for >A op so that e.g. float-4{ ... } >double-4 works 2010-06-15 21:55:26 -07:00
Slava Pestov ea6f0066e3 Merge branch 'for-slava' of git://git.rfc1149.net/factor 2010-06-11 20:10:07 -04:00
Slava Pestov f16e660805 mirrors: rename enumerated-sequence to inspected-sequence 2010-06-11 17:14:15 -04:00
Samuel Tardieu 3685a22c62 Fix "primes-between" and "primes-upto" with pathological bounds.
"primes-between" was buggy when bounds were given in the wrong order
or when the high bound was smaller than 3.
2010-06-11 16:07:52 +02:00
Joe Groff 45e635fa4e math.vectors.simd.intrinsics: use unrolled loops for some software fallbacks 2010-05-24 18:39:06 -07:00
Joe Groff 7027838fda math.vectors.simd.intrinsics: remove call( -- ) wrapper from fallbacks 2010-05-24 12:58:14 -07:00
Joe Groff bceec9daeb math.vectors.simd.intrinsics: use <direct-X-array> instead of X-array-cast to construct view over fallback byte-arrays to avoid redundant array size checking 2010-05-23 23:18:02 -07:00
Joe Groff 9977f66c01 math.vectors.simd.intrinsics: wrap intrinsic fallback bodies in call( -- ) so we can abuse macros in their normally-inlined bodies 2010-05-23 22:39:44 -07:00
Slava Pestov b8ec5c6176 Stack allocation improvements
- New with-out-parameters combinator
- Inhibit tail call optimization in frames with local allocation, to ensure that passing a stack allocated value to the last word in the quotation works
- local allocations are now aligned properly
- spill slots are now aligned properly aligned in frames which have parameter and local allocation areas
2010-05-22 02:37:00 -04:00