Commit Graph

125 Commits

Author SHA1 Message Date
Jeroen van Rijn
f34ba44bf8 big: Add shl, shr and shrmod. 2021-08-11 20:59:51 +02:00
Jeroen van Rijn
d4d863c4db big: Add mod_power_of_two. 2021-08-11 20:59:51 +02:00
Jeroen van Rijn
78c0877994 big: Add get(a, type) and get_float. 2021-08-11 20:59:51 +02:00
Jeroen van Rijn
1d0b37c1d8 big: add shl1, shr1. 2021-08-11 20:59:51 +02:00
Jeroen van Rijn
7648f2e655 big: Finish big ZII refactor. 2021-08-11 20:59:50 +02:00
Jeroen van Rijn
d9efa6c8b5 big: More ZII refactoring. 2021-08-11 20:59:50 +02:00
Jeroen van Rijn
2e372b33a3 big: More ZII refactoring. 2021-08-11 20:59:50 +02:00
Jeroen van Rijn
687c211a58 big: ZII. 2021-08-11 20:59:50 +02:00
Jeroen van Rijn
4eadd0867d big: Continuing to refactor. 2021-08-11 20:59:50 +02:00
Jeroen van Rijn
9dba17cf87 bigint: refactor to big.Int instead of bigint.Int. 2021-08-11 20:59:50 +02:00
Jeroen van Rijn
baef0c291d bigint: Added some more helpers. 2021-08-11 20:59:50 +02:00
Jeroen van Rijn
cccd290834 bigint: Add is_power_of_two helper. 2021-08-11 20:59:50 +02:00
Jeroen van Rijn
5af85aed3d bigint: itoa support for arbitrary precision if is_power_of_two(radix) 2021-08-11 20:59:50 +02:00
Jeroen van Rijn
e600e5947b bigint: remove unnecessary boundary checks. 2021-08-11 20:59:50 +02:00
Jeroen van Rijn
d7ae611f76 bigint: itoa now writes backwards directly, no need to reverse after. 2021-08-11 20:59:50 +02:00
Jeroen van Rijn
04a83eb9f7 bigint: pass size to itoa_raw. 2021-08-11 20:59:50 +02:00
Jeroen van Rijn
341e8a3c99 bigint: itoa works for numbers <= 120 bits. 2021-08-11 20:59:50 +02:00
Jeroen van Rijn
e3d8ac559d bigint: Fast paths for radix code. 2021-08-11 20:59:50 +02:00
Jeroen van Rijn
767948ab46 bigint: log_n for bases that fit within one DIGIT or are a power of two. 2021-08-11 20:59:50 +02:00
Jeroen van Rijn
dbcd8da733 bigint: Working on itoa and logn. 2021-08-11 20:59:50 +02:00
Jeroen van Rijn
905d5459a9 bigint: Add count_bits and more prep. 2021-08-11 20:59:50 +02:00
Jeroen van Rijn
dfd5a993a2 bigint: Prepare for multiplication. 2021-08-11 20:59:50 +02:00
Jeroen van Rijn
daceaa65f5 bigint: Add substractin with immediate. 2021-08-11 20:59:50 +02:00
Jeroen van Rijn
c2c07f07db Add single DIGIT addition. 2021-08-11 20:59:50 +02:00
Jeroen van Rijn
c5cbd3260a bigint: Add prototypes for immediate add+sub. 2021-08-11 20:59:50 +02:00
Jeroen van Rijn
d57e1be89f bigint: Improve add. 2021-08-11 20:59:50 +02:00
Jeroen van Rijn
18dda6ff9d Start of core:math/bigint
We have:
- `init` to create a new `Int`
- `init(from_integer)` to create a new `Int` and set it to `from_integer`.
- `set(Int, from_integer)` to set an `Int` to `from_integer`
- `add(dest, a, b)` to add `a` and `b` into `dest`.
- `sub(dest, a, b)` to subtract `b` from `a` and put the result in `dest`.

And a few helper functions, like:
- `is_zero`, `is_negative`, ...
- `grow`, `shrink`, `clear`, `zero`
2021-08-11 20:59:50 +02:00
gingerBill
4285b58aaa Add #no_bounds_check to linalg procedures 2021-07-03 14:38:41 +01:00
gingerBill
ad22eda87c Improve linalg.transpose type determination for square matrices 2021-06-28 13:23:28 +01:00
gingerBill
3e7aabe6d8 Change uses for parapoly records to use $ always 2021-06-14 11:43:35 +01:00
gingerBill
f41150f8e9 Fix transposing 2021-06-04 15:10:53 +01:00
gingerBill
21adad4e09 Fix typo 2021-06-04 15:09:55 +01:00
gingerBill
b9888f8f68 Fix linalg.transpose 2021-06-03 10:05:05 +01:00
Joakim Hentula
6465fb8ec7 Fix for value rather than type used for intrinsics 2021-05-31 13:21:13 +01:00
Jeroen van Rijn
d7dba495fd Last of the Endian float in math.odin. 2021-05-29 18:27:43 +02:00
Jeroen van Rijn
c05f6b4a31 Even more Endian maths. 2021-05-29 17:52:47 +02:00
Jeroen van Rijn
a0a578c72a More Endian version of maths procs. 2021-05-29 17:21:54 +02:00
Jeroen van Rijn
55fc2c00c0 Add Endian versions of math routines. 2021-05-29 16:22:47 +02:00
gingerBill
26ce40c188 Remove @(static) for global variables 2021-05-19 11:51:48 +01:00
gingerBill
9ed826f6fb Remove import "core:runtime" from core:math/bits 2021-04-25 21:51:33 +01:00
gingerBill
2691c394e0 Add intrinsics.count_zeros 2021-04-25 20:50:25 +01:00
gingerBill
7086b49ae6 Rename intrinsics to count_trailing_zeros and count_leading_zeros 2021-04-25 20:26:11 +01:00
gingerBill
72aa0e6e38 Replace many foreign llvm calls with intrinsics 2021-04-25 20:22:26 +01:00
vassvik
8169cb4853 Fix missing newlines in core:math/linalg/specific.odin 2021-04-09 09:21:20 +02:00
gingerBill
bcda9ddee7 Add core:math/fixed 2021-04-01 17:09:34 +01:00
gingerBill
0fc04a939e Add f16 support to core:math/linalg 2021-04-01 11:12:40 +01:00
gingerBill
63bb26c0e0 Add f16 specific procedures to core:math 2021-04-01 10:52:46 +01:00
gingerBill
43ac6ca8f4 Add linalg.matrix_cast 2021-03-26 16:24:56 +00:00
gingerBill
62d2656f69 Add linalg.matrix_cast 2021-03-26 14:33:46 +00:00
Jeroen van Rijn
d80670fe0c Fix typo in cubic(). 2021-03-16 16:34:59 +01:00