Extending Euclid’s algorithm [01ET]

We shall now extend Euclid’s algorithm \gcd {\mathopen {}\left (m,n\right )\mathclose {}} from computing on pairs of positive integers to computing on pairs of triples of integers ((s,t),r) with r positive, satisfying the invariant that s and t are coefficients representing r as a linear combination of m and n.

Context

Extended Euclid’s Algorithm; integer linear combinations II [01EO]

Related

Algorithm. Euclid’s algorithm for calculating the gcd [01E0]

Definition. Integer linear combination [01D9]

Definition. Rational, positive, nonnegative, natural [019K]