Commit Graph

67 Commits

Author SHA1 Message Date
gingerBill
3dec55f009 Replace x in &y Use &v in y syntax through core & vendor for switch/for statements 2023-06-26 15:42:57 +01:00
FancyKillerPanda
62ff8daa78 Changed //+ignore to //+build ignore. 2022-02-24 12:23:54 +11:00
gingerBill
fb01dfe048 Improve docs_writer.cpp 2022-01-17 22:17:07 +00:00
gingerBill
c85ac955f7 Simplify docs to hide the copyright 2022-01-17 19:00:47 +00:00
Jeroen van Rijn
938744b276 [math/big] Rename internal_int_shl_digit to _private_int_shl_leg.
Same for the SHR variant. These are pure implementation details to shift by a leg/word at a time.
Prevent accidental usage.
2021-12-11 15:22:24 +01:00
Jeroen van Rijn
c771ea9794 Merge pull request #1358 from Kelimion/big_math_fix
[math/big] Return 0, .Integer_Underflow if T = unsigned and bigint is negative.
2021-12-09 16:41:37 +01:00
gingerBill
94bad4d786 Merge branch 'master' of https://github.com/odin-lang/Odin 2021-12-09 15:36:12 +00:00
gingerBill
1e17d5d86f Add utility procedures to get low values 2021-12-09 15:34:35 +00:00
Jeroen van Rijn
b2b79b86f0 [math/big] Return 0, .Integer_Underflow if trying to get a negative number to an unsigned int. 2021-12-09 16:31:54 +01:00
Jeroen van Rijn
c94098c2ab [math/big] Fix int_set and int_get. 2021-12-09 16:14:04 +01:00
gingerBill
87952fdb8e big.Rat (Experimental) 2021-10-29 12:40:54 +01:00
gingerBill
5006674a9b Correct math/big 2021-09-08 13:14:13 +01:00
gingerBill
ca33cb990b Strip semicolons in core which were missing 2021-09-08 13:12:38 +01:00
gingerBill
2800d4b8d0 Merge branch 'master' into optional-semicolons 2021-09-06 16:46:57 +01:00
Jeroen van Rijn
1f5ce91ae2 big: Add internal_random_prime. 2021-09-05 10:40:35 +02:00
Jeroen van Rijn
f2c5c26f2c big: Add internal_int_prime_next_prime. 2021-09-04 16:31:05 +02:00
Jeroen van Rijn
b1ed7fc6b9 big: Add Lucas-Selfridge. 2021-09-03 23:54:54 +02:00
Jeroen van Rijn
70e12f7a1c big: Fix internal_int_mod for inputs with opposite signs.
This threw off Frobenius-Underwood.
2021-09-03 14:50:26 +02:00
Jeroen van Rijn
eecc786bd2 big: Add Frobenius-Underwood. 2021-09-03 01:25:18 +02:00
Jeroen van Rijn
31918d3b8f big: Add internal_int_is_prime. 2021-09-02 18:31:08 +02:00
Jeroen van Rijn
ae354731ed big: Add ; after proc map. 2021-09-01 19:18:13 +02:00
Jeroen van Rijn
671b413b15 big: Use new comparison helpers. 2021-09-01 19:13:47 +02:00
Jeroen van Rijn
335d361fc6 big: Add comparison helpers. 2021-09-01 19:13:47 +02:00
Jeroen van Rijn
2110778040 big: Add internal_int_exponent_mod_fast. 2021-09-01 19:13:47 +02:00
Jeroen van Rijn
65a15e9c06 big: Add internal_int_exponent_mod. 2021-09-01 19:13:47 +02:00
gingerBill
720884e0f1 Strip even more semicolons if followed by a } or ) on the same line 2021-08-31 23:47:57 +01:00
gingerBill
f57201bbd1 Remove unneeded semicolons from the core library 2021-08-31 22:32:53 +01:00
gingerBill
251da264ed Remove unneeded semicolons from the core library 2021-08-31 22:21:13 +01:00
Jeroen van Rijn
737b4fde1c big: Add _private_int_mul_balance. 2021-08-28 18:17:57 +02:00
Jeroen van Rijn
852643e6ba Add tests for `internal_int_is_square'. 2021-08-28 13:27:46 +02:00
Jeroen van Rijn
ec4cae4f04 big: Add int_is_square. 2021-08-27 16:41:16 +02:00
gingerBill
ce7698c20e Correct core library usage of the new mem.new behaviour 2021-08-23 19:29:01 +01:00
Jeroen van Rijn
23d29be4d8 big: Update license to BSD-3. 2021-08-19 12:12:59 +02:00
Jeroen van Rijn
06cde91ba3 big: Enable Toom again. 2021-08-18 15:35:01 +02:00
Jeroen van Rijn
5fd7a5f32a big: Fix signed multiplication for some inputs. 2021-08-18 15:24:43 +02:00
Jeroen van Rijn
48c1f0ab59 big: Disable Toom for a moment. 2021-08-16 22:13:54 +02:00
Jeroen van Rijn
706e58c1c7 big: Add _private_int_mul_toom`. 2021-08-16 21:17:21 +02:00
Jeroen van Rijn
8b49bbb0fc big: Add _private_mul_karatsuba. 2021-08-16 16:10:10 +02:00
gingerBill
e3fef2dade Improve parsing for or_return; allow #force_inline foo() or_return; 2021-08-16 11:58:50 +01:00
gingerBill
c27b8a71fd Replace err != nil with or_return where appropriate 2021-08-15 17:52:10 +01:00
Jeroen van Rijn
0db86a0638 big: Add workaround for DLL globals bug. 2021-08-14 13:51:17 +02:00
Jeroen van Rijn
dc02566a84 big: Add _private_int_div_recursive. 2021-08-13 23:45:00 +02:00
Jeroen van Rijn
37be8d4091 big: Add internal_invmod. 2021-08-13 14:55:53 +02:00
Jeroen van Rijn
12f9b6db63 big: Add int_to_bytes_{big, little} + Python compatible variants. 2021-08-11 20:59:54 +02:00
Jeroen van Rijn
851780b8f4 big: Add arguments and usage to test.py. 2021-08-11 20:59:54 +02:00
Jeroen van Rijn
5f34ff9f9f big: Add _private_int_sqr_toom. 2021-08-11 20:59:54 +02:00
Jeroen van Rijn
2b274fefbb big: Add _private_int_sqr_karatsuba. 2021-08-11 20:59:54 +02:00
Jeroen van Rijn
6c681b258c big: Add _private_int_sqr_comba. 2021-08-11 20:59:54 +02:00
Jeroen van Rijn
1f91a2fe65 big: Finish refactor. 2021-08-11 20:59:54 +02:00
Jeroen van Rijn
19ff27788c big: Refactoring. 2021-08-11 20:59:54 +02:00