You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
std.math: Add std.math.egcd to compute the extended GCD
This adds an iterative EGCD implementation to std.math.
The implementation is simple and conservative, returns Bézout
coefficients consistent with widely‐used implementations, and has
been formally verified correct for any value and type supported
by Zig up to u65534/i65534.
Its purpose is to make this API available to projects and other
parts of the standard library. Optimizations for specific types or
value ranges (e.g., using a binary method or approximations) can be
added later without any changes to existing applications.
0 commit comments