gcdExtended(_:)

Extended greatest common divisor - Int version

BigInt.swift:2339
func gcdExtended(_ x: Int) -> (g: BInt, a: BInt, b: BInt)

Parameters

x

Operand

Returns

Greatest common divisor g of self and x, and a and b such that a * self + b * x = g