Jeroen van Rijn
|
f627a38b4f
|
Update rand.reset() example.
|
2024-07-31 20:00:55 +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
|
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 |
|
gingerBill
|
3f9a58808c
|
More style improvements
|
2024-06-29 19:07:34 +01:00 |
|
gingerBill
|
149ecafdef
|
Remove the need for rand in core:math/big
|
2024-06-15 15:43:57 +01:00 |
|
gingerBill
|
7ec17ecf98
|
Update core:math/rand to use context.random_generator and remove rand.Rand
|
2024-06-15 15:33:24 +01:00 |
|
gingerBill
|
318d5e4a7e
|
Add Reset mode
|
2024-06-15 15:17:23 +01:00 |
|
gingerBill
|
c2a01096c4
|
Remove unneeded reassignment of r
|
2024-06-15 14:49:09 +01:00 |
|
gingerBill
|
dc4ec8638c
|
Add runtime.Random_Generator interface
|
2024-06-15 14:45:57 +01:00 |
|
gingerBill
|
3a9b86628a
|
Add @(rodata) and @(static, rodata) where appropriate
|
2024-06-06 15:23:52 +01:00 |
|
Yawning Angel
|
e2fa9be7e2
|
core/math/rand: Use core:crypto for the system RNG
This removes some code duplication and expands support for the system
RNG to all targets that `core:crypto` supports.
|
2024-04-23 11:47:43 +09:00 |
|
Feoramund
|
3e449e93dd
|
Implement Fisher-Yates shuffle
|
2024-04-15 17:07:05 -04:00 |
|
gingerBill
|
e201a2fabb
|
Add rand.choice_enum
|
2024-02-10 15:13:09 +00:00 |
|
gingerBill
|
3e7e779abf
|
Replace core:* to base:* where appropriate
|
2024-01-28 22:18:51 +00:00 |
|
gingerBill
|
eb261f5b28
|
Merge branch 'master' into new-sys-unix
|
2023-10-31 12:16:25 +00:00 |
|
Damian Tarnawski
|
49da19e013
|
Replace Math.random with crypto.getRandomValues for _system_number
|
2023-10-27 12:06:35 +02:00 |
|
flysand7
|
4d65b1ab9c
|
Implement new sys/unix package
|
2023-10-27 10:51:21 +11:00 |
|
Damian Tarnawski
|
166803a2a5
|
Rename rand to rand_f64
|
2023-10-27 00:18:41 +02:00 |
|
Damian Tarnawski
|
11a2b2a942
|
Add system_random and random_bytes for js target
|
2023-10-27 00:05:38 +02:00 |
|
Lucas Perlind
|
7cc5177078
|
Fixed up missing output for rand examples
|
2023-09-27 16:34:19 +10:00 |
|
Lucas Perlind
|
8b680254ee
|
Better guarantee boundaries of floating point rand
|
2023-08-18 11:19:01 +10:00 |
|
Lucas Perlind
|
b31d8b1ad0
|
Update rand documentation about floats
|
2023-08-16 21:13:56 +10:00 |
|
gingerBill
|
67f48aca96
|
Fix _random_u64
|
2023-08-15 11:06:12 +01:00 |
|
gingerBill
|
d13bed9a0a
|
Change algorithm to work on 64-bit integers rather than 32-bit integers internally
|
2023-08-15 10:53:59 +01:00 |
|
gingerBill
|
904c48b11a
|
Fix range comment from (0, n] to [0, n)
|
2023-08-15 10:36:00 +01:00 |
|
Lucas Perlind
|
ebe5636307
|
Document core:math/rand and add 'possible output'
Possible output allows us to just type check a test
and have some sort of output field in the docs but
not actually verify it matches stdout
|
2023-05-31 09:49:12 +10:00 |
|
gingerBill
|
2df6cabee0
|
Add @(require_results) to core:math/rand
|
2023-05-22 11:59:44 +01:00 |
|
Jeroen van Rijn
|
a51943e27f
|
Add core:math/rand.choice
|
2022-10-23 04:18:58 +02:00 |
|
gingerBill
|
4eba2bb8d9
|
Add _system_random for Darwin
|
2022-05-15 23:46:32 +01:00 |
|
gingerBill
|
2a58bceb56
|
Add rand.init_as_system to allow for system-level based random number generation
|
2022-05-15 23:43:20 +01:00 |
|
gingerBill
|
fdcf08410c
|
Add Gompertz Distribution
|
2022-05-15 23:03:01 +01:00 |
|
gingerBill
|
5142955f00
|
Add more distributions
|
2022-05-15 22:58:39 +01:00 |
|
gingerBill
|
500150b12a
|
Correct log normal
|
2022-05-15 22:52:11 +01:00 |
|
gingerBill
|
50ddd8dd26
|
Fix typo
|
2022-05-15 22:45:05 +01:00 |
|
gingerBill
|
6c6de2a07d
|
Move distributions to a separate file
|
2022-05-15 22:20:25 +01:00 |
|
gingerBill
|
be2c7b5c9b
|
Add numerous different random distribution procedures
|
2022-05-15 21:53:16 +01:00 |
|
gingerBill
|
df8bdac33f
|
Initialize the global_rand with the intrinsics.read_cycle_counter() value
|
2022-02-03 00:31:36 +00:00 |
|
gingerBill
|
8c9505505a
|
Add allocator parameter to rand.perm
|
2022-02-01 15:23:49 +00:00 |
|
gingerBill
|
3165b7cf95
|
Add rand.exp_float64
|
2022-01-27 16:09:33 +00:00 |
|
gingerBill
|
16786aac78
|
Correct int31_max etc
|
2022-01-27 12:33:34 +00: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
|
9c150381bf
|
big: Add rand.
|
2021-08-11 20:59:51 +02:00 |
|
gingerBill
|
26ce40c188
|
Remove @(static) for global variables
|
2021-05-19 11:51:48 +01:00 |
|
gingerBill
|
fc4fdd588e
|
Remove usage of do in core library
|
2020-09-23 17:17:14 +01:00 |
|
gingerBill
|
8f38b06c60
|
Add sanity conversion for rand.norm_float64
|
2020-09-10 15:42:07 +01:00 |
|
gingerBill
|
2dfa3a5df7
|
Fix typo
|
2020-09-07 14:40:36 +01:00 |
|