Effective implementation of algorithms (Master Thesis)
Effective and error-free implementation of algorithms
|
#include <extended_gcd_loop.h>
Static Public Member Functions | |
template<typename T > | |
static std::pair< T, T > | extended_gcd_positive (T a, T b) |
Class computing extended GCD using loop
static std::pair<T, T> math::gcd::ExtendedGCDLoop::extended_gcd_positive | ( | T | a, |
T | b | ||
) | [inline, static] |
Returns extended gcd, i.e. pair(x, y) such that x * a + y * b == gcd(a, b)
Note: that returned values can be negative
Note: for both zero arguments function will return (0,0)
a | non-negative integer |
b | non-negative integer |