Calculates the gcd of both input integers and additionally calculates a pair of Bézout coefficients s and t such that gcd(a,b) = s*a + t*b. Returns 0 if both p_a and p_b are 0.
Parameters
[in]
p_a
first input number
[in]
p_b
second input number
[out]
p_s
a Bézout coefficient of p_a
[out]
p_t
a Bézout coefficient of p_b
Postcondition
gcd(a,b) = p_s*p_a + p_t*p_b
Returns
gcd of p_a and p_b
Generated on Fri Oct 24 2025 21:45:31 for Leonardus by 1.9.8