Back to Symbolic Math (SymEngine)
sym.gcdex
Compute the extended greatest common divisor.
Syntax
sym.gcdex(a, b)
Description
Compute the extended greatest common divisor. Returns the GCD along with Bezout coefficients s and t such that: gcd(a, b) = s*a + t*b This is useful for solving Diophantine equations and computing modular inverses.
Parameters
| Name | Description |
|---|---|
| a | - First expression. |
| b | - Second expression. |
Returns
GCDExtResult