Joe Groff
e705470d42
make public words for querying current rounding mode, denormal mode, and trap set
2009-09-06 08:50:54 -05:00
Joe Groff
96db254311
unit tests for math.floats.env
2009-09-06 07:50:56 -05:00
Joe Groff
36ec53a968
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
Joe Groff
ccb27f81ea
update math.blas for <c-array> change
2009-08-30 22:37:58 -05:00
Slava Pestov
ec70e1d714
More minor documentation tweaks
2009-08-30 06:32:20 -05:00
Slava Pestov
7983b5515f
math.functions: some fixes
2009-08-30 06:19:14 -05:00
Slava Pestov
0db01f6d5f
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
2d4ba8de4d
Merge branch 'master' of git://factorcode.org/git/factor
2009-08-30 17:31:30 +09:00
Marc Fauconneau
bf15648b4d
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
e5897d52b2
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
2bb6293217
compiler: add fixnum-min/max intrinsics; ~10% speedup on benchmark.yuv-to-rgb
2009-08-28 19:02:59 -05:00
Slava Pestov
d957ae4e44
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
0df8aadce2
cpu.x86: use SQRTSD instruction for math.libm:fsqrt word
2009-08-25 23:22:15 -05:00
Slava Pestov
f82627e736
math.intervals: comment out questionable unit tests
2009-08-22 19:39:32 -05:00
Slava Pestov
81b72cb5c5
Add some unit tests
2009-08-22 17:15:10 -05:00
Slava Pestov
770429a629
math.intervals: help lint fix
2009-08-19 16:08:52 -05:00
Slava Pestov
2bc38bf019
math.intervals: tighter interval arithmetic for intervals with infinities
2009-08-19 02:32:18 -05:00
Slava Pestov
030b1b816c
Add inline declarations for various assorted methods
2009-08-17 22:32:21 -05:00
Doug Coleman
7c92ab1ea5
move if-zero etc to math, remove 1-/1+ from math
2009-08-14 14:27:23 -05:00
Doug Coleman
3f3d57032b
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
0df4436711
Merge branch 'master' of git://factorcode.org/git/factor
2009-08-12 03:26:13 -05:00
Slava Pestov
4ecf5a904a
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
14e8abd563
even better error handling for division by zero
2009-08-11 22:30:16 -05:00
Doug Coleman
02becc26fc
add docs for if-zero etc, add docs for 10^
2009-08-11 18:45:01 -05:00
Doug Coleman
c12d6fe543
Merge branch 'master' of git://factorcode.org/git/factor
2009-08-11 18:16:30 -05:00
Doug Coleman
4a3d63e00a
use if-zero in a few more places
2009-08-11 18:15:53 -05:00
Doug Coleman
4fef246ca4
add 10^ to math.functions and update usages
2009-08-11 18:00:24 -05:00
Slava Pestov
7bfbb0c5ac
math.intervals: fix interval-rem
2009-08-11 16:49:28 -05:00
Slava Pestov
7e35723db0
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
d19c403fee
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
1cb0f3370b
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
e400d80d8b
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
61ea749bb6
More accurate interval-mod and interval-rem
2009-08-08 22:01:12 -05:00
Doug Coleman
78bbf96a6d
move signed-le> to io.binary, clean up using list for math.bitwise
2009-07-23 15:54:57 -05:00
Joe Groff
809b40d497
preserve sequence type in math.matrices:cross
2009-07-07 16:26:50 -05:00
Joe Groff
96ec54106b
for the FPS classicists... skew matrix constructor
2009-07-04 19:13:31 -05:00
Joe Groff
e39f454aa5
common 3d matrix constructors
2009-07-02 19:05:24 -05:00
Slava Pestov
612e4b99b0
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
4d5392fe56
Add divisors to math.primes.factors
2009-06-29 16:56:00 +02:00
Samuel Tardieu
094c82c50b
Short circuit trivial composites
2009-06-24 15:53:50 +02:00
Samuel Tardieu
50191588e4
Get rid of vector reallocation by preallocating it
2009-06-24 15:53:46 +02:00
Samuel Tardieu
29b5a1dff5
Add extra tests for math.primes
2009-06-24 13:15:13 +02:00
Samuel Tardieu
41d804ddbd
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
037ed45339
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
76b3e5fea2
win32 support for window-controls
2009-06-18 11:41:34 -05:00
prunedtree
9ffbf32c6f
unit test for m^n
2009-06-12 01:35:25 -07:00
prunedtree
b426f28738
make m^n private
2009-06-12 01:29:34 -07:00
Doug Coleman
6a67f02f69
fix load error
2009-06-12 02:43:05 -05:00
Doug Coleman
7134236e46
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
a2640672d7
«0.0 1.0 ^» was returning 0 instead of 0.0
2009-06-11 17:47:52 -05:00