aboutsummaryrefslogtreecommitdiff
path: root/tests/core/math/big
Commit message (Collapse)AuthorAgeFilesLines
* Also test a big int with a large number of zeroes.Jeroen van Rijn2025-11-271-0/+15
|
* Speed up big.itoaJeroen van Rijn2025-11-271-0/+27
| | | | | Extract 18 (64-bit) or 8 (32-bit) digits per big division. This gives a 2.5x speedup for a 1024-bit bigint.
* Update test generatorgingerBill2025-11-273-4768/+4770
|
* Fix #5931Jeroen van Rijn2025-11-181-0/+21
| | | | Fix #5931 and add test case for it.
* Change Odin's LICENSE to zlib from BSD 3-clausegingerBill2025-10-281-1/+1
| | | | This change was made in order to allow things produced with Odin and using Odin's core library, to not require the LICENSE to also be distributed alongside the binary form.
* Turn `core:math/bìg` tests into regular `core:testing` tests.Jeroen van Rijn2025-06-115-1153/+5644
| | | | | | `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.
* Fix pathJeroen van Rijn2025-06-101-1/+1
|
* Add initial tests for big rationalsJeroen van Rijn2025-06-102-1/+51
|
* Merge pull request #3137 from laytan/show-defineablegingerBill2024-06-201-1/+1
|\ | | | | Add flags to show/export defineable values and warn if a -define is unused in the project
| * remove caught unused defineLaytan Laats2024-06-071-1/+1
| |
* | Add test for `core:math/big` permutation & combination procsFeoramund2024-06-091-0/+37
| |
* | Rename `math/big` test packageFeoramund2024-06-091-1/+1
|/ | | | | This is in line with the other tests, and it does not seem to affect building the library.
* Disable `FANCY_OUTPUT` in Odin test scriptsFeoramund2024-06-021-1/+1
| | | | This should tidy up the CI output logs a bit.
* Replace `core:*` to `base:*` where appropriategingerBill2024-01-281-1/+1
|
* Change large math/big test literals to hex.Jeroen van Rijn2023-09-301-4/+4
| | | | | | | | In September 2022, the Python team addressed a possible DoS issue converting big integers to and from base 10 strings: https://github.com/python/cpython/issues/95778 Converting to/from base 10 is a quadratic operation, so they limited it to 4300 digits: https://discuss.python.org/t/int-str-conversions-broken-in-latest-python-bugfix-releases/18889/83 Github CI still uses an old Python version which parsed our test suite just fine. This patch converts them to hex literals to ensure our test doesn't break when Github does update to a non-vulnerable Python version released after September 2022.
* Merge pull request #1544 from FancyKillerPanda/build_ignoregingerBill2022-11-031-1/+0
|\ | | | | Changed `//+ignore` to `//+build ignore` and emit a warning for unknown tags
| * Removed //+build ignore from tests/core/math/big/test.odin.FancyKillerPanda2022-02-241-1/+0
| |
| * Changed //+ignore to //+build ignore.FancyKillerPanda2022-02-241-1/+1
| |
* | Update CI for math library.Jeroen van Rijn2022-04-261-1/+1
| |
* | Revert "Merge pull request #1702 from Kelimion/filename_generation"Jeroen van Rijn2022-04-241-1/+1
| | | | | | | | | | This reverts commit a40a53b10447c9223c24cccf565a95f1773d3922, reversing changes made to 5422a3b17eae821df4adf869960995e922eb0e76.
* | Compiler: Add early error for output path being a directory.Jeroen van Rijn2022-04-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | - Introduce new `Path` type and an array of build paths on the build context. - Resolve input and output paths/files early (before parsing). - Error early if inputs are missing or outputs are directories. - Plumb new file path generation into linker stage instead of its adhoc method. TODO: - Remove more adhoc file path generation in parser and linker stage. - Make intermediate object file generation use new path system. - Round out and robustify Path helper functions.
* | [math/big] Tell Python test runner how many nails we use.Jeroen van Rijn2022-04-013-11/+13
|/ | | | | | | | | | | `_DIGIT_NAILS` is defined as 4, meaning that we use 60 out of every 64 bits. We can use as few as 1 nail, using 63 bits out of every 64, and all tests will still pass. However, it needs more testing to see if that's a worthwhile change to make. For the tests to work properly when changing the nails, Python needs to know about it as well. In addition, compile the big math code with `-o:speed` going forward.
* [math/big] Rename `internal_int_shl_digit` to `_private_int_shl_leg`.Jeroen van Rijn2021-12-112-20/+20
| | | | | Same for the SHR variant. These are pure implementation details to shift by a leg/word at a time. Prevent accidental usage.
* [math/big] Fix int_set and int_get.Jeroen van Rijn2021-12-091-11/+16
|
* LLVM 12 big math test workaround.Jeroen van Rijn2021-09-113-53/+36
|
* Separate math/big test.Jeroen van Rijn2021-09-071-0/+13
|
* Move math/big tests under `tests/`.Jeroen van Rijn2021-09-072-0/+1150