Skip to content

extendedGcd

extendedGcd<T>(a, b, domain): BezoutIdentity<T>

Defined in: gcd.ts:51

Extended Euclidean algorithm — computes gcd(a, b) together with the Bézout coefficients x and y such that a · x + b · y = gcd(a, b).

T

The carrier set of the domain.

T

First operand.

T

Second operand.

EuclideanDomain<T>

Evidence that T admits division with remainder.

BezoutIdentity<T>

The GCD and its Bézout coefficients.