gcdextended

Calculates the greatest common divisor using extended Eucled's algorithm. Also calculates m and n such that x m + y n = gcd(x, y). Depending on input, function can return scalar, vector or matrix

Arguments

  1. Integer argument x
  2. Integer argument y

Output

Vector of integer gcd, real value m, real value n

Examples

gcdextended