public void PolynomialIsZeroTest() { Polynomial P1 = new Polynomial(3, new double[] { 0, 0, 0, 0 }); Polynomial P2 = new Polynomial(3, new double[] { 0, 0, 4, 0 }); Polynomial P3 = new Polynomial(3, new double[] { 6, 0, 0, 0 }); Assert.IsTrue(P1.isZero()); Assert.IsFalse(P2.isZero()); Assert.IsFalse(P3.isZero()); }
public void PolynomialSet2zeroTest() { Polynomial P1 = new Polynomial(3, new double[] { 1, 1, 2, 1 }); Assert.IsFalse(P1.isZero()); Assert.IsFalse(P1.isZero(1)); Assert.IsTrue(P1.isZero(2)); P1.set2Zero(); Assert.IsTrue(P1.isZero()); P1 = new Polynomial(3, new double[] { 1, 1, 2, 1 }); P1.set2Zero(2); Assert.IsTrue(P1.isZero(1)); }
public void PolynomialIsZeroEpsTest() { Polynomial P1 = new Polynomial(3, new double[] { 1, 2, 3, 4 }); Assert.IsTrue(P1.isZero(4)); Assert.IsFalse(P1.isZero(3)); }