public void TestExtendedEuclid() { var result = NumberTheory.ExtendedEuclid(6, 4); Console.WriteLine("{0}, {1}, {2}", result.Item1, result.Item2, result.Item3); result = NumberTheory.ExtendedEuclid(120, 23); Console.WriteLine("{0}, {1}, {2}", result.Item1, result.Item2, result.Item3); CollectionAssert.AreEqual(new int[] { result.Item1, result.Item2, result.Item3 }, new int[] { 1, -9, 47 }); result = NumberTheory.ExtendedEuclid(31415, 14142); Console.WriteLine("{0}, {1}, {2}", result.Item1, result.Item2, result.Item3); }