Example #1
0
        public void RealRoots2()
        {
            var p = new Polynom(1.515, 0.009761904761905, -0.012857142857143, -0.003333333333333);

            var roots = p.GetRealRoots();


            Assert.IsTrue(roots.Length == 1);
            Assert.AreEqual(6.701151704879464, roots[0], 1E-10); //Calculated with Matlab
        }
Example #2
0
        public void RealRoots1()
        {
            var p = new Polynom(-2, 0.5);

            var roots = p.GetRealRoots();


            Assert.IsTrue(roots.Length == 1);
            Assert.AreEqual(4, roots[0]);
        }