aboutsummaryrefslogtreecommitdiff
path: root/tests/core/math
Commit message (Collapse)AuthorAgeFilesLines
* 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.
* Keep `-vet` happy by removing `using`gingerBill2023-07-312-104/+75
|
* Keep -vet happygingerBill2023-07-311-3/+3
|
* Remove `using` where easily possiblegingerBill2023-07-312-0/+2
|
* Improve core:math procedures and add loads of unit testsgingerBill2022-11-291-1/+835
|
* 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.
* | Merge branch 'master' into fract_trunc_classify_#1574gitlost2022-03-091-16/+14
|\ \ | | | | | | | | | Resolve conflicts with [9848e88] & sameify Makefile & tests/common/common.odin
| * | [varint] Add LEB128 decoding + testsJeroen van Rijn2022-03-081-16/+14
| | | | | | | | | | | | Also make tests in general less spammy: Don't print [PASS] for each successful test, only report failures and progress.
* | | Fix issue #1574 "fract in linalg/glm is broken" by fixinggitlost2022-03-082-0/+395
|/ / | | | | | | | | | | | | | | | | trunc_f16/32/64 in "math.odin" (~ typos on expressions) Fix classify_f16 Inf test (would fail for subnormal 0h0001) by changing multiplier 0.5 -> 0.25 Add some useful consts to "math.odin" (INF_F16 etc) Add comment to "demo.odin" mentioning that -0.0 must be used to specify negative zero
* / [tests] Make test runners exit with errorlevel 1 if a test fails.Jeroen van Rijn2022-03-031-0/+4
|/
* Ports OpenSimplex2 from https://github.com/KdotJPG/OpenSimplex2 to Odin. ↵NoahR022022-02-081-4/+0
| | | | Adds tests for the noise procedures.
* Ports OpenSimplex2 from https://github.com/KdotJPG/OpenSimplex2 to Odin. ↵NoahR022022-02-081-0/+153
| | | | Adds tests for the noise procedures.
* [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