public void QFunctionTest() { var function = new QFunction(x, n, 1, k); Assert.AreEqual(new Fraction(1, 2), function.Calculate()); var function1 = new QFunction(x, n, 2, k); Assert.AreEqual(new Fraction(0), function1.Calculate()); var function2 = new QFunction(x, n, 3, k); Assert.AreEqual(new Fraction(0), function2.Calculate()); var function3 = new QFunction(x, n, 4, k); Assert.AreEqual(new Fraction(0), function3.Calculate()); }
// case if s = 0; private Fraction StartValueCalculate() { var qFunction = new QFunction(_x, _n, _t, _k); return(qFunction.Calculate()); }