gingerBill
6922ab15fb
Merge pull request #5864 from Skyress-s/master
...
fix: linalg.quaternion_from_forward_and_up()
2025-12-01 12:31:55 +00:00
Andreas Stenmark
ad11d3bea0
Fix #5978 : choice_bit_set respects bit_set domain
2025-11-30 21:46:26 +01:00
Yawning Angel
ea1f1e275d
base/runtime: Add chacha8rand as the default RNG
2025-11-29 16:16:52 +09:00
Yawning Angel
f74f93154a
math/rand: Add xoshiro256**
...
This is extracted from the previos PR as an improved non-cryptographic
PRNG option.
2025-11-29 10:45:53 +09:00
Yawning Angel
110d869cd7
math/rand: Add a copy of the existing PCG PRNG
...
The switch to the new RNG will be a breaking change as the outputted
sequence will change for a given seed. This is intended for backward
compatibility purposes only.
2025-11-29 10:45:53 +09:00
Jeroen van Rijn
cbf9f59da0
Fix core:math/ease
2025-11-28 23:18:28 +01:00
Jeroen van Rijn
976bb52af7
Always use new itoa method when MATH_BIG_FORCE_32_BIT
2025-11-28 23:08:17 +01:00
Xotchkass
b8f8e6a8df
changed panic to assert
2025-11-28 14:11:37 +02:00
Xotchkass
a234f25fa5
Add range-based random number generation functions
2025-11-28 13:40:30 +02:00
Jeroen van Rijn
be38ba58b3
Another little bit faster.
2025-11-27 18:27:55 +01:00
Jeroen van Rijn
a6820020c7
Merge pull request #5968 from Xotchkass/rand_u_max
...
Add `uint32_max`, `uint64_max`, `uint128_max` and `uint_max` procs to `core:math/rand`
2025-11-27 16:12:09 +00:00
Jeroen van Rijn
3cdaf06fc8
Switch between old and new itoa method based on optimization level + digit size
2025-11-27 16:10:32 +01:00
Jeroen van Rijn
1ea5990be2
Speed up big.itoa
...
Extract 18 (64-bit) or 8 (32-bit) digits per big division.
This gives a 2.5x speedup for a 1024-bit bigint.
2025-11-27 15:35:05 +01:00
gingerBill
78d8059ebe
Use @(rodata) where possible
2025-11-27 10:24:22 +00:00
gingerBill
0d16ab2783
Add alias Okay = None
2025-11-27 09:14:39 +00:00
gingerBill
c63fa3f663
Use < 0 instead of == -1 for comparisons
2025-11-27 09:13:21 +00:00
gingerBill
53876907c6
Handle Allocator_Error correctly in core:math/big
2025-11-27 09:10:03 +00:00
Xotchkass
0ed24953bb
add uint32_max, uint64_max, uint128_max and uint_max procs to math/rand
2025-11-26 23:06:19 +02:00
Phil Homan
342a7dd112
rerrange math.sign and math.sign_bit overloads
2025-11-23 11:03:37 -08:00
Phil Homan
9131bca7ba
add math.sign and math.sign_bit overloads for int types
2025-11-22 13:32:21 -08:00
Jeroen van Rijn
56aab55d82
Fix #5931
...
Fix #5931 and add test case for it.
2025-11-18 15:37:57 +01:00
gingerBill
e5153a937b
Merge pull request #5859 from odin-lang/bill/change-license
...
Change Odin's LICENSE to zlib from BSD 3-clause
2025-11-04 13:53:13 +00:00
NicknEma
7317704fd0
Fix docs on int*_max
2025-11-04 13:11:48 +01:00
thetarnav
c63ad8b1cf
Cleanup ease_inverse
2025-11-01 21:22:06 +01:00
thetarnav
78f9f8bbce
Add ease inverse procedures
2025-11-01 21:11:32 +01:00
Mathias Mohn Mørch
9a321befd4
Fixed issue where the linalg.quaternion_from_forward_and_up could return incorrect values in certain scenarioes
2025-10-30 20:35:35 +01:00
Nick Driscoll
5fa41f9f03
Add half support to all proc groups and add ashalf proc group
2025-10-28 21:42:08 -04:00
Nick Driscoll
f3b6ad01ab
Add all half scalar, vector, and matrix types
2025-10-28 21:42:08 -04:00
gingerBill
842cfee0f3
Change Odin's LICENSE to zlib from BSD 3-clause
...
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.
2025-10-28 14:38:25 +00:00
Jeroen van Rijn
ee93f48729
core:math/bits: Finish docs, add bitfield_extract + bitfield_insert test.
2025-10-14 23:30:38 +02:00
Jeroen van Rijn
347eae3a66
core:math/bits: Add docs + tests for rotate_left* and log2
2025-10-14 23:30:38 +02:00
Jeroen van Rijn
236111864e
Link doc lines to source specifications.
2025-10-10 18:29:52 +02:00
Jeroen van Rijn
7a9ea3ee6d
Further overhaul of package line comments.
2025-10-09 23:05:29 +02:00
Jeroen van Rijn
c4c2431997
Package lines for core:math and more.
2025-10-09 19:56:21 +02:00
gingerBill
d17ee79470
Fix #5764
2025-10-07 14:30:13 +01:00
Franz Hoeltermann
a39697d84c
Fix srgb <-> linear rgb conversion functions in core:math/linalg and add implementations for vector3
2025-10-02 17:31:59 +02:00
Jeroen van Rijn
3c9538c708
Change the way math/big constants are initialized
2025-09-10 21:02:24 +02:00
Xotchkass
2d5652dbd4
remove private _random_u64 and move it's functionality into public uint64
2025-08-14 13:39:18 +03:00
Xotchkass
df849891c1
use runtime.random_generator_read_bytes in read procedure instead of filling it manually.
2025-08-14 13:35:25 +03:00
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
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