factor/basis/math
John Benediktsson e256a4ba18 math.intervals: workaround possible compiler bug by widening interval-bitor.
IN: scratchpad [
                   { byte-array } declare
                   [ 0 alien-unsigned-4 32 shift ]
                   [ 4 alien-unsigned-4 ] bi bitor
                   64 >signed
               ] optimized.

! working
[
    dup >R 0 alien-unsigned-4 32 fixnum-shift
    R> 4 alien-unsigned-4 over tag 0 eq?
    [ fixnum-bitor ] [ fixnum>bignum bignum-bitor ] if
    18446744073709551615 >R >bignum R> bignum-bitand
    dup 63 bignum-bit? [ 18446744073709551616 bignum- ] [ ] if
]

! broken
[
    dup >R 0 alien-unsigned-4 32 fixnum-shift
    R> 4 alien-unsigned-4 over tag 0 eq?
    [ fixnum-bitor ] [ fixnum>bignum bignum-bitor ] if
    dup 63 bignum-bit? [ 18446744073709551616 bignum- ] [ ] if
]

The second case correctly eliminates the bitand but incorrectly assumes
that the item on the stack (which is an integer -- either a fixnum or a
bignum), was converted to a bignum.
2019-10-31 10:45:54 -07:00
..
bits more test IN: cleanup. 2018-02-25 15:44:16 -08:00
bitwise math.bitwise: add >signed to docs next to >even, >odd. 2018-01-23 15:37:21 -08:00
combinatorics core: Add the shuffler words but without primitives. 2018-06-19 22:52:58 -05:00
complex more test IN: cleanup. 2018-02-25 15:44:16 -08:00
constants use radix literals 2011-11-23 19:03:40 -08:00
floats math.floats.env: use $sequence in docs. 2019-10-24 13:54:58 -07:00
functions math.functions: add logit function and a test. 2019-02-24 11:15:58 -06:00
intervals math.intervals: workaround possible compiler bug by widening interval-bitor. 2019-10-31 10:45:54 -07:00
libm factor: actual patch to remove ; from all c/fortran functions 2015-07-19 16:25:30 -07:00
matrices math.matrices: Add some more matrix norms. 2018-07-04 16:14:44 -05:00
partial-dispatch math.partial-dispatch: simplify using fry. 2019-10-31 10:27:29 -07:00
polynomials math: using ``v.`` instead of ``v* sum`` in a few places. 2017-10-24 12:26:39 -07:00
primes fix some tests broken by previous commit. 2018-02-15 13:16:39 -08:00
quaternions factor: second stab at [ ] [ ] unit-test -> { } [ ] unit-test 2015-07-03 09:39:59 -07:00
ranges more test IN: cleanup. 2018-02-15 09:20:01 -08:00
rectangles more test IN: cleanup. 2018-02-25 15:44:16 -08:00
statistics core: Add the shuffler words but without primitives. 2018-06-19 22:52:58 -05:00
vectors math.vectors: use $sequence in docs. 2019-10-24 20:38:05 -07:00