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
Barinzaya
d402b7408d
Fix a range check in int_atoi in core:math/big.
...
The check seems to have been assuming that rune comparisons are
unsigned, but they're signed. This was causing an assertion failure for
certain input characters (anything with an ASCII value less than
'+'/43).
2025-05-24 11:31:37 -04:00
Feoramund
70820c2c40
Add missing string_to_int alias in core:math/big
2024-06-09 21:42:31 -04:00
Laytan
d7fdccb08c
fix a couple of -vet-style failures after f54977336b
2024-05-09 19:39:48 +02:00
gingerBill
3e7e779abf
Replace core:* to base:* where appropriate
2024-01-28 22:18:51 +00:00
gingerBill
9b54b99bf6
Use positional and named arguments within the core library
2023-06-21 01:17:05 +01:00
gingerBill
c85ac955f7
Simplify docs to hide the copyright
2022-01-17 19:00:47 +00:00
gingerBill
2800d4b8d0
Merge branch 'master' into optional-semicolons
2021-09-06 16:46:57 +01:00
Jeroen van Rijn
de5d897b5c
Add internal_int_(pack, unpack).
2021-09-06 12:57:48 +02:00
Jeroen van Rijn
3faac14d62
big: Add ASCII file import/export.
2021-09-05 15:50:23 +02:00
Jeroen van Rijn
31918d3b8f
big: Add internal_int_is_prime.
2021-09-02 18:31:08 +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
251da264ed
Remove unneeded semicolons from the core library
2021-08-31 22:21:13 +01:00
Jeroen van Rijn
852643e6ba
Add tests for `internal_int_is_square'.
2021-08-28 13:27:46 +02:00
Jeroen van Rijn
23d29be4d8
big: Update license to BSD-3.
2021-08-19 12:12:59 +02:00
gingerBill
c27b8a71fd
Replace err != nil with or_return where appropriate
2021-08-15 17:52:10 +01:00
Jeroen van Rijn
851780b8f4
big: Add arguments and usage to test.py.
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
1ebb0bd9d6
big: More refactoring.
2021-08-11 20:59:54 +02:00
Jeroen van Rijn
9890e7cfeb
big: Improved zero_unused helper.
2021-08-11 20:59:53 +02:00
Jeroen van Rijn
463003e86a
bit: Improved bitfield extraction.
2021-08-11 20:59:53 +02:00
Jeroen van Rijn
97d80d03f9
big: Error.None -> nil
2021-08-11 20:59:52 +02:00
Jeroen van Rijn
e80ac18324
big: Add factorial, have tests use hex strings.
2021-08-11 20:59:52 +02:00
Jeroen van Rijn
74258a170a
big: fix itoa base PoT other than 16.
2021-08-11 20:59:51 +02:00
Jeroen van Rijn
2fbff25a18
big: Improve int_bitfield_extract.
2021-08-11 20:59:51 +02:00
Jeroen van Rijn
2aae1016ab
big: Add sqrt.
2021-08-11 20:59:51 +02:00
Jeroen van Rijn
9c2468ecf7
big: Add atoi.
2021-08-11 20:59:51 +02:00
Jeroen van Rijn
0a431eef19
big: Add another way to estimate radix size.
2021-08-11 20:59:51 +02:00
Jeroen van Rijn
1ebaa9fb3b
big: itoa now works for arbitrary radixes.
2021-08-11 20:59:51 +02:00
Jeroen van Rijn
d953e40fb3
big: Add pow.
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
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