zig/lib/std
Said Kadrioski 062dc9473e Add EGCD.
Fix some comments in GCD.

Make ml_kem use lcm and egcd from std/math.

Fix name.

Add egcd function.

Don't destructure.

Use binary gcd and make overflow safe.

Force inlining, use ctz to reduce dependency in loop.

Avoid integer overflow for temporary value.

Add test against previous overflow capability.

More optimization friendly expression.

Fix egcd for even numbers.

Minvalue causes crash.

Remove helper function. Fix casting issues.

Use shift instead division (to support i2) and avoid overflow of temp results.
2025-11-25 08:08:22 +01:00
..
Build Merge pull request #25993 from squeek502/windows-paths 2025-11-24 15:27:24 -08:00
builtin std.builtin.assembly: add Clobbers for kvx 2025-11-10 09:40:42 +01:00
c remove all Oracle Solaris support 2025-10-27 07:35:38 -07:00
compress flate.Compress: simplify huffman node comparisons 2025-11-22 22:11:33 -08:00
crypto Add EGCD. 2025-11-25 08:08:22 +01:00
debug update deprecated ArrayListUnmanaged usage (#25958) 2025-11-20 14:46:23 -08:00
dwarf fix compiler ftbfs from std.macho and std.dwarf changes 2025-09-30 13:44:51 +01:00
fmt all: replace all @Type usages 2025-11-22 22:42:38 +00:00
fs Merge pull request #25993 from squeek502/windows-paths 2025-11-24 15:27:24 -08:00
hash all: replace all @Type usages 2025-11-22 22:42:38 +00:00
heap MemoryPool: add unmanaged variants and make them the default 2025-11-15 09:30:57 +00:00
http Revert "std.http: disable failing test on 32-bit arm" 2025-11-01 11:21:28 -04:00
Io Merge pull request #25993 from squeek502/windows-paths 2025-11-24 15:27:24 -08:00
json std.debug.lockStderrWriter: also return ttyconf 2025-10-30 09:31:28 +00:00
math Add EGCD. 2025-11-25 08:08:22 +01:00
mem std.mem.Allocator: fix resize doc comment 2025-10-22 11:41:16 +02:00
meta all: replace all @Type usages 2025-11-22 22:42:38 +00:00
os Merge pull request #25993 from squeek502/windows-paths 2025-11-24 15:27:24 -08:00
posix represent Mac Catalyst as aarch64-maccatalyst-none rather than aarch64-ios-macabi 2025-11-14 11:33:35 +01:00
process windows.eqlIgnoreCaseWTF16 -> eqlIgnoreCaseWtf16 2025-11-16 04:03:52 -08:00
Random Remove usages of deprecatedWriter 2025-09-18 22:39:33 -07:00
sort std.sort.pdq: fix out-of-bounds access in partialInsertionSort (#25253) 2025-09-17 19:54:15 -07:00
tar compiler: update for introduction of std.Io 2025-10-29 06:20:49 -07:00
Target std.Target.x86: refresh from update_cpu_features.zig 2025-11-13 22:29:28 +01:00
testing fix compile errors and minor bugs 2025-09-30 13:44:54 +01:00
Thread std.Io.Threaded: slightly different semantics 2025-11-21 19:54:41 -08:00
time
tz
unicode Remove usages of deprecatedWriter 2025-09-18 22:39:33 -07:00
valgrind
zig Merge pull request #25993 from squeek502/windows-paths 2025-11-24 15:27:24 -08:00
zon update deprecated ArrayListUnmanaged usage (#25958) 2025-11-20 14:46:23 -08:00
array_hash_map.zig update deprecated ArrayListUnmanaged usage (#25958) 2025-11-20 14:46:23 -08:00
array_list.zig std.ArrayList: actaully memset to undefined in shrinkRetainingCapacity and clearRetainingCapacity 2025-11-06 05:30:41 -08:00
ascii.zig std: Skip element comparisons if mem.order args point to same memory 2025-10-31 18:34:33 -07:00
atomic.zig std.atomic: define cache line size for alpha, hppa, microblaze, sh 2025-10-23 09:27:17 +02:00
base64.zig Base64DecoderWithIgnore.calcSizeUpperBound cannot return an error (#25834) 2025-11-07 08:16:34 +01:00
bit_set.zig
BitStack.zig
buf_map.zig
buf_set.zig
Build.zig all: replace all @Type usages 2025-11-22 22:42:38 +00:00
builtin.zig compiler: replace @Type with individual type-creating builtins 2025-11-22 22:42:37 +00:00
c.zig system specific errno 2025-11-20 15:03:23 -08:00
coff.zig Coff: implement threadlocal variables 2025-10-10 22:47:47 -07:00
compress.zig
crypto.zig Add ML-DSA post-quantum signatures (#25862) 2025-11-10 14:11:30 +01:00
debug.zig fuzzer: account for runtime address slide 2025-11-20 10:42:20 +00:00
deque.zig std: remove loop from growCapacity 2025-09-20 14:34:18 -07:00
DoublyLinkedList.zig *LinkedList.remove() assumes node is in the list 2025-10-25 21:10:02 -07:00
dwarf.zig
dynamic_library.zig represent Mac Catalyst as aarch64-maccatalyst-none rather than aarch64-ios-macabi 2025-11-14 11:33:35 +01:00
elf.zig posix: reduce the number of assumptions made by dl_iterate_phdr 2025-11-09 03:31:26 -05:00
enums.zig all: replace all @Type usages 2025-11-22 22:42:38 +00:00
fmt.zig all: replace all @Type usages 2025-11-22 22:42:38 +00:00
fs.zig represent Mac Catalyst as aarch64-maccatalyst-none rather than aarch64-ios-macabi 2025-11-14 11:33:35 +01:00
gpu.zig
hash.zig all: replace all @Type usages 2025-11-22 22:42:38 +00:00
hash_map.zig update deprecated ArrayListUnmanaged usage (#25958) 2025-11-20 14:46:23 -08:00
heap.zig os.windows: Delete unused functions and kernel32 bindings 2025-11-23 23:38:01 -08:00
http.zig std.http: stop assuming previous chunk state 2025-11-20 10:42:21 +00:00
Io.zig std.Io: add Group.concurrent 2025-11-24 14:33:16 -08:00
json.zig
leb128.zig
log.zig all: replace all @Type usages 2025-11-22 22:42:38 +00:00
macho.zig std.debug: split up Mach-O debug info handling 2025-11-20 10:42:20 +00:00
math.zig Add EGCD. 2025-11-25 08:08:22 +01:00
mem.zig all: replace all @Type usages 2025-11-22 22:42:38 +00:00
meta.zig all: replace all @Type usages 2025-11-22 22:42:38 +00:00
multi_array_list.zig all: replace all @Type usages 2025-11-22 22:42:38 +00:00
once.zig
os.zig os.windows: Delete unused functions and kernel32 bindings 2025-11-23 23:38:01 -08:00
pdb.zig
pie.zig std.pie: add missing clobbers on alpha and sparc 2025-11-14 12:19:38 +01:00
posix.zig Move Windows rename implementation from std.posix to windows.RenameFile 2025-11-23 23:38:01 -08:00
priority_dequeue.zig
priority_queue.zig
process.zig Merge pull request #25993 from squeek502/windows-paths 2025-11-24 15:27:24 -08:00
Progress.zig Merge pull request #25898 from jacobly0/elfv2-progress 2025-11-20 04:33:04 -08:00
Random.zig std.Io.net: progress towards DNS resolution 2025-10-29 06:20:48 -07:00
SemanticVersion.zig
simd.zig std.simd: suggest 1024-bit vectors for kvx 2025-11-10 09:40:44 +01:00
SinglyLinkedList.zig SinglyLinkedList.remove docs: Assumes -> asserts 2025-10-25 21:28:54 -07:00
sort.zig
start.zig std.start: add kvx support 2025-11-10 09:40:44 +01:00
static_string_map.zig
std.zig all: replace all @Type usages 2025-11-22 22:42:38 +00:00
tar.zig update deprecated ArrayListUnmanaged usage (#25958) 2025-11-20 14:46:23 -08:00
Target.zig std.Target: remove Abi.code16 2025-11-23 10:22:03 +01:00
testing.zig std.debug.lockStderrWriter: also return ttyconf 2025-10-30 09:31:28 +00:00
Thread.zig std.Thread: update doc comments 2025-11-21 19:54:41 -08:00
time.zig represent Mac Catalyst as aarch64-maccatalyst-none rather than aarch64-ios-macabi 2025-11-14 11:33:35 +01:00
treap.zig
tz.zig
unicode.zig std: move some windows path checking logic 2025-10-29 06:20:50 -07:00
Uri.zig compiler: update for introduction of std.Io 2025-10-29 06:20:49 -07:00
valgrind.zig
wasm.zig
zig.zig compiler: replace @Type with individual type-creating builtins 2025-11-22 22:42:37 +00:00
zip.zig
zon.zig