public void GornerTest3() { var test = new Polinom(new List <Tuple <double, int> > { new Tuple <double, int> (3, 6), new Tuple <double, int> (9, 5), new Tuple <double, int> (-28, 4), new Tuple <double, int> (6, 3), new Tuple <double, int> (-30, 2), new Tuple <double, int> (-30, 1), new Tuple <double, int> (100, 0) }); test.Value(2); Assert.AreEqual(0, test.Value(-5)); }
public void GornerTest() { var test = new Polinom(new List <Tuple <double, int> > { new Tuple <double, int> (5, 4), new Tuple <double, int> (5, 3), new Tuple <double, int> (1, 2), new Tuple <double, int> (-11, 0) }); Assert.AreEqual(0, test.Value(1)); }
public void GornerTest2() { var test = new Polinom(new List <Tuple <double, int> > { new Tuple <double, int> (1, 4), new Tuple <double, int> (3, 3), new Tuple <double, int> (4, 2), new Tuple <double, int> (-5, 1), new Tuple <double, int> (-47, 0) }); Assert.AreEqual(4, test.Value(-3)); }