blob1807
f2490191b6
Fix memory leak in internal_rat_norm
2025-06-23 02:44:00 +10: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
Jeroen van Rijn
4f4839ecc5
Add initial tests for big rationals
2025-06-10 16:46:12 +02:00
Feoramund
4236b043e2
Move negation in internal_rat_to_float to end of procedure
...
This should cause a compiler error, due to the assignment to a named
return value in a deferred block.
Fixes #4565
2025-06-10 08:34:07 -04:00
Jeroen van Rijn
4b36306674
Deprecate old @(deprecated) things.
2025-06-06 10:42:34 +02:00
Feoramund
2760f43ce7
Add deprecation warnings for strconv.append_*
2025-06-05 17:34:14 -04:00
Feoramund
153f7af594
Rename fixed.append to fixed.write too, for good measure
2025-06-05 16:56:29 -04:00
Feoramund
b7de15caa3
Clarify strconv.append_* to strconv.write_*
2025-06-05 16:56:00 -04:00
Jeroen van Rijn
8597966a9f
Fix rand.int_max comment
2025-05-28 11:50:24 +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
Jeroen van Rijn
47f889569f
Fix float64_range example
2025-04-21 18:37:57 +02:00
Jeroen van Rijn
ddedddc16d
Get rid of duplicate math.signbit in favor of math.sign_bit
2025-04-15 16:17:02 +02:00
Barinzaya
bffa0eaa58
Fixed math.nextafter procs skipping from 0 to 1.
2025-04-07 13:38:10 -04:00
Jeroen van Rijn
f7c4c80ef3
Fix broken examples in documentation tester.
...
No more:
```
We could not find the procedure "pkg_foo_example :: proc()" needed to test the example created for "pkg.foo"
The following procedures were found:
bar()
```
2025-04-05 16:36:26 +02:00
gingerBill
ef016d957b
Add @(require_results) to random generator
2025-02-24 13:48:07 +00:00
Colter
d5d900e292
fix typo in float32_range doc string
2025-01-29 12:20:07 -05:00
prescientmoon
5a29e80bc3
Fix 2x2 matrix inverses in specific.odin
2025-01-23 05:56:27 +01:00
Laytan Laats
5622fb583c
math/rand: add @(require_results) to create
2025-01-18 22:52:13 +01:00
gingerBill
a3b4280cf7
Merge pull request #4633 from spahnke/fix-matrix-adjugate
...
Fix matrix adjugate
2025-01-06 09:36:18 +00:00
gingerBill
1cf7a56ba7
General clean up of code
2025-01-01 15:13:46 +00:00
Sebastian Pahnke
f23e226854
Rename adjugate to cofactor to keep existing usages for inverse and determinant correct and add new adjugate procedures
2024-12-28 10:29:43 +01:00
gingerBill
61368d942e
Merge pull request #4589 from Pariatech/add-trunc-to-linalg-glsl
...
Add trunc to glsl linalg
2024-12-18 21:20:17 +00:00
Gabriel Pariat
e0b7bfd21e
add trunc to glsl linalg
2024-12-17 13:06:59 -05:00
Bazzagibbs
4b76568596
Add linalg.clamp_length(vector, max_length) -> clamped_vector
2024-12-02 11:58:36 +11:00
Evan Martinez
36481f6d4a
Fix binomial function
2024-11-28 00:28:26 -07:00
Dudejoe870
4d22f1f544
Fix typo in Quaternion dot product
2024-11-17 10:42:59 -06:00
gingerBill
1419d0d295
Minor formatting change
2024-11-05 12:45:30 +00:00
Laytan
cb2768625a
math/rand: choice_bit_set return not_empty -> ok
2024-10-28 20:07:38 +01:00
Laytan Laats
10c2f8dbeb
math/rand: add choice_bit_set
2024-10-26 13:50:28 +02:00
Laytan Laats
bb4fc9979a
math/rand: support non-contiguous enums in choice_enum
2024-10-25 20:41:57 +02:00
gingerBill
6bbeb0a243
Merge pull request #4203 from karl-zylinski/file-tags-without-comments
...
Make tags use #+ syntax instead of //+
2024-09-19 12:36:43 +01:00
gingerBill
e17dfcf7a2
Remove distinct from core:math/linalg/(glsl|hlsl) types
2024-09-18 00:13:34 +01:00
Karl Zylinski
19f0127e55
Moved all packages in core, base, vendor, tests and examples to use new #+ file tag syntax.
2024-09-14 18:27:49 +02:00
Jeroen van Rijn
beb10cce63
Fix #4227
2024-09-10 15:31:57 +02:00
Laytan Laats
288312a812
core: improve package doc comments for the documentation generator
2024-09-03 19:59:04 +02:00
Jeroen van Rijn
dd1f151696
Add math.remap_clamped.
2024-09-01 17:22:58 +02:00
Karl Zylinski
6e150d1d58
Make math.remap clamp the result in range [new_min, new_max].
2024-09-01 16:30:48 +02:00
gingerBill
eb799393d5
Fix -vet-tabs issues
2024-08-24 13:56:41 +01:00
Feoramund
2906f2aa7e
Add core:math.count_digits_of_base
2024-08-18 20:14:14 -04:00
Jeroen van Rijn
f627a38b4f
Update rand.reset() example.
2024-07-31 20:00:55 +02:00
Jeroen van Rijn
24e6f16f4a
Clamp dot in angle_between to avoid precision errors.
...
Fixes #3978
2024-07-28 15:00:29 +02:00
gingerBill
0d881e1561
Improve rand.shuffle further by splitting into 64-bit and 32-bit parts
2024-07-16 18:36:31 +01:00
gingerBill
ba49950454
Improve rand.shuffle
2024-07-16 18:33:01 +01:00
gingerBill
a3fe5754d9
Make complex32 use higher precision where possible for calculations
2024-07-16 15:31:00 +01: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
1770e3a9a9
Fix typo
2024-07-11 17:19:12 +01:00
gingerBill
19753ed8a3
Add rand.Generator and other calls
2024-07-11 17:12:42 +01:00
gingerBill
59d87d1f05
Add gen := context.random_generator parameters to rand calls
2024-07-11 17:01:34 +01:00
Laytan Laats
2d8d0dd851
fix @(optimization_mode) usage in builtin collections
2024-07-08 21:07:53 +02:00