static void Main(string[] args) { CustomPolinomial a = new CustomPolinomial(new int[3] { 2, 1, 0 }, new double[3] { 3, 18, -8 }); CustomPolinomial b = new CustomPolinomial(new int[4] { 15, 3, 2, 0 }, new double[4] { 1, 8, -20, 5 }); CustomPolinomial c = new CustomPolinomial(new int[4] { 15, 3, 2, 0 }, new double[4] { 1, 8, -20, 5 }); double time = 0; int[] arr = new int[4] { 50, 100, 250, 1000 }; GcdSolver.GetBinaryGCD(0, 0, out time); Console.WriteLine(GcdSolver.GetBinaryGCD(out time, -13, -13, -13, -13, -13, -13, -13, -13, -13, -13) + " " + time.ToString()); Console.ReadKey(); }
public void ToStringTest() { CustomPolinomial a = new CustomPolinomial(new int[4] { 4, 3, 1, 0 }, new double[4] { 2, 2, 2, 2 }); Assert.AreNotEqual("", a.ToString()); }
public void SubOfPolinomsTest() { CustomPolinomial a = new CustomPolinomial(new int[4] { 4, 3, 1, 0 }, new double[4] { 2, 2, 2, 2 }); CustomPolinomial b = new CustomPolinomial(new int[4] { 4, 3, 1, 0 }, new double[4] { 2, 2, 2, 2 }); CustomPolinomial result = new CustomPolinomial(new int[4] { 4, 3, 1, 0 }, new double[4] { 0, 0, 0, 0 }); Assert.AreEqual(result, a - b); }
public void MultiplyOfPolinomsTest() { CustomPolinomial a = new CustomPolinomial(new int[4] { 4, 3, 1, 0 }, new double[4] { 2, 2, 2, 2 }); CustomPolinomial b = new CustomPolinomial(new int[4] { 4, 3, 1, 0 }, new double[4] { 2, 2, 2, 2 }); CustomPolinomial result = new CustomPolinomial(new int[4] { 4, 3, 1, 0 }, new double[4] { 4, 4, 4, 4 }); Assert.AreNotEqual(result, a * b); }