gingerBill
8b860da2eb
Remove unused import
2025-08-08 12:12:08 +01:00
gingerBill
7642e0a0e0
Require @(init) and @(fini) to be proc "contextless" ()
2025-08-08 12:10:01 +01:00
Jeroen van Rijn
9dafd77bc0
Turn core:math/bìg tests into regular core:testing tests.
...
`core:math/big` has been verified against Python's big integer implementation long enough.
Turn it into a regular regression test using the `core:testing` framework, testing against
a generated corpus of test vectors.
2025-06-11 00:40:52 +02:00
gingerBill
8642d719f0
Imply #no_capture to all variadic parameters
2024-07-14 12:19:47 +01:00
gingerBill
c7bd954752
Add more uses of #no_capture
2024-07-14 11:56:04 +01:00
gingerBill
149ecafdef
Remove the need for rand in core:math/big
2024-06-15 15:43:57 +01:00
Jeroen van Rijn
908a6ff2d4
Elide unnecessary condition
2024-06-14 21:34:05 +02:00
Josh Jones
759139089f
Fix big.shrink not actually shrinking
2024-06-14 19:58:13 +02:00
Laytan
d7fdccb08c
fix a couple of -vet-style failures after f54977336b
2024-05-09 19:39:48 +02:00
Ed Yu
dd74a57c44
Expose internal invmod and int_exponent_mod with more consistent naming
2024-03-12 11:01:09 -07:00
Jeroen van Rijn
db03c86544
Fix typo in big.internal_invmod
...
Fixes #3253
2024-03-08 18:05:34 +01:00
Ed Yu
de41c2256d
For invmod, b has to be > 1, fix a logic typo
2024-03-04 10:16:19 -08:00
gingerBill
3e7e779abf
Replace core:* to base:* where appropriate
2024-01-28 22:18:51 +00:00
Jeroen van Rijn
f79efd43e4
Fix missing clamp in core:math/big random.
2023-11-27 12:43:24 +01:00
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