f073276bc5
Use least vs fast int types
2025-12-23 14:11:06 +01:00
d19177c275
Use portable guf_math_ckdint functions in guf_rand
2025-12-23 14:11:06 +01:00
6bf47f0ca6
Refactor to use portable minimum-width integers.
...
The signed and unsigned fixed-width integers (int32_t, uint32_t etc.) are optional
in C99 (and above). Use the non-optional minimum-width integers (int_fast32_t, uint_fast32_t and int_least32_t, uint_least32_t etc.) instead.
To simulate unsigned wrap-around, use the GUF_UWRAP macros in guf_common.h
cf. https://en.cppreference.com/w/c/types/integer (last-retrieved: 2025-05-18)
2025-12-23 14:11:06 +01:00
1a5a32d9b9
Prevent more potential int promotion bugs
2025-12-23 14:11:06 +01:00
e3b18473f9
Add guf_math_ckdint IMPL_STATIC etc.
2025-12-23 14:11:05 +01:00
4111f54159
Add checked arithmetic
2025-12-23 14:11:05 +01:00
082b004391
Comment guf_rand
2025-12-23 14:11:05 +01:00
5d2c4be265
Add separate 32/64 bit versions to guf_rand
2025-12-23 14:11:05 +01:00
e8ea48dc45
Add guf_rand_splitmix32
2025-12-23 14:11:05 +01:00
ce4b25318d
Add comments
2025-12-23 14:11:05 +01:00
4a0a77d438
Rename GUF_STATIC_BUF_SIZE
2025-12-23 14:11:05 +01:00
467f9be00a
Refactor
2025-12-23 14:11:04 +01:00
27d0cc65e4
Add C++ tests
2025-12-23 14:11:04 +01:00
099ee09a94
Work on guf_dict
2025-12-23 14:11:04 +01:00
0b39cd3422
Add guf_rand with 32-bit operations (using xoshiro128** 1.1)
2025-12-23 14:11:04 +01:00
03638d5462
Fix overflow in guf_rand32range_i32 and guf_randrange_i64
2025-12-23 14:11:04 +01:00
c584279892
Add guf_rand32
2025-12-23 14:11:04 +01:00
77b5d60d6f
Add guf_rand
2025-12-23 14:11:04 +01:00