Faster practical modular inversion
purplesyringa.moe·1d·
🔬AI
Preview
Report Post

December 20, 2025

Last year, Lemire wrote about an optimized variation of the Euclidean algorithm for computing the greatest common divisor of two numbers, called binary Euclidean algorithm or Stein’s algorithm. It’s a best-of-class implementation, though it’s currently only used by libc++.

The post also briefly mentions the extended Euclidean algorithm, a related algorithm most often used to compute the modular multiplicative inverse (given a …

Similar Posts

Loading similar posts...