gcd48
gcd48 is a lightweight open-source software library that provides highly optimized implementations of the greatest common divisor (GCD) for 48-bit integer arithmetic. It is designed for embedded and performance-sensitive environments where division is expensive or unavailable. The library offers support for 8-, 16-, 32-, and 48-bit operands and is intended to be easily integrated into C and C++ projects.
The core of gcd48 centers on the binary GCD algorithm (Stein) with platform-specific optimizations. The implementation
The library exposes a small set of functions, including gcd48 for 48-bit inputs, along with helper variants
gcd48 originated from a community effort to optimize GCD for constrained systems. It is released under an
See also: greatest common divisor, binary GCD algorithm, Stein's algorithm.