Doug Coleman
c10b6d4ba7
Merge branch 'docs' of git://github.com/klazuka/factor into klazuka
...
Conflicts:
basis/math/vectors/vectors-docs.factor
2009-10-02 15:58:45 -05:00
Joe Groff
271e6ddde5
give math.vectors shuffle words their own docs subsection in anticipation of having more ops in there
2009-10-02 15:37:49 -05:00
Joe Groff
147a73441f
proofreading math.vectors docs
2009-10-02 15:18:42 -05:00
Joe Groff
a4f8f87a21
add notes to math.vectors docs about simd booleans
2009-10-02 15:11:06 -05:00
Joe Groff
e153d544eb
implement vand, vor, vandn, and vxor as bitwise intrinsics for simd types
2009-10-02 14:17:01 -05:00
Keith Lazuka
8f79ea91ba
docs: change $subsection to $subsections
2009-10-02 12:15:48 -04:00
Joe Groff
34eb7a9286
change vector logical words to reuse the input sequence types so that they work as simd fallbacks
2009-10-01 23:49:53 -05:00
Joe Groff
0bc690e749
define simd equal? methods as v= vall?
2009-10-01 23:46:37 -05:00
Joe Groff
9d424a1092
Merge branch 'master' of git://factorcode.org/git/factor
...
Conflicts:
basis/compiler/codegen/codegen.factor
2009-10-01 23:14:16 -05:00
Joe Groff
c08cc860bf
create special intrinsic wrappers for 256-vector>scalar operations so that vall?, vany?, vnone? work on 256-vectors
2009-10-01 23:07:10 -05:00
Joe Groff
aaeaa9c506
add tests for v=, vany?, vall?, vnone?
2009-10-01 21:24:14 -05:00
Joe Groff
228ad950bb
%test-vector instruction for vany?, vall?, vnone?
2009-10-01 15:35:38 -05:00
Joe Groff
94070c11aa
%compare-vector instruction (only does v= for now)
2009-10-01 14:31:37 -05:00
Joe Groff
2303c0107e
add software vall?, vany?, vnone? words
2009-10-01 13:21:10 -05:00
Slava Pestov
16d08c01e3
math.vectors.simd.functor: don't open-code simd-nth and simd-with if we cannot generate double precision FP code. Should fix illegal instruction trap on CPUs with only SSE1
2009-10-01 07:36:50 -05:00
Joe Groff
ef9abec15a
write v? and vmask in terms of bitwise ops
2009-10-01 00:09:25 -05:00
Joe Groff
3ba79be651
Revert "add a %blend-vector intrinsic for v?"
...
This reverts commit 21e4b28b67 .
2009-09-30 23:40:37 -05:00
Joe Groff
37a091a188
Merge branch 'master' of git://factorcode.org/git/factor
2009-09-30 23:04:04 -05:00
Joe Groff
21e4b28b67
add a %blend-vector intrinsic for v?
2009-09-30 23:03:59 -05:00
Slava Pestov
65421b111b
math.vectors.simd: use fallbacks for hlshift, hrshift, vshuffle if parameter is not a literal;al; element access in int-4 on x86-64 now sign-extends the value; don't throw error at compile time if parameter for vshuffle does not have enough elements
2009-09-30 20:04:37 -05:00
Joe Groff
36918a03d9
accept f and t as elements of literal simd vectors, storing binary all-zeroes or all-ones
2009-09-30 19:04:02 -05:00
Joe Groff
d065203df4
break math.vectors docs into subsections
2009-09-30 13:21:25 -05:00
Joe Groff
ddcbdae778
Merge branch 'master' of git://factorcode.org/git/factor
2009-09-30 00:07:45 -05:00
Joe Groff
f38107c4cd
docs for new math.vectors logical ops
2009-09-30 00:07:37 -05:00
Slava Pestov
14e82bcd7a
math.vectors.simd: fix bad comparison logic in unit tests
2009-09-29 23:46:21 -05:00
Slava Pestov
f1ce5ca191
math.functions: ~ now raises an invalid operation FP trap if one of the inputs is NaN
2009-09-29 23:41:08 -05:00
Slava Pestov
88d1488f1f
Merge branch 'master' of git://factorcode.org/git/factor
2009-09-29 22:59:58 -05:00
Slava Pestov
1c8662ce4a
math.vectors.simd: add vbroadcast intrinsic, fix integer overflow issues
2009-09-29 22:58:20 -05:00
Joe Groff
f6bf60ec4e
math.matrices.simd versions of frustum-matrix4 and rotation-matrix4
2009-09-29 22:54:11 -05:00
Joe Groff
3c497cd2b8
add a "vmask" vector op to selectively zero out elements
2009-09-29 18:10:36 -05:00
Slava Pestov
2b13245704
math.vectors.simd: add fast intrinsic for 'nth', replace broadcast primitive with shuffles
2009-09-29 04:48:11 -05:00
Slava Pestov
a6e8277b2c
math.vectors.simd: add vshuffle intrinsic
2009-09-28 23:12:13 -05:00
Slava Pestov
db217295b0
Work in progress
2009-09-28 17:31:34 -05:00
Slava Pestov
e8243f7504
Fix some load errors in various places
2009-09-28 16:33:39 -05:00
Slava Pestov
f08521bf83
Fixing various test failures caused by C type parser change, and clarify C type docs some more
2009-09-28 08:48:39 -05:00
Slava Pestov
1109fb5725
math.vectors.simd: add intrinsic for int-4-boa, uint-4-boa, fix tests for C type parser change, fix software fallback for horizontal shifts
2009-09-28 06:34:22 -05:00
Slava Pestov
4df307fdae
Merge branch 'master' of git://factorcode.org/git/factor
2009-09-28 02:19:05 -05:00
Slava Pestov
10c5fe5933
math.vectors.simd: add hlshift, hrshift (128-bit shift), vbitandn intrinsics
2009-09-28 02:17:46 -05:00
Joe Groff
ebaa9d1dd7
Merge branch 'master' of git://factorcode.org/git/factor
2009-09-27 22:21:42 -05:00
Joe Groff
e8cefe07b3
take a shot at making other platform vocabs c-type-string-free
2009-09-27 19:25:34 -05:00
Slava Pestov
23ec1b85e8
Merge branch 'master' of git://factorcode.org/git/factor
2009-09-27 17:18:16 -05:00
Slava Pestov
31cb338fc9
math.vectors.simd: add *-cast words for converting between representations
2009-09-27 17:18:02 -05:00
Joe Groff
ac2f3763e0
update vocabs so a load-all on macosx works without parsing c-type strings
2009-09-27 15:11:21 -05:00
Joe Groff
4035bf88a1
software implementations of vector logical ops (vand, vor, vxor, vnot, v</=/>, vunordered?, v?)
2009-09-27 13:19:22 -05:00
Slava Pestov
be214f9142
math.vectors: remove special handling for negative shifts, now we just say the behavior of vlshift and vrshift with negative shifts is undefined
2009-09-26 02:26:31 -05:00
Slava Pestov
26c83d262c
math.vectors: fix SIMD unit tests
2009-09-25 21:44:14 -05:00
Slava Pestov
d518bed6b7
math.vectors: change vlshift and vrshift to mask the shift count by HEX: ff, to make them behave consistently with their SIMD counterparts
2009-09-25 18:50:44 -05:00
Slava Pestov
e5b94b11d7
Some fixes and cleanups in math.vectors
...
- Tighten up type inference for operations on complex float arrays
- Fix v. to have correct behavior with complex numbers
- Rename v<< and v>> to vlshift and vrshift to avoid clashing with v>> accessor
2009-09-24 06:58:33 -05:00
Slava Pestov
24039cb56a
math.vectors.simd: add v<< and v>> intrinsics for bitwise shifts on elements
2009-09-24 03:32:39 -05:00
Slava Pestov
eb5d30e724
Fix conflict
2009-09-23 20:52:04 -05:00
Slava Pestov
165496d2f2
Add longlong-2, ulonglong-2, longlong-4, ulonglong-4 SIMD types, fix int-4 multiplication on SSE2
2009-09-23 20:23:25 -05:00
Doug Coleman
ebbcfd7ffc
fix using
2009-09-23 12:47:20 -05:00
Doug Coleman
abb8a221db
Merge branch 'master' of git://factorcode.org/git/factor
...
Conflicts:
basis/math/vectors/simd/simd-docs.factor
2009-09-23 10:11:49 -05:00
Slava Pestov
7cc383614c
math.vectors.simd: Improved documentation
2009-09-23 03:14:06 -05:00
Slava Pestov
8d84bcb61a
math and math.vectors: improved documentation
2009-09-23 03:08:45 -05:00
Slava Pestov
abac963882
math.vectors.simd: new operations: vabs vsqrt vbitand vbitor vbitxor
2009-09-23 02:47:14 -05:00
Slava Pestov
863ccb61d6
math.vectors.simd: fix all tests
2009-09-23 01:05:19 -05:00
Keith Lazuka
293b9704d2
docs: updated some docs to use new markup
2009-09-22 15:22:34 -04:00
Doug Coleman
28e5a27c3f
Merge branch 'master' of git://factorcode.org/git/factor
...
Conflicts:
core/generic/generic-tests.factor
2009-09-22 10:25:42 -05:00
Slava Pestov
8c2f5543cc
Merge branch 'master' into integer-simd
2009-09-22 03:24:52 -05:00
Slava Pestov
3a4465f6ae
math.functions: fix ~ with negative (relative) tolerance
2009-09-22 03:19:47 -05:00
Doug Coleman
e8502d1ebc
Merge branch 'master' of git://factorcode.org/git/factor
2009-09-21 17:59:48 -05:00
Slava Pestov
e6cddf1fa7
Merge branch 'master' of git://factorcode.org/git/factor into integer-simd
2009-09-21 17:58:24 -05:00
Slava Pestov
85c916fedc
Rename specific-method to method-for-class, rename (effective-method) to method-for-object, and make both much faster
2009-09-21 17:42:20 -05:00
Slava Pestov
66871995c9
math.vectors.simd: add saturated arithmetic operations
2009-09-20 23:16:02 -05:00
Doug Coleman
026761ed62
Merge branch 'master' of git://factorcode.org/git/factor
...
Conflicts:
basis/classes/struct/struct-tests.factor
basis/functors/functors-tests.factor
basis/specialized-arrays/specialized-arrays-tests.factor
2009-09-20 23:02:49 -05:00
Doug Coleman
47fab85a00
replace usages of <" with """
2009-09-20 22:42:40 -05:00
Slava Pestov
78c949b9b7
math.vectors: add v+- word which is accelerated by SSE3
2009-09-20 17:43:16 -05:00
Slava Pestov
dfb43bd2ca
More integer SIMD work
...
- move generated vocab support from specialized-arrays to vocabs.generated
- add fuzz testing to math.vectors.simd
- add alien type support for integer SIMD vectors
- SIMD: parsing word generates a SIMD type, instead of pre-generating them all in math.vectors.simd
2009-09-20 16:48:17 -05:00
Slava Pestov
ea2bcd69c7
math.vectors.simd: redesign to be more flexible, integer SIMD work in progress
2009-09-20 02:08:32 -05:00
Joe Groff
4a1422e7fe
move some allocation words that don't really have much to do with c types out of alien.c-types into a new alien.data vocab
2009-09-17 22:36:05 -05:00
Joe Groff
21a0722752
fix more ambiguities
2009-09-17 09:29:23 -05:00
Joe Groff
9fbdfc9a54
fix "float" ambiguities in math.blas, opengl vocabs
2009-09-16 21:25:46 -05:00
Joe Groff
334e93bbbf
get things to a point where they bootstrap again
2009-09-15 21:43:18 -05:00
Slava Pestov
ef353b5eff
math: minor doc fixes
2009-09-15 15:42:46 -05:00
Slava Pestov
1b5614f974
math.functions: more accurate log10 (fixes problem reported by OneEyed)
2009-09-14 16:19:58 -05:00
Joe Groff
eadf1bc9d5
missed a few PPC status bits that needed clearing
2009-09-14 15:17:36 -05:00
Joe Groff
016caed095
vm-error>exception-flags word to extract exception flag information from a trap exception
2009-09-14 14:10:51 -05:00
Slava Pestov
6c3ef91642
Merge branch 'master' of git://factorcode.org/git/factor
2009-09-14 02:39:24 -05:00
Slava Pestov
cab8638ab5
math.floats.env: Fix linux x86.64 some more
2009-09-14 02:39:12 -05:00
Joe Groff
4c16765f29
Merge branch 'master' of git://factorcode.org/git/factor
2009-09-13 23:40:58 -05:00
Joe Groff
0284a4b6f8
save the FP status out of the signal context and use it as part of the fp trap factor exception. clear the FP status before continuing after an exception
2009-09-13 23:39:12 -05:00
Slava Pestov
8385bac126
math.floats.env: modify tests to take buggy Linux/x86-64 pow() into account
2009-09-13 23:26:09 -05:00
Slava Pestov
5de5f5e430
math.functions: loosen tests up a bit since exp(1) on FreeBSD x86/64 differs from e in the last bit
2009-09-13 22:33:12 -05:00
Slava Pestov
db9b2897dd
math.floats.env: fix compiled trap unit tests
2009-09-13 18:22:49 -05:00
Slava Pestov
b6e3336e02
Merge branch 'master' of git://factorcode.org/git/factor
2009-09-13 00:09:09 -05:00
Slava Pestov
bdcc6ec66e
typos in altivec env
2009-09-12 22:30:11 -05:00
Slava Pestov
427bfb4ab8
math: add unordered comparison operators u< u<= u> u>= which behave exactly like < <= > >= except no floating point exceptions are set if one or both inputs are NaNs; also add efficient intrinsic for unordered? predicate, and fix propagation type functions for abs, absq, and bitnot
2009-09-12 22:20:13 -05:00
Joe Groff
1a19221159
set altivec denormal flag when with-denormal-mode is used
2009-09-12 20:39:41 -05:00
Joe Groff
da55501094
Merge branch 'master' of git://factorcode.org/git/factor
2009-09-12 19:45:47 -05:00
Joe Groff
95d5697792
all-fp-exceptions constant
2009-09-12 18:13:25 -05:00
Slava Pestov
e6c551a652
math.order: better docs
2009-09-12 16:33:42 -05:00
Slava Pestov
a094d27edf
math.floats.env.ppc: fix ppc-fp-traps>bit
2009-09-12 12:57:15 -05:00
Slava Pestov
6191072712
math.floats.env.ppc: fix ppc-fp-traps-bits
2009-09-12 12:49:51 -05:00
Joe Groff
78d747fa59
Merge branch 'master' of git://factorcode.org/git/factor
2009-09-12 09:04:53 -05:00
Joe Groff
a0f39d2235
typos in math.floats.env.ppc
2009-09-12 09:03:27 -05:00
Slava Pestov
18cb09a115
math.vectors.simd: don't run x86-specific tests on PPC
2009-09-11 21:38:40 -05:00
Joe Groff
be3f7824ed
typo
2009-09-11 20:31:06 -05:00
Joe Groff
c31791d470
log1+ word (maps to C99 log1p function)
2009-09-11 20:28:15 -05:00
Slava Pestov
1a0d9efa0f
Merge branch 'for-slava' of git://git.rfc1149.net/factor
2009-09-10 13:15:18 -05:00
Joe Groff
1a209d4ddb
Merge branch 'master' of git://factorcode.org/git/factor
2009-09-09 23:38:01 -05:00
Joe Groff
4d5e547ba9
take the union of the x87 and sse exception flags when reporting fp-exception-flags. add back the unit tests i took out since this should fix the problem
2009-09-09 23:37:48 -05:00
Slava Pestov
527db8995a
Specialized array overhaul
...
- Replace hand-written specialized-arrays.* subvocabularies with new system; instead of USE:ing specialized-arrays.T, do SPECIALIZED-ARRAY: T
- Ditto for specialized-vectors; use SPECIALIZED-VECTOR:
- io.mmap.functor: removed entirely, use <mapped-array> instead
- struct-arrays and struct-vectors have been removed because specialized arrays and vectors subsume them entirely
2009-09-09 22:33:34 -05:00
Joe Groff
2a576f370b
change math.floats.env tests not to use any libm functions, which don't reliably set the right hardware exceptions on linux glibc
2009-09-09 18:00:38 -05:00
Joe Groff
3c9b2c327a
make math.floats.env backends unportable
2009-09-09 17:32:26 -05:00
Samuel Tardieu
5919ee8a79
Do not repeat sanity tests at each iteration
2009-09-09 21:35:24 +02:00
Joe Groff
8fff76fce2
add some tests to help track down leaks in FP state changes
2009-09-08 23:07:33 -05:00
Slava Pestov
3e90786bc1
Fix various test failures
2009-09-08 19:18:56 -05:00
Slava Pestov
3845472832
math.rectangles.positioning: don't position popups off-screen
2009-09-08 16:23:02 -05:00
Joe Groff
aaa394fedd
update math.floats.env.x86 for sse detection change
2009-09-08 15:47:03 -05:00
Joe Groff
e1841cc8d4
Merge branch 'master' of git://factorcode.org/git/factor
2009-09-08 15:37:32 -05:00
Joe Groff
4f43af5b7d
factor out x86 and ppc backends for math.floats.env; update both x87 and SSE state on x86
2009-09-08 15:36:53 -05:00
Slava Pestov
0d01371baf
math.vectors.simd: fix help rendering
2009-09-08 14:49:27 -05:00
Slava Pestov
c23e1dc1de
math.vectors.simd: remove useless dependency
2009-09-08 13:55:56 -05:00
Slava Pestov
ab64d187c9
Merge branch 'master' into simd
2009-09-08 13:38:14 -05:00
Slava Pestov
1e9f870e66
math.vectors.specialization: specialized vector words are now subwords of the generic vector word. This ensures that specializations get compiled correctly in all cases
2009-09-08 13:37:25 -05:00
Slava Pestov
3ac777e237
Merge branch 'for-slava' of git://git.rfc1149.net/factor
2009-09-08 13:09:27 -05:00
Slava Pestov
853c94cbaa
Merge branch 'for-slava' of git://git.rfc1149.net/factor into simd
2009-09-08 13:02:00 -05:00
Slava Pestov
ef09991500
Fixes
2009-09-08 00:13:18 -05:00
Slava Pestov
17821626c3
Fix conflicts
2009-09-07 23:51:25 -05:00
Joe Groff
95e8b7bd19
tighten up math.floats.env docs
2009-09-07 10:50:40 -05:00
Joe Groff
11a8d2d71a
test fp traps
2009-09-06 09:04:46 -05:00
Joe Groff
fbd9e02917
make public words for querying current rounding mode, denormal mode, and trap set
2009-09-06 08:50:54 -05:00
Joe Groff
1d36bba11b
unit tests for math.floats.env
2009-09-06 07:50:56 -05:00
Joe Groff
327c9eb7b8
math.floats.env vocab with words to control the floating-point environment
...
add some functions to the VM to grab and set the fpu control register
2009-09-05 19:48:13 -05:00
Slava Pestov
430f4a83f9
specialized-arrays.direct is no more; instead, every specialized-array.<foo> vocabulary has a <direct-T-array> constructor
2009-09-04 22:01:55 -05:00
Slava Pestov
1c87486320
math.vectors.simd: allow punning SIMD vectors between types
2009-09-04 02:35:58 -05:00
Slava Pestov
136d6a42f3
math.vectors.simd: slightly faster 'sum' on 256-bit vectors: add the two components then do horizontal add, instead of doing a horizontal add on each one and adding the results
2009-09-04 02:23:25 -05:00
Slava Pestov
af14fd78dd
math.vectors.simd: docs
2009-09-04 01:22:18 -05:00
Slava Pestov
fc195f33f1
functors: support private words with DEFINES-PRIVATE; use this to make some words generated by math.vectors.simd.functor private
2009-09-04 01:21:59 -05:00
Slava Pestov
698f32c4a1
math.vectors.simd: define fallbacks for all vector constructors so that code can still work even if SIMD is not available
2009-09-03 21:37:55 -05:00
Slava Pestov
20dfbf7ac8
More SIMD work
...
- Rename SIMD types and register representations: <type>-<count> rather than <count><type>-array
- Make a functor to define 256-bit vector types, use it to define float-8 type
- Make SIMD instructions pure-insns so that they participate in value numbering
2009-09-03 20:58:56 -05:00
Slava Pestov
9cc705f6ba
math.vectors.simd: split off intrinsics into a sub-vocabulary, to avoid loading most of the SIMD code on bootstrap
2009-09-03 03:43:43 -05:00
Slava Pestov
f811208271
Detect SSE version and enable the correct set of SIMD intrinsics
2009-09-03 03:28:38 -05:00
Slava Pestov
52b99c050e
Initial implementation of SSE vector intrinsics:
...
- cpu.architecture: add SSE vector representations
- compiler.cfg.intrinsics.alien: remove an attempt at optimization that value numbering handles now
- compiler.cfg.representations: support instructions where the representation is set in the 'rep' slot, and support conversions between single and double floats
- alien-float, set-alien-float now use the single float representation, and the conversion is implicit; this fixes a long-standing bug where a register could get clobbered because of how %set-alien-float was defined on x86
- math.vectors.specialization: add support for SIMD specialization (where the vector word's body is replaced by another quotation), also specialize the 'sum' word
- math.vectors.simd: 4float-array, 2double-array, 4double-array types, and specializers for the math.vectors words
2009-09-03 02:33:07 -05:00
Slava Pestov
9c3214ad98
math.constants: add single float epsilon value
2009-09-03 02:23:22 -05:00
Samuel Tardieu
0c76719312
Make "divisors" work with 1 as well
2009-09-02 12:07:23 +02:00
Joe Groff
d79cc05d6b
update math.blas for <c-array> change
2009-08-30 22:37:58 -05:00
Slava Pestov
24e2f087ea
More minor documentation tweaks
2009-08-30 06:32:20 -05:00
Slava Pestov
c19ec4b8ec
math.functions: some fixes
2009-08-30 06:19:14 -05:00
Slava Pestov
f6a836d1e9
compiler.cfg.linear-scan now supports partial sync-points where all registers are spilled; taking advantage of this, there are new trigonometric intrinsics which yield a 2x performance boost on benchmark.struct-arrays and a 25% boost on benchmark.partial-sums
2009-08-30 04:52:01 -05:00
Marc Fauconneau
a7a39d3766
Merge branch 'master' of git://factorcode.org/git/factor
2009-08-30 17:31:30 +09:00
Marc Fauconneau
1f020f8bad
Merge branch 'master' of git@github.com:prunedtree/factor
...
Conflicts:
basis/math/matrices/matrices.factor
2009-08-30 17:24:25 +09:00
Samuel Tardieu
48ef66e45c
Ensure that random-prime result has the right size
...
As noted by Slava, choosing the next prime following a random number
with a specified number of bits may give a number one more bit long.
2009-08-29 21:42:15 +02:00
Slava Pestov
f30aa5d20e
compiler: add fixnum-min/max intrinsics; ~10% speedup on benchmark.yuv-to-rgb
2009-08-28 19:02:59 -05:00
Slava Pestov
99bf9fadfb
Performance improvements to make struct-arrays benchmark faster
...
- improved optimization of ##unbox-any-c-ptr on ##box-displaced-alien; convert it to ##unbox-c-ptr where possible using class info stored in the ##bda instruction
- make fcos, fsin, etc inline again; everything in math.libm inline again, except for fsqrt which is an intrinsic
- convert min and max on floats to float-min and float-max
- make min and max not inline, so that the above can work
- struct-arrays: rice a bit so that more fixnums come up
2009-08-28 05:21:16 -05:00
Slava Pestov
4fe0257169
cpu.x86: use SQRTSD instruction for math.libm:fsqrt word
2009-08-25 23:22:15 -05:00
Slava Pestov
2d5200ae84
math.intervals: comment out questionable unit tests
2009-08-22 19:39:32 -05:00
Slava Pestov
009d3a87f6
Add some unit tests
2009-08-22 17:15:10 -05:00
Slava Pestov
5d3533bc93
math.intervals: help lint fix
2009-08-19 16:08:52 -05:00
Slava Pestov
4b53916a12
math.intervals: tighter interval arithmetic for intervals with infinities
2009-08-19 02:32:18 -05:00
Slava Pestov
bee6fa641e
Add inline declarations for various assorted methods
2009-08-17 22:32:21 -05:00
Doug Coleman
7c3824639e
move if-zero etc to math, remove 1-/1+ from math
2009-08-14 14:27:23 -05:00
Doug Coleman
d1ce837569
Delete empty unit tests files, remove 1- and 1+, reorder IN: lines in a lot of places, minor refactoring
2009-08-13 19:21:44 -05:00
Slava Pestov
12880cef55
Merge branch 'master' of git://factorcode.org/git/factor
2009-08-12 03:26:13 -05:00
Slava Pestov
6f2170eb02
More accurate wrap-interval in compiler.tree.propagation.info fixes test regression; constructing an interval with endpoints at infinity now outputs full-interval
2009-08-12 03:25:53 -05:00
Doug Coleman
6a62b2b09a
even better error handling for division by zero
2009-08-11 22:30:16 -05:00
Doug Coleman
aa71f27094
add docs for if-zero etc, add docs for 10^
2009-08-11 18:45:01 -05:00
Doug Coleman
b5818bd284
Merge branch 'master' of git://factorcode.org/git/factor
2009-08-11 18:16:30 -05:00
Doug Coleman
e1bdd33156
use if-zero in a few more places
2009-08-11 18:15:53 -05:00
Doug Coleman
9e0caf641b
add 10^ to math.functions and update usages
2009-08-11 18:00:24 -05:00
Slava Pestov
88f28a7245
math.intervals: fix interval-rem
2009-08-11 16:49:28 -05:00
Slava Pestov
7956e63fc2
compiler.tree.propagation: be more careful with intervals, ensuring that the inferred interval of a value is a subset of the value class's interval. This improves accuracy, for example [ >fixnum 1 + >fixnum most-positive-fixnum <= ] constant-folds to true
2009-08-10 01:16:49 -05:00
Slava Pestov
f45d80374c
alien.structs: struct-type now has a class slot; fix specialized complex-float/double arrays
2009-08-09 16:10:11 -05:00
Slava Pestov
9b4ffd65d3
math.vectors.specialization: first attempt at some call site splitting for vector ops. Specialized array types generate customized variants of all vector words, if input types are known at compile time, a call to the specialized version is inserted
2009-08-09 03:07:33 -05:00
Slava Pestov
638f5b6579
More accurate interval inference for mod, rem, and propagation can now infer intervals in the case where a value might be f. so, [ [ 127 bitand ] [ drop f ] if dup [ 0 >= ] [ not ] if ] now constant-folds down to 't'!
2009-08-08 23:03:45 -05:00
Slava Pestov
26531ddf8b
More accurate interval-mod and interval-rem
2009-08-08 22:01:12 -05:00
Doug Coleman
3de64c4053
move signed-le> to io.binary, clean up using list for math.bitwise
2009-07-23 15:54:57 -05:00
Joe Groff
2c97868525
preserve sequence type in math.matrices:cross
2009-07-07 16:26:50 -05:00
Joe Groff
5c25c4ff81
for the FPS classicists... skew matrix constructor
2009-07-04 19:13:31 -05:00
Joe Groff
f644140d3d
common 3d matrix constructors
2009-07-02 19:05:24 -05:00
Slava Pestov
189043eae7
compiler.cfg.linear-scan.assignment: insert-copy did the wrong thing if the second interval had been split. Fixes compilation of 'trilerp'
2009-06-30 21:07:39 -05:00
Samuel Tardieu
9b1796cd26
Add divisors to math.primes.factors
2009-06-29 16:56:00 +02:00
Samuel Tardieu
f51bc7a12b
Short circuit trivial composites
2009-06-24 15:53:50 +02:00
Samuel Tardieu
575cd8e4ab
Get rid of vector reallocation by preallocating it
2009-06-24 15:53:46 +02:00
Samuel Tardieu
8317be8135
Add extra tests for math.primes
2009-06-24 13:15:13 +02:00
Samuel Tardieu
0fef7b94c4
Pack primes numbers by slices of 30
...
In any given 30 successive integers greater than 5, there are at most
8 prime numbers. Use this to tightly pack the result of the Eratostene
sieve. This lets us store more prime numbers than before in less space.
2009-06-24 13:15:12 +02:00
Joe Groff
c58a302d7e
give range models a step parameter; use it on sliders so the thumb can step by any interval
2009-06-18 20:57:02 -05:00
Joe Groff
62ed8d1404
win32 support for window-controls
2009-06-18 11:41:34 -05:00
prunedtree
032820a0e8
unit test for m^n
2009-06-12 01:35:25 -07:00
prunedtree
4a43b875f2
make m^n private
2009-06-12 01:29:34 -07:00
Doug Coleman
ecfea47fd5
fix load error
2009-06-12 02:43:05 -05:00
Doug Coleman
56c9302dbc
Merge branch 'master' of git://github.com/prunedtree/factor
...
Conflicts:
basis/compression/inflate/inflate.factor
basis/math/matrices/matrices.factor
2009-06-12 02:33:49 -05:00
Joe Groff
ed10661c30
«0.0 1.0 ^» was returning 0 instead of 0.0
2009-06-11 17:47:52 -05:00
Doug Coleman
a7845cf25a
better implementation of zero-matrix
2009-06-07 20:12:18 -04:00
prunedtree
c604dacc3e
m^n binary exponentiation of matrices
2009-06-04 20:42:29 -07:00
Daniel Ehrenberg
764cc81abf
unbits word in math.bits vocab
2009-06-01 22:39:02 -05:00
Slava Pestov
921de6ba3f
math.functions: fix ^ for complex numbers
2009-05-31 23:28:29 -05:00
Doug Coleman
d4cf0148ac
remove whitespace
2009-05-25 21:25:56 -05:00
Doug Coleman
879dcf204c
remove clamp-to-range and associated words, update jamshred
2009-05-25 21:24:12 -05:00
Doug Coleman
8da9d0f203
rename peek -> last and update all usages
2009-05-25 16:38:33 -05:00
Doug Coleman
34e1d60578
add a clamp word to math.order, use clamp word throughout libraries
2009-05-24 21:35:50 -05:00
Doug Coleman
2e2dab011d
add a mode word
2009-05-24 15:45:25 -05:00
Joe Groff
23ae3f4ab6
homogeneous coordinates coated in nurbsauce
2009-05-21 20:55:44 -05:00
Joe Groff
4dba6979da
vector bilerp word
2009-05-20 10:26:55 -05:00
Doug Coleman
82fa71a03a
remove old median, fix docs
2009-05-18 02:41:58 -05:00
Doug Coleman
96ade23963
median used the wrong algorithm. now it runs in O(n) time. add kth-smallest word, used to implement median
2009-05-18 02:16:03 -05:00
Slava Pestov
ba04d5af1e
Update documentation for stricter vocabulary search path semantics
2009-05-16 00:29:21 -05:00
Doug Coleman
64215e6371
dont load safe primes in miller rabin tests
2009-05-10 14:08:03 -05:00
Doug Coleman
7a60ce161a
link to prime tests from prime docs
2009-05-10 14:01:21 -05:00
Doug Coleman
880e5bd03e
make a new vocabulary for safe primes
2009-05-10 13:49:40 -05:00
Doug Coleman
7dc1bc1fd0
more docs for math.primes, move words out of miller-rabin
2009-05-10 13:47:51 -05:00
Doug Coleman
ca0bd17a4b
add next-odd etc to math.bitwise
2009-05-10 13:42:41 -05:00
Doug Coleman
656212b619
add lucas-lehmer primality test
2009-05-10 12:59:35 -05:00
Doug Coleman
99a257a89e
update usages of miller-rabin
2009-05-10 12:24:43 -05:00
Doug Coleman
a09947f042
move math.miller-rabin to math.primes.miller-rabin
2009-05-10 12:24:19 -05:00
Doug Coleman
d5bf807d43
Merge branch 'master' of git://factorcode.org/git/factor
2009-05-10 12:19:39 -05:00
Joe Groff
0cf72f3a48
Merge branch 'master' of git://factorcode.org/git/factor
2009-05-10 10:44:10 -05:00
Joe Groff
1216ea2fd8
cut perlin-noise time in half
2009-05-10 10:41:50 -05:00
Slava Pestov
b86a419b6e
Eliminate prettyprinter dependency from UI
2009-05-09 20:24:17 -05:00
Doug Coleman
868e693977
64-bit add/subtract/multiply
2009-05-09 13:54:42 -05:00
Joe Groff
1d58b94bf7
send bilerp upstream to spawn
2009-05-09 11:43:04 -05:00
Slava Pestov
947c63fd93
math.combinatorics: fix unit test and help lint
2009-05-08 18:00:53 -05:00
Slava Pestov
194a8552a2
Merge branch 'master' of git://factorcode.org/git/factor
2009-05-08 16:27:36 -05:00
Joe Groff
226dd80ee1
Merge branch 'master' of git://factorcode.org/git/factor
2009-05-08 13:13:00 -07:00
Joe Groff
3a2a1a6a62
input grabbing support
2009-05-08 15:07:15 -05:00
Aaron Schaefer
495e4dbe60
Merge branch 'master' of git://factorcode.org/git/factor
...
Conflicts:
basis/math/miller-rabin/miller-rabin.factor
2009-05-07 22:20:53 -04:00
Slava Pestov
b70160088d
math.miller-rabin: make some utilities not private since math.primes uses them
2009-05-07 20:52:16 -05:00
Aaron Schaefer
9c69295b22
Speed up best-hands a bit using reduce and add a test
2009-05-07 21:23:58 -04:00
Aaron Schaefer
dd1769c744
Make next-odd public again as it's used elsewhere
2009-05-07 18:33:55 -04:00
Aaron Schaefer
ddd9de36a3
Merge branch 'master' of git://factorcode.org/git/factor
2009-05-07 16:44:15 -04:00
Doug Coleman
9d50574120
Merge branch 'master' of git://factorcode.org/git/factor
2009-05-07 13:09:45 -05:00
Slava Pestov
eb515af599
Code cleanups
2009-05-07 12:33:31 -05:00
Aaron Schaefer
1aa8ea8f37
Use iota where necessary in tests
2009-05-06 21:31:37 -04:00
Aaron Schaefer
b81e5c5610
Add docs for combination words
2009-05-06 21:27:04 -04:00
Aaron Schaefer
085b30337f
Use binary-search instead of find-last for combinations
2009-05-06 20:46:41 -04:00
Aaron Schaefer
88553ea262
Clean up combinations a bit
2009-05-06 20:18:21 -04:00
Aaron Schaefer
e8d1f86ccc
Add tests for combinations
2009-05-06 19:33:58 -04:00
Doug Coleman
abd35fad0b
Document miller-rabin, more unit tests for some corner cases
2009-05-06 16:26:06 -05:00
Doug Coleman
c0156d462e
fix miller-rabin
2009-05-06 14:10:29 -05:00
Joe Groff
15bc3625e8
Merge branch 'master' of git://factorcode.org/git/factor
2009-05-06 13:23:05 -05:00
Joe Groff
e6b01afe63
add 2pi constant
2009-05-06 12:38:14 -05:00
Joe Groff
58fd3a415f
make ^n foldable
2009-05-06 12:36:34 -05:00
Doug Coleman
a2a5129a84
fix miller-rabin, safe primes
2009-05-06 12:21:30 -05:00
Doug Coleman
92732f4c65
fix miller-rabin, it's correct but a little ugly still. bed time
2009-05-06 00:54:14 -05:00
Aaron Schaefer
647c831515
Combinations now map to input sequences directly
2009-05-06 01:17:35 -04:00
Doug Coleman
c2fe62f7d6
remove 1-, 1+, use iota somewhere
2009-05-05 23:32:23 -05:00
Doug Coleman
2184749f48
Merge branch 'master' of git://factorcode.org/git/factor
2009-05-05 23:26:58 -05:00
Doug Coleman
d39e5ffe93
_finally_ cleaned up miller-rabin. it's passable now
2009-05-05 23:25:26 -05:00
Joe Groff
e4c84a91f6
more vector operations; perlin noise vocab
2009-05-05 22:17:04 -05:00
Aaron Schaefer
2f6152de98
Add combination support to math.combinatorics
2009-05-05 22:43:07 -04:00
Joe Groff
8886437315
Merge branch 'master' of /cygdrive/z/Documents/Code/others/factor
2009-05-05 18:40:08 -07:00
Slava Pestov
66a3e1e565
math.polynomials: use <repetition> instead of <array>
2009-05-05 18:34:52 -05:00
Joe Groff
ca0c8937ca
lerp functions
2009-05-05 13:55:00 -05:00
Joe Groff
49674dc8ad
Merge branch 'master' of git://factorcode.org/git/factor
2009-04-30 21:36:54 -05:00
Slava Pestov
fc4894fbdf
Replace ratio and complex built-in types with tuples defined in the library. This frees up two lo-tags, so move array and quotation over to these tags and update compiler for new tags
2009-04-30 00:27:35 -05:00
Joe Groff
c3b63821b9
literal syntax for rects
2009-04-29 14:58:55 -05:00
Samuel Tardieu
18abc8b9f1
Add q+ and q- to math.quaternions
...
This makes the quaternions library self-contained and more independent
of the underlying representation.
2009-04-27 17:24:39 +02:00
Slava Pestov
66b4d42e13
math.blas: use gfortran by default on linux-x86-64 since latest ubuntu blas packages are compiled with gfortran abi
2009-04-25 17:03:50 -05:00
Slava Pestov
77c56e55a3
Oops
2009-04-23 03:57:05 -05:00