There are two consequences:
- the thrown object is now a windows-error, previously it was a string;
- if GetLastError returns zero, nothing is thrown. Previously the string
"The operation completed successfully." was thrown in that case.
tensors: create tensors vocabulary.
tensors: create file heading
tensors: define tensor constructor.
tensors: add additional constructors.
tensors: add reshaping.
tensors: implement add and include tests.
tensors: add binary operations.
tensors: add scalar multiply.
tensors: added >array functionality
tensors: tests for >array
tensors: unit tests fix
tensors: use more idiomatic >array.
tensors: add multi-methods for scalar multiplication.
tensors: cleaned up >array
tensors: combine a few constructors
tensors: added dims function and unit tests.
tensors: add documentation capabilities.
tensors: added multi-methods for scalar addition/subtraction/division
help.lint.coverage: fix for shadowing "empty" word; prevent the other test-only words from being shadowed too
soundex: move to extra as it's unused; fix authors.txt filename
modify arange to match numpy; replace with naturals
create >float-array for efficient float array construction
use combinators
tensors: documentation added for public functions.
tensors: implement t% and matrix multiplication.
tensors: add slice with non-zero step
tensors: add documentation.
tensors: added transposition funcitonality, with documentation and tests
tensors: add error documentation.
Add error documentation
tensors: fix matmul documentation.
extra/tensors: add tests for arange
tensors: make transpose style more similar
tensors: make some of the PR changes.
tensors: separate shape checking.
tensors: add documentation for non-positive-shape-error.
tensors: add missing comment.
tensors: transpose edits for efficiency
This is for calculating e^x-1 for small values more accurately. You can also
call expm1(x) function if you want, and it's available on your platform.
FUNCTION: double expm1 ( double x )
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.
Addresses #2170
- fixed: `interval-bitor` caused bit-growth
- improved: `interval-bitor` more exact about lower bounds
The added utility words could be used as a basis to make the other bitwise
interval operations more exact also.